-
Notifications
You must be signed in to change notification settings - Fork 2
Comparing changes
Open a pull request
base repository: postgresql-cfbot/postgresql
base: cf/6043~1
head repository: postgresql-cfbot/postgresql
compare: cf/6043
- 8 commits
- 8 files changed
- 2 contributors
Commits on Sep 13, 2025
-
Refactor goto into for loop in GetVictimBuffer()
GetVictimBuffer() implemented a loop to optimistically lock a clean victim buffer using a goto. Future commits will add batch flushing functionality to GetVictimBuffer. The new logic works better with standard for loop flow control. This commit is only a refactor and does not introduce any new functionality. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/2FA0BAC7-5413-4ABD-94CA-4398FE77750D%40gmail.com Discussion: https://postgr.es/m/flat/CAAKRu_Yjn4mvN9NBxtmsCQSGwup45CoA4e05nhR7ADP-v0WCig%40mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for 051b903 - Browse repository at this point
Copy the full SHA 051b903View commit details -
Split FlushBuffer() into two parts
Before adding write combining to write a batch of blocks when flushing dirty buffers, refactor FlushBuffer() into the preparatory step and actual buffer flushing step. This separation procides symmetry with future code for batch flushing which necessarily separates these steps, as it must prepare multiple buffers before flushing them together. These steps are moved into a new FlushBuffer() helper function, CleanVictimBuffer() which will contain both the batch flushing and single flush code in future commits. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Discussion: https://postgr.es/m/2FA0BAC7-5413-4ABD-94CA-4398FE77750D%40gmail.com Discussion: https://postgr.es/m/flat/CAAKRu_Yjn4mvN9NBxtmsCQSGwup45CoA4e05nhR7ADP-v0WCig%40mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for 3142b4a - Browse repository at this point
Copy the full SHA 3142b4aView commit details -
Eagerly flush bulkwrite strategy ring
Operations using BAS_BULKWRITE (COPY FROM and createdb) will inevitably need to flush buffers in the strategy ring in order to reuse them. By eagerly flushing the buffers in a larger run, we encourage larger writes at the kernel level and less interleaving of WAL flushes and data file writes. The effect is mainly noticeable with multiple parallel COPY FROMs. In this case, client backends achieve higher write throughput and end up spending less time waiting on acquiring the lock to flush WAL. Larger flush operations also mean less time waiting for flush operations at the kernel level. The heuristic for eager eviction is to only flush buffers in the strategy ring which do not require a WAL flush. This patch also is a step toward AIO writes. Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com> Earlier version Reviewed-by: Kirill Reshke <reshkekirill@gmail.com> Discussion: https://postgr.es/m/2FA0BAC7-5413-4ABD-94CA-4398FE77750D%40gmail.com Discussion: https://postgr.es/m/flat/CAAKRu_Yjn4mvN9NBxtmsCQSGwup45CoA4e05nhR7ADP-v0WCig%40mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for de5134e - Browse repository at this point
Copy the full SHA de5134eView commit details -
Write combining for BAS_BULKWRITE
Implement write combining for users of the bulkwrite buffer access strategy (e.g. COPY FROM). When the buffer access strategy needs to clean a buffer for reuse, it already opportunistically flushes some other buffers. Now, combine any contiguous blocks from the same relation into larger writes and issue them with smgrwritev(). The performance benefit for COPY FROM is mostly noticeable for multiple concurrent COPY FROMs because a single COPY FROM is either CPU bound or bound by WAL writes. The infrastructure for flushing larger batches of IOs will be reused by checkpointer and other processes doing writes of dirty data. XXX: Because this sets in-place checksums for batches, it is not committable until additional infrastructure goes in place. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/flat/CAAKRu_bcWRvRwZUop_d9vzF9nHAiT%2B-uPzkJ%3DS3ShZ1GqeAYOw%40mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for 7269860 - Browse repository at this point
Copy the full SHA 7269860View commit details -
Fix XLogNeedsFlush() for checkpointer
In normal operation, XLogNeedsFlush() returns true if the flush ptr has not been advanced past the provided LSN. During normal recovery on a standby (not crash recovery), it return true if the minimum recovery point hasn't been advanced past the provided LSN. However, during an end-of-recovery checkpoint, the checkpointer flushes WAL, so XLogNeedsFlush() should compare the provided location with the flush pointer. Correct the logic in XLogNeedsFlush() to compare the LSN to the flush pointer when WAL inserts are allowed and the minimum recovery point otherwise. This is not an active bug because no current users of XLogNeedsFlush() temporarily allowed WAL inserts during recovery. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Jeff Davis <pgsql@j-davis.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/flat/CAAKRu_a1vZRZRWO3_jv_X13RYoqLRVipGO0237g5PKzPa2YX6g%40mail.gmail.com Discussion: https://postgr.es/m/flat/CAAKRu_bcWRvRwZUop_d9vzF9nHAiT%2B-uPzkJ%3DS3ShZ1GqeAYOw%40mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for dc7dfc9 - Browse repository at this point
Copy the full SHA dc7dfc9View commit details -
Add database Oid to CkptSortItem
This is useful for checkpointer write combining -- which will be added in a future commit. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/2FA0BAC7-5413-4ABD-94CA-4398FE77750D%40gmail.com
Configuration menu - View commit details
-
Copy full SHA for 31bf2b5 - Browse repository at this point
Copy the full SHA 31bf2b5View commit details -
Implement checkpointer data write combining
When the checkpointer writes out dirty buffers, writing multiple contiguous blocks as a single IO is a substantial performance improvement. The checkpointer is usually bottlenecked on IO, so issuing larger IOs leads to increased write throughput and faster checkpoints. Author: Melanie Plageman <melanieplageman@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/2FA0BAC7-5413-4ABD-94CA-4398FE77750D%40gmail.com
Configuration menu - View commit details
-
Copy full SHA for f5452ef - Browse repository at this point
Copy the full SHA f5452efView commit details -
[CF 6043] v6 - Checkpointer write combining
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/6043 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CAAKRu_atZuU3gYY6hVVuvqDW+mfXM+fCWCyYODbZPesxyr=y6g@mail.gmail.com Author(s): Melanie Plageman
Commitfest Bot committedSep 13, 2025 Configuration menu - View commit details
-
Copy full SHA for 2d1c7c8 - Browse repository at this point
Copy the full SHA 2d1c7c8View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff cf/6043~1...cf/6043