mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
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.
This commit is contained in:
parent
bd0e74a9ce
commit
7e4911b2ae
@ -1191,7 +1191,7 @@ BufferSync(int flags)
|
||||
* buffers. But at shutdown time, we write all dirty buffers.
|
||||
*/
|
||||
if (!(flags & CHECKPOINT_IS_SHUTDOWN))
|
||||
flags |= BM_PERMANENT;
|
||||
mask |= BM_PERMANENT;
|
||||
|
||||
/*
|
||||
* Loop over all buffers, and mark the ones that need to be written with
|
||||
|
Loading…
Reference in New Issue
Block a user