File tree 1 file changed +5
-3
lines changed
src/backend/storage/buffer 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -2376,9 +2376,11 @@ SetBufferCommitInfoNeedsSave(Buffer buffer)
2376
2376
* making the first scan after commit of an xact that added/deleted many
2377
2377
* tuples. So, be as quick as we can if the buffer is already dirty. We
2378
2378
* do this by not acquiring spinlock if it looks like the status bits are
2379
- * already OK. (Note it is okay if someone else clears BM_JUST_DIRTIED
2380
- * immediately after we look, because the buffer content update is already
2381
- * done and will be reflected in the I/O.)
2379
+ * already. Since we make this test unlocked, there's a chance we might
2380
+ * fail to notice that the flags have just been cleared, and failed to reset
2381
+ * them, due to memory-ordering issues. But since this function is only
2382
+ * intended to be used in cases where failing to write out the data would
2383
+ * be harmless anyway, it doesn't really matter.
2382
2384
*/
2383
2385
if ((bufHdr -> flags & (BM_DIRTY | BM_JUST_DIRTIED )) !=
2384
2386
(BM_DIRTY | BM_JUST_DIRTIED ))
You can’t perform that action at this time.
0 commit comments