Content-Length: 257902 | pFad | http://github.com/postgrespro/postgres_cluster/commit/7e4911b2ae33acff7b85234b91372133ec6df9d4

9C Fix variable confusion in BufferSync(). · postgrespro/postgres_cluster@7e4911b · GitHub
Skip to content

Commit 7e4911b

Browse files
committed
Fix variable confusion in BufferSync().
As noted by Heikki Linnakangas, the previous coding confused the "flags" variable with the "mask" variable. The affect of this appears to be that unlogged buffers would get written out at every checkpoint rather than only at shutdown time. Although that's arguably an acceptable failure mode, I'm back-patching this change, since it seems like a poor idea to rely on this happening to work.
1 parent bd0e74a commit 7e4911b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/storage/buffer/bufmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,7 @@ BufferSync(int flags)
11911191
* buffers. But at shutdown time, we write all dirty buffers.
11921192
*/
11931193
if (!(flags & CHECKPOINT_IS_SHUTDOWN))
1194-
flags |= BM_PERMANENT;
1194+
mask |= BM_PERMANENT;
11951195

11961196
/*
11971197
* Loop over all buffers, and mark the ones that need to be written with

0 commit comments

Comments
 (0)








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/postgres_cluster/commit/7e4911b2ae33acff7b85234b91372133ec6df9d4

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy