Skip to content

Add PostgreSQL session parameter validation in ProxySQL to prevent invalid values #4865

@rahim-kanji

Description

@rahim-kanji

Overview

ProxySQL currently lacks validation for PostgreSQL session parameters before forwarding them to the backend. This can lead to issues where invalid values are sent to PostgreSQL servers, potentially causing errors, session locks on hostgroups, and inconsistent behavior.

Proposed Feature

Implement parameter validation within ProxySQL that mimics PostgreSQL's own validation logic, allowing early detection and notifying user of invalid session parameter values.

Benefits

  • Prevents invalid session parameters from reaching PostgreSQL backends
  • Provides immediate feedback to users about invalid values
  • Reduces the risk of sessions being locked on hostgroups due to invalid parameters
  • Improves overall system stability and accuracy
  • Allows users to fix issues before they impact the database

Implementation Details

  • Add validation logic for PostgreSQL session parameters within ProxySQL
  • Mirror the validation rules used by PostgreSQL to ensure consistency
  • Implement appropriate error messages that clearly indicate the validation failure

Additional Context

This feature serves as an early invalid session parameter value detection that would otherwise only be detected when they reach the PostgreSQL backend, potentially causing inconsistent behavior.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions