Thread

  1. Re: BUG #18944: Assertion Failure in psql with idle_session_timeout Set

    Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com> — 2025-06-12T07:38:41Z

    On Thu, Jun 12, 2025 at 12:35 AM Michael Paquier <michael@paquier.xyz> wrote:
    > So my point would be to take a drastic decision in
    > ExecQueryAndProcessResults() if we detect a PGRES_COPY_BOTH,
    > PGRES_COPY_OUT or PGRES_COPY_IN while in a pipeline, and just give up.
    > It does not prevent the feature to work for other queries, and we
    > still have test coverage for queries that cannot run in transaction
    > blocks like REINDEX CONCURRENTLY, etc.  It just means that we cannot
    > enter in a COPY state while in a pipeline.
    
    Agreed, I've also contemplated this option given the amount of edge
    cases there are along with the limited usefulness of doing COPY within
    a pipeline. In a sense, this worked as a way to show the missing bits
    of libpq's pipeline support with COPY.
    
    The attached patch now aborts the connection anytime we enter COPY
    state while within a pipeline and removes all pipeline+COPY from the
    SQL tests.