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/5550~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/5550
Choose a head ref
  • 2 commits
  • 30 files changed
  • 2 contributors

Commits on Mar 16, 2025

  1. Implement WAIT FOR command

    WAIT FOR is to be used on standby and specifies waiting for
    the specific WAL location to be replayed.  This option is useful when
    the user makes some data changes on primary and needs a guarantee to see
    these changes are on standby.
    
    The queue of waiters is stored in the shared memory as an LSN-ordered pairing
    heap, where the waiter with the nearest LSN stays on the top.  During
    the replay of WAL, waiters whose LSNs have already been replayed are deleted
    from the shared memory pairing heap and woken up by setting their latches.
    
    WAIT FOR needs to wait without any snapshot held.  Otherwise, the snapshot
    could prevent the replay of WAL records, implying a kind of self-deadlock.
    This is why separate utility command seems appears to be the most robust
    way to implement this functionality.  It's not possible to implement this as
    a function.  Previous experience shows that stored procedures also have
    limitation in this aspect.
    
    Discussion: https://postgr.es/m/eb12f9b03851bb2583adab5df9579b4b%40postgrespro.ru
    Author: Kartyshov Ivan <[email protected]>
    Author: Alexander Korotkov <[email protected]>
    Reviewed-by: Michael Paquier <[email protected]>
    Reviewed-by: Peter Eisentraut <[email protected]>
    Reviewed-by: Dilip Kumar <[email protected]>
    Reviewed-by: Amit Kapila <[email protected]>
    Reviewed-by: Alexander Lakhin <[email protected]>
    Reviewed-by: Bharath Rupireddy <[email protected]>
    Reviewed-by: Euler Taveira <[email protected]>
    Reviewed-by: Heikki Linnakangas <[email protected]>
    Reviewed-by: Kyotaro Horiguchi <[email protected]>
    Reviewed-by: Yura Sokolov <[email protected]>
    akorotkov authored and Commitfest Bot committed Mar 16, 2025
    Configuration menu
    Copy the full SHA
    e86504c View commit details
    Browse the repository at this point in the history
  2. [CF 5550] v6 - Waiting for LSN replay with WAIT FOR command

    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5550
    
    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/[email protected]
    Author(s): Alexander Korotkov
    Commitfest Bot committed Mar 16, 2025
    Configuration menu
    Copy the full SHA
    de4c8be View commit details
    Browse the repository at this point in the history
Loading