Skip to content

refactor read/write connection pool #240

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

vincentsarago
Copy link
Member

ref #238

@bitner bitner self-requested a review May 14, 2025 15:25
@vincentsarago vincentsarago marked this pull request as ready for review May 14, 2025 15:28

if add_write_connection_pool:
if not write_postgres_settings:
write_postgres_settings = postgres_settings
Copy link
Member Author

Choose a reason for hiding this comment

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

by default we will re-use postgres_settings (either defined by the user or from env)

Copy link
Collaborator

@hrodmn hrodmn left a comment

Choose a reason for hiding this comment

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

The changes look good to me but I just want to note that users will not be able to configure a custom PGHOST for database writes using environment variables anymore. Users will need to have a custom application runtime in order to do that now.

I have a few little suggestions for more friendly backwards compatibility.

@vincentsarago vincentsarago requested a review from hrodmn May 15, 2025 19:29
 into refactor/optional-writer-connection-pool
Comment on lines 56 to 62
postgres_user: postgres username.
postgres_pass: postgres password.
postgres_host_reader: hostname for the reader connection.
postgres_host_writer: hostname for the writer connection.
postgres_host: hostname for the connection.
postgres_port: database port.
postgres_dbname: database name.
use_api_hydrate: perform hydration of stac items within stac-fastapi.
invalid_id_chars: list of characters that are not allowed in item or collection ids.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think these should be pg* instead of postgres_*

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.

3 participants