Skip to content

Commit

Permalink
Merge pull request #414 from Melkij/fix_pg17_LockHeldByMe_changed
Browse files Browse the repository at this point in the history
fix LockHeldByMe compilation error against pg17
  • Loading branch information
Melkij authored Jul 31, 2024
2 parents 3edf5b3 + 06f5f8f commit d63fd39
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/repack.c
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,12 @@ repack_swap(PG_FUNCTION_ARGS)
* Sanity check if both relations are locked in access exclusive mode
* before swapping these files.
*/
#if PG_VERSION_NUM >= 120000
#if PG_VERSION_NUM >= 170000
if (! CheckRelationOidLockedByMe(oid, AccessExclusiveLock, true))
elog(ERROR, "must hold access exclusive lock on table \"%s\"", relname);
if (! CheckRelationOidLockedByMe(oid2, AccessExclusiveLock, true))
elog(ERROR, "must hold access exclusive lock on table \"table_%u\"", oid);
#elif PG_VERSION_NUM >= 120000
{
LOCKTAG tag;

Expand Down

0 comments on commit d63fd39

Please sign in to comment.