Skip to content

Complete session state cleanup for DISCARD ALL #1475

Description

@murex971

PgDog intercepts DISCARD ALL and responds without forwarding it to PostgreSQL. Prepared statements are cleared, but other session state documented by PostgreSQL is still retained.
DISCARD ALL should also:

  • remove all LISTEN subscriptions (UNLISTEN *);
  • release all advisory locks held by the client;
  • reset session parameters to the values supplied in the startup message.

This should make a PgDog session behave like a PostgreSQL session after DISCARD ALL.
Reference: https://www.postgresql.org/docs/current/sql-discard.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions