Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdcd052c

Browse files
committed
Fix pg_atomic_u64 initialization.
As Andres pointed out, pg_atomic_init_u64 must be used to initialize anatomic variable, before it can be accessed with the actual atomic ops.Trying to use pg_atomic_write_u64 on an uninitialized variable leads to afailure with the fallback implementation that uses a spinlock.Discussion:https://www.postgresql.org/message-id/20170816191346.d3ke5tpshhco4bnd%40alap3.anarazel.de
1 parentec0a69e commitdcd052c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/access/heap/heapam.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,7 @@ heap_parallelscan_initialize(ParallelHeapScanDesc target, Relation relation,
16381638
target->phs_nblocks>NBuffers /4;
16391639
SpinLockInit(&target->phs_mutex);
16401640
target->phs_startblock=InvalidBlockNumber;
1641-
pg_atomic_write_u64(&target->phs_nallocated,0);
1641+
pg_atomic_init_u64(&target->phs_nallocated,0);
16421642
SerializeSnapshot(snapshot,target->phs_snapshot_data);
16431643
}
16441644

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp