Content-Length: 273017 | pFad | http://github.com/postgrespro/mmts/pull/21/commits/e0884c381d3c06c32bbfea6d50d3231f7b3dc213

FF [PGPRO-7565] use 64-bit atomic access for MyPgXact xid/xmin by ziva777 · Pull Request #21 · postgrespro/mmts · GitHub
Skip to content

[PGPRO-7565] use 64-bit atomic access for MyPgXact xid/xmin #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[PGPRO-7565] use 64-bit atomic access for MyPgXact xid/xmin
Switch to the pg_atomic_* calls for the xid/xmin.  This fixes a transient error
due to non-atomic reading of the xid/xmin values from shared memory on 32-bit
arch.

tags: 64xid
  • Loading branch information
Maxim Orlov committed Nov 21, 2024
commit e0884c381d3c06c32bbfea6d50d3231f7b3dc213
4 changes: 4 additions & 0 deletions src/dmq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,11 @@ dmq_receiver_loop(PG_FUNCTION_ARGS)
extra = dmq_receiver_start_hook(sender_name);

/* do not hold globalxmin. XXX: try to carefully release snaps */
#ifdef PGPRO_EE
pg_atomic_write_u64(&MyPgXact->xmin, InvalidTransactionId);
#else
MyPgXact->xmin = InvalidTransactionId;
#endif

for (;;)
{
Expand Down








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/mmts/pull/21/commits/e0884c381d3c06c32bbfea6d50d3231f7b3dc213

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy