Skip to content

Commit fb1c0b1

Browse files
author
Antonin Houska
committed
Adjusted the use of injection points.
An additional argument was added to the macros in PG 18beta1.
1 parent 9546f9a commit fb1c0b1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

pg_rewrite.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -772,11 +772,13 @@ rewrite_worker_main(Datum main_arg)
772772
relname_dst);
773773
CommitTransactionCommand();
774774

775-
#if PG_VERSION_NUM >= 170000
776775
/*
777776
* In regression tests, use this injection point to check that
778777
* the changes are visible by other transactions.
779778
*/
779+
#if PG_VERSION_NUM >= 180000
780+
INJECTION_POINT("pg_rewrite-after-commit", NULL);
781+
#elif PG_VERSION_NUM >= 170000
780782
INJECTION_POINT("pg_rewrite-after-commit");
781783
#endif
782784
}
@@ -1056,11 +1058,13 @@ rewrite_table_impl(char *relschema_src, char *relname_src,
10561058
*/
10571059
CommandCounterIncrement();
10581060

1059-
#if PG_VERSION_NUM >= 170000
10601061
/*
10611062
* During testing, wait for another backend to perform concurrent data
10621063
* changes which we will process below.
10631064
*/
1065+
#if PG_VERSION_NUM >= 180000
1066+
INJECTION_POINT("pg_rewrite-before-lock", NULL);
1067+
#elif PG_VERSION_NUM >= 170000
10641068
INJECTION_POINT("pg_rewrite-before-lock");
10651069
#endif
10661070

0 commit comments

Comments
 (0)