Skip to content

Conversation

@za-arthur
Copy link
Collaborator

@za-arthur za-arthur commented Jul 6, 2025

lock_access_share() and lock_exclusive() doesn't call RELEASE SAVEPOINT on every retry which pollutes the cache and degrades the performance. This commit calls RELEASE SAVEPOINT when created savepoint is not necessary anymore. Additionally it moves SAVEPOINT outside of the retry loop since it isn't necessary to create new savepoint on every retry at all.

lock_exclusive() also moves start of transaction outside of the retry loop and creates a savepoint regardless of the value start_xact.

Now Github workflow also installs libnuma-dev for PostgreSQL 18 since it has new option --with-libnuma:
https://www.postgresql.org/docs/18/release-18.html

Add configure option --with-libnuma to enable NUMA awareness (Jakub Wartak, Bertrand Drouvot)

Issue #457

@za-arthur za-arthur force-pushed the issue_457_savepoint branch 2 times, most recently from 4642975 to 60018f7 Compare July 6, 2025 22:41
za-arthur added 2 commits July 8, 2025 14:37
…VEPOINT

lock_access_share() and lock_exclusive() doesn't call RELEASE SAVEPOINT
on every retry which pollutes the cache and degrades the performance.
This commit calls RELEASE SAVEPOINT when created savepoint is not
necessary anymore. Additionally it moves SAVEPOINT outside of the retry
loop since it isn't necessary to create new savepoint on every retry at
all.

lock_exclusive() also moves start of transaction outside of the retry
loop and creates a savepoint regardless of the value start_xact.
To be able to build pg_repack with Postgres 18 we need to install
libnuma-dev:
postgres/postgres@65c298f
@za-arthur za-arthur force-pushed the issue_457_savepoint branch from 60018f7 to b407e31 Compare July 8, 2025 12:40
Copy link
Collaborator

@andreasscherbaum andreasscherbaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good.

@za-arthur za-arthur merged commit 78bc373 into master Jul 10, 2025
22 checks passed
@za-arthur za-arthur deleted the issue_457_savepoint branch July 10, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants