Skip to content

Pool cleanup/reset #270

Closed
Closed

Description

@mike-hart

Both curiosity and a request.

def _get_reset_query(self):

Why this level of complexity rather than the use of the DISCARD keyword?

https://www.postgresql.org/docs/9.6/static/sql-discard.html

Would a DISCARD ALL not do the right thing here?

Activity

  1. 1st1 commented on Mar 5, 2018

    @1st1
    Member

    To support older versions of postgres (< 9.3).

  2. 1st1 commented on Mar 5, 2018

    @1st1
    Member

    Also DISCARD ALL would discard prepared statements, which we want to keep alive between sessions.

  3. elprans commented on Mar 5, 2018

    @elprans
    Member

    Aside from old Postgres versions there are also various Postgres forks and outright new databases that speak the protocol, but not necessarily support all Postgres features.

  4. mike-hart commented on Mar 5, 2018

    @mike-hart
    Author

    Thanks all.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions