diff --git a/src/ivfbuild.c b/src/ivfbuild.c index f3f8211..03b9a29 100644 --- a/src/ivfbuild.c +++ b/src/ivfbuild.c @@ -205,11 +205,7 @@ GetNextTuple(Tuplesortstate *sortstate, TupleDesc tupdesc, TupleTableSlot *slot, Datum value; bool isnull; -#if PG_VERSION_NUM >= 100000 if (tuplesort_gettupleslot(sortstate, true, false, slot, NULL)) -#else - if (tuplesort_gettupleslot(sortstate, true, slot, NULL)) -#endif { *list = DatumGetInt32(slot_getattr(slot, 1, &isnull)); value = slot_getattr(slot, 3, &isnull); diff --git a/src/ivfflat.c b/src/ivfflat.c index 0829458..5ad3378 100644 --- a/src/ivfflat.c +++ b/src/ivfflat.c @@ -66,9 +66,7 @@ static void ivfflatcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, Cost *indexStartupCost, Cost *indexTotalCost, Selectivity *indexSelectivity, double *indexCorrelation -#if PG_VERSION_NUM >= 100000 ,double *indexPages -#endif ) { GenericCosts costs; @@ -86,9 +84,7 @@ ivfflatcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, *indexTotalCost = DBL_MAX; *indexSelectivity = 0; *indexCorrelation = 0; -#if PG_VERSION_NUM >= 100000 *indexPages = 0; -#endif return; } @@ -116,9 +112,7 @@ ivfflatcostestimate(PlannerInfo *root, IndexPath *path, double loop_count, *indexTotalCost = costs.indexTotalCost; *indexSelectivity = costs.indexSelectivity; *indexCorrelation = costs.indexCorrelation; -#if PG_VERSION_NUM >= 100000 *indexPages = costs.numIndexPages; -#endif } /* @@ -186,9 +180,7 @@ ivfflathandler(PG_FUNCTION_ARGS) amroutine->amstorage = false; amroutine->amclusterable = false; amroutine->ampredlocks = false; -#if PG_VERSION_NUM >= 100000 amroutine->amcanparallel = false; -#endif #if PG_VERSION_NUM >= 110000 amroutine->amcaninclude = false; #endif @@ -224,11 +216,9 @@ ivfflathandler(PG_FUNCTION_ARGS) amroutine->amrestrpos = NULL; /* Interface functions to support parallel index scans */ -#if PG_VERSION_NUM >= 100000 amroutine->amestimateparallelscan = NULL; amroutine->aminitparallelscan = NULL; amroutine->amparallelrescan = NULL; -#endif PG_RETURN_POINTER(amroutine); } diff --git a/src/ivfflat.h b/src/ivfflat.h index 228e32b..93c4a47 100644 --- a/src/ivfflat.h +++ b/src/ivfflat.h @@ -234,9 +234,7 @@ bool ivfflatinsert(Relation index, Datum *values, bool *isnull, ItemPointer hea #if PG_VERSION_NUM >= 140000 ,bool indexUnchanged #endif -#if PG_VERSION_NUM >= 100000 ,IndexInfo *indexInfo -#endif ); IndexBulkDeleteResult *ivfflatbulkdelete(IndexVacuumInfo *info, IndexBulkDeleteResult *stats, IndexBulkDeleteCallback callback, void *callback_state); IndexBulkDeleteResult *ivfflatvacuumcleanup(IndexVacuumInfo *info, IndexBulkDeleteResult *stats); diff --git a/src/ivfinsert.c b/src/ivfinsert.c index 86eafe3..198b7d6 100644 --- a/src/ivfinsert.c +++ b/src/ivfinsert.c @@ -156,9 +156,7 @@ ivfflatinsert(Relation index, Datum *values, bool *isnull, ItemPointer heap_tid, #if PG_VERSION_NUM >= 140000 ,bool indexUnchanged #endif -#if PG_VERSION_NUM >= 100000 ,IndexInfo *indexInfo -#endif ) { IndexTuple itup; diff --git a/src/ivfscan.c b/src/ivfscan.c index e2171b0..1879bc4 100644 --- a/src/ivfscan.c +++ b/src/ivfscan.c @@ -302,11 +302,7 @@ ivfflatgettuple(IndexScanDesc scan, ScanDirection dir) pfree(DatumGetPointer(value)); } -#if PG_VERSION_NUM >= 100000 if (tuplesort_gettupleslot(so->sortstate, true, false, so->slot, NULL)) -#else - if (tuplesort_gettupleslot(so->sortstate, true, so->slot, NULL)) -#endif { ItemPointer tid = (ItemPointer) DatumGetPointer(slot_getattr(so->slot, 2, &so->isnull)); BlockNumber indexblkno = DatumGetInt32(slot_getattr(so->slot, 3, &so->isnull)); diff --git a/test/t/001_wal.pl b/test/t/001_wal.pl index 25e4e7e..38fa8b3 100644 --- a/test/t/001_wal.pl +++ b/test/t/001_wal.pl @@ -20,15 +20,8 @@ sub test_index_replay # Wait for replica to catch up my $applname = $node_replica->name; - my $caughtup_query; my $server_version_num = $node_primary->safe_psql("postgres", "SHOW server_version_num"); - if ($server_version_num >= 100000) { - $caughtup_query = "SELECT pg_current_wal_lsn() <= replay_lsn FROM pg_stat_replication WHERE application_name = '$applname';"; - } else { - # TODO figure out why replay location doesn't work - $caughtup_query = "SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';"; - } - + my $caughtup_query = "SELECT pg_current_wal_lsn() <= replay_lsn FROM pg_stat_replication WHERE application_name = '$applname';"; $node_primary->poll_query_until('postgres', $caughtup_query) or die "Timed out while waiting for replica 1 to catch up";