Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5612~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5612
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jul 21, 2025

  1. Process sync requests incrementally in AbsorbSyncRequests and Compact…

    …CheckpointerRequestQueue
    
    If the number of sync requests is big enough, the palloc() call in
    AbsorbSyncRequests() will attempt to allocate more than 1 GB of memory,
    resulting in failure. This can lead to an infinite loop in the checkpointer
    process, as it repeatedly fails to absorb the pending requests.
    
    Similarly, CompactCheckpointerRequestQueue() can face the same memory
    allocation issues when the request queue contains millions of entries,
    requiring large hash tables that can exceed available memory.
    
    To avoid this, we process requests incrementally in batches in both
    functions. This patch introduces bounded memory usage by limiting
    allocations to CKPT_REQ_BATCH_SIZE regardless of the total number of
    requests. For CompactCheckpointerRequestQueue(), this changes memory
    usage from O(num_requests) to O(batch_size) for both hash tables and
    skip arrays, while accepting the trade-off that duplicates spanning
    batch boundaries won't be detected.
    
    This ensures that memory usage stays within a safe range, avoids
    excessive allocations.
    alterego655 authored and Commitfest Bot committed Jul 21, 2025
    Configuration menu
    Copy the full SHA
    4a149dd View commit details
    Browse the repository at this point in the history
  2. [CF 5612] v7 - Avoid infinite loop in checkpointer

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5612
    
    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/CABPTF7XqUoXmLfS1KxTRyDakaRQ3PWxCb2epyjZnbkDQs-VhBw@mail.gmail.com
    Author(s): Maxim Orlov, Xuneng Zhou
    Commitfest Bot committed Jul 21, 2025
    Configuration menu
    Copy the full SHA
    89bb7a9 View commit details
    Browse the repository at this point in the history
Loading