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

Commits on Jan 21, 2025

  1. Add PgProto test module to send message on a raw socket

    Add a new PostgreSQL::Test::PgProto class that provides helper functions
    to send PostgreSQL protocol message to a socket. This initial version
    provides functions to send a startup packet, send a simple query, read
    the content of a response and consume responsed until the socket is
    closed.
    
    This is useful to test edge cases like sessions stuck in a specific
    socket state.
    bonnefoa authored and Commitfest Bot committed Jan 21, 2025
    Configuration menu
    Copy the full SHA
    4b3609c View commit details
    Browse the repository at this point in the history
  2. Accept recovery conflict interrupt on blocked writing

    Previously, all interrupts except process dying were ignored while a
    process was blocked writing to a socket. If the connection to the client
    was broken (no clean FIN nor RST), a process sending results to the
    client could be stuck for 924s until the TCP retransmission timeout is
    reached. During this time, it was possible for the process to conflict
    with recovery: For example, the process returning results can have a
    conflicting buffer pin.
    
    To avoid blocking recovery for an extended period of time, this patch
    changes client write interrupts by handling recovery conflict interrupts
    instead of ignoring them. Since the interrupt happens while we're likely
    to have partially written results on the socket, there's no easy way to
    keep protocol sync so the session needs to be terminated.
    
    In addition, a blocked write could happen while interrupts are blocked.
    For example, we're sending an error message to the client and eventually
    saturate the socket buffer. In this case, we can't process the interrupt
    in ProcessClientWriteInterrupt. Instead, we stop retrying writes and
    trigger a write error, allowing to close the connection and termiate the
    session.
    bonnefoa authored and Commitfest Bot committed Jan 21, 2025
    Configuration menu
    Copy the full SHA
    b1dc0eb View commit details
    Browse the repository at this point in the history
  3. [CF 52/5504] v04 - Don't ignore recovery conflict interrupt on blocke…

    …d writing
    
    This commit was automatically generated by a robot at cfbot.cputube.org.
    It is based on patches submitted to the PostgreSQL mailing lists and
    registered in the PostgreSQL Commitfest application.
    
    This branch will be overwritten each time a new patch version is posted to
    the email thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Commitfest entry: https://commitfest.postgresql.org/52/5504
    Patch(es): https://www.postgresql.org/message-id/CAO6_Xqq9E1kwJ9nYnaA_0Y+1b-_fL8vOy=cxNPddjRN6W8a6Pg@mail.gmail.com
    Author(s): Anthonin Bonnefoy
    Commitfest Bot committed Jan 21, 2025
    Configuration menu
    Copy the full SHA
    8970eec View commit details
    Browse the repository at this point in the history
Loading