Skip to content

Commit 9958e05

Browse files
authored
Merge pull request #81 from darkixion/support-pg18
Add support for PostgreSQL 18.
2 parents af50b6d + ea72701 commit 9958e05

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pg_squeeze.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,11 @@ setup_decoding(Oid relid, TupleDesc tup_desc, Snapshot *snap_hist)
992992
* Use the slot initialized by the scheduler worker (or by the backend
993993
* running the squeeze_table() function ).
994994
*/
995+
#if PG_VERSION_NUM >= 180000
996+
ReplicationSlotAcquire(NameStr(repl_slot->name), true, true);
997+
#else
995998
ReplicationSlotAcquire(NameStr(repl_slot->name), true);
999+
#endif
9961000

9971001
/*
9981002
* This should not really happen, but if it did, the initial load could
@@ -2434,7 +2438,11 @@ has_dropped_attribute(Relation rel)
24342438

24352439
for (int i = 0; i < tup_desc->natts; i++)
24362440
{
2441+
#if PG_VERSION_NUM >= 180000
2442+
Form_pg_attribute attr = TupleDescAttr(tup_desc, i);
2443+
#else
24372444
Form_pg_attribute attr = &tup_desc->attrs[i];
2445+
#endif
24382446

24392447
if (attr->attisdropped)
24402448
return true;

0 commit comments

Comments
 (0)