Skip to content

discard "DISCARD ALL" query #788

@Fenoman

Description

@Fenoman

Would it be possible to add a new configuration setting (e.g., pool_discard_discardall)?

When this setting is enabled, Odyssey would intercept the DISCARD ALL command sent directly by the client connection driver and effectively ignore it (preventing it from reaching PostgreSQL).

This feature would be particularly useful in environments where:

  1. A significant amount of business logic is implemented within the database itself.
  2. Temporary tables are used very intensively.
  3. To combat system catalog bloat, it's desirable to reuse temporary tables across pooled sessions instead of dropping them (which DISCARD ALL does) and then recreating them later.
  4. Unfortunately, the specific client driver being used does not provide an option to disable the automatic sending of the DISCARD ALL command (e.g., when a connection is returned to the pool).

By intercepting and ignoring DISCARD ALL at the pooler level, we could achieve the desired temporary table reuse even when the client driver enforces sending this command.

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