Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add statement_cache_size parameter to allow connections to Supabase #1676

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

NolanTrem
Copy link
Collaborator

@NolanTrem NolanTrem commented Dec 9, 2024

Important

Adds statement_cache_size parameter to database configuration for Supabase compatibility and removes deprecated environment variable support.

  • Behavior:
    • Adds statement_cache_size parameter to PostgresConfigurationSettings in database.py.
    • Updates PostgresConnectionManager in base.py to use statement_cache_size when creating connection pools.
    • Handles DuplicatePreparedStatementError in fetch_query() in base.py by suggesting configuration changes.
  • Environment Variables:
    • Removes deprecated environment variable support in compose.full.yaml for POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_HOST, POSTGRES_PORT, and POSTGRES_MAX_CONNECTIONS.
  • Misc:
    • Updates _get_postgres_configuration_settings() in postgres.py to include statement_cache_size.
    • Removes escape_braces() function from database.py.

This description was created by Ellipsis for 1adc227. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 1adc227 in 1 minute and 8 seconds

More details
  • Looked at 202 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_8qPNoSO0bN79TlfO


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

"max_wal_size": "R2R_POSTGRES_MAX_WAL_SIZE",
"max_worker_processes": "R2R_POSTGRES_MAX_WORKER_PROCESSES",
"random_page_cost": "R2R_POSTGRES_RANDOM_PAGE_COST",
"statement_cache_size": "R2R_POSTGRES_STATEMENT_CACHE_SIZE",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding validation for statement_cache_size in the _get_postgres_configuration_settings method to ensure it has a valid value. This will prevent potential issues if the environment variable is not set or if the value is invalid.

@emrgnt-cmplxty emrgnt-cmplxty merged commit 940b81f into main Dec 10, 2024
8 of 30 checks passed
@NolanTrem NolanTrem deleted the Nolan/Supabase branch December 10, 2024 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants