You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that it is working fine. These are the expected logs:
2024-09-17T14:34:08.661921Z INFO ThreadId(01) pgcat: Welcome to PgCat! Meow. (Version 1.1.2-dev4)
2024-09-17T14:34:08.665669Z INFO ThreadId(01) pgcat: Running on 0.0.0.0:6432
2024-09-17T14:34:08.665689Z INFO ThreadId(01) pgcat::config: Config path: pgcat.toml
2024-09-17T14:34:08.665693Z INFO ThreadId(01) pgcat::config: Ban time: 60s
2024-09-17T14:34:08.665697Z INFO ThreadId(01) pgcat::config: Idle client in transaction timeout: 0ms
2024-09-17T14:34:08.665700Z INFO ThreadId(01) pgcat::config: Worker threads: 4
2024-09-17T14:34:08.665703Z INFO ThreadId(01) pgcat::config: Healthcheck timeout: 1000ms
2024-09-17T14:34:08.665706Z INFO ThreadId(01) pgcat::config: Connection timeout: 5000ms
2024-09-17T14:34:08.665709Z INFO ThreadId(01) pgcat::config: Idle timeout: 30000ms
2024-09-17T14:34:08.665712Z INFO ThreadId(01) pgcat::config: Log client connections: false
2024-09-17T14:34:08.665716Z INFO ThreadId(01) pgcat::config: Log client disconnections: false
2024-09-17T14:34:08.665719Z INFO ThreadId(01) pgcat::config: Shutdown timeout: 60000ms
2024-09-17T14:34:08.665722Z INFO ThreadId(01) pgcat::config: Healthcheck delay: 30000ms
2024-09-17T14:34:08.665725Z INFO ThreadId(01) pgcat::config: Default max server lifetime: 86400000ms
2024-09-17T14:34:08.665732Z INFO ThreadId(01) pgcat::config: Sever round robin: true
2024-09-17T14:34:08.665736Z INFO ThreadId(01) pgcat::config: TLS support is disabled
2024-09-17T14:34:08.665740Z INFO ThreadId(01) pgcat::config: Server TLS enabled: true
2024-09-17T14:34:08.665743Z INFO ThreadId(01) pgcat::config: Server TLS certificate verification: false
2024-09-17T14:34:08.665746Z INFO ThreadId(01) pgcat::config: Plugins: not configured
2024-09-17T14:34:08.665750Z INFO ThreadId(01) pgcat::config: [pool: testdb] Maximum user connections: 10000
2024-09-17T14:34:08.665754Z INFO ThreadId(01) pgcat::config: [pool: testdb] Default pool mode: transaction
2024-09-17T14:34:08.665758Z INFO ThreadId(01) pgcat::config: [pool: testdb] Load Balancing mode: Random
2024-09-17T14:34:08.665761Z INFO ThreadId(01) pgcat::config: [pool: testdb] Connection timeout: 5000ms
2024-09-17T14:34:08.665765Z INFO ThreadId(01) pgcat::config: [pool: testdb] Idle timeout: 30000ms
2024-09-17T14:34:08.665769Z INFO ThreadId(01) pgcat::config: [pool: testdb] Sharding function: pg_bigint_hash
2024-09-17T14:34:08.665772Z INFO ThreadId(01) pgcat::config: [pool: testdb] Primary reads: true
2024-09-17T14:34:08.665775Z INFO ThreadId(01) pgcat::config: [pool: testdb] Query router: true
2024-09-17T14:34:08.665779Z INFO ThreadId(01) pgcat::config: [pool: testdb] Query parser max length: None
2024-09-17T14:34:08.665782Z INFO ThreadId(01) pgcat::config: [pool: testdb] Infer role from query: true
2024-09-17T14:34:08.665786Z INFO ThreadId(01) pgcat::config: [pool: testdb] Number of shards: 1
2024-09-17T14:34:08.665789Z INFO ThreadId(01) pgcat::config: [pool: testdb] Number of users: 1
2024-09-17T14:34:08.665793Z INFO ThreadId(01) pgcat::config: [pool: testdb] Max server lifetime: default
2024-09-17T14:34:08.665796Z INFO ThreadId(01) pgcat::config: [pool: testdb] Cleanup server connections: true
2024-09-17T14:34:08.665802Z INFO ThreadId(01) pgcat::config: [pool: testdb] Log client parameter status changes: false
2024-09-17T14:34:08.665806Z INFO ThreadId(01) pgcat::config: [pool: testdb] Prepared statements server cache size: 500
2024-09-17T14:34:08.665810Z INFO ThreadId(01) pgcat::config: [pool: testdb] Plugins: not configured
2024-09-17T14:34:08.665813Z INFO ThreadId(01) pgcat::config: [pool: testdb][user: testdb] Pool size: 10000
2024-09-17T14:34:08.665817Z INFO ThreadId(01) pgcat::config: [pool: testdb][user: testdb] Minimum pool size: 3
2024-09-17T14:34:08.665824Z INFO ThreadId(01) pgcat::config: [pool: testdb][user: testdb] Statement timeout: 0
2024-09-17T14:34:08.665830Z INFO ThreadId(01) pgcat::config: [pool: testdb][user: testdb] Pool mode: transaction
2024-09-17T14:34:08.665836Z INFO ThreadId(01) pgcat::config: [pool: testdb][user: testdb] Max server lifetime: 60000ms
2024-09-17T14:34:08.665841Z INFO ThreadId(01) pgcat::config: [pool: testdb][user: testdb] Connection timeout: not set
2024-09-17T14:34:08.665848Z INFO ThreadId(01) pgcat::config: [pool: testdb][user: testdb] Idle timeout: not set
2024-09-17T14:34:08.666211Z INFO ThreadId(01) pgcat::pool: [pool: testdb][user: testdb] creating new pool
2024-09-17T14:34:08.666316Z INFO ThreadId(01) pgcat::pool: Creating a new server connection Address { id: 0, host: "aurora-primary-db", port: 5432, shard: 0, database: "testdb", role: Primary, replica_number: 0, address_index: 0, username: "testdb", pool_name: "testdb", mirrors: [], stats: AddressStats { total: AddressStatFields { xact_count: 0, query_count: 0, bytes_received: 0, bytes_sent: 0, xact_time: 0, query_time: 0, wait_time: 0, errors: 0 }, current: AddressStatFields { xact_count: 0, query_count: 0, bytes_received: 0, bytes_sent: 0, xact_time: 0, query_time: 0, wait_time: 0, errors: 0 }, averages: AddressStatFields { xact_count: 0, query_count: 0, bytes_received: 0, bytes_sent: 0, xact_time: 0, query_time: 0, wait_time: 0, errors: 0 }, averages_updated: false }, error_count: 0 }
2024-09-17T14:34:08.666707Z INFO ThreadId(01) pgcat::pool: Creating a new server connection Address { id: 0, host: "aurora-primary-db", port: 5432, shard: 0, database: "testdb", role: Primary, replica_number: 0, address_index: 0, username: "testdb", pool_name: "testdb", mirrors: [], stats: AddressStats { total: AddressStatFields { xact_count: 0, query_count: 0, bytes_received: 0, bytes_sent: 0, xact_time: 0, query_time: 0, wait_time: 0, errors: 0 }, current: AddressStatFields { xact_count: 0, query_count: 0, bytes_received: 0, bytes_sent: 0, xact_time: 0, query_time: 0, wait_time: 0, errors: 0 }, averages: AddressStatFields { xact_count: 0, query_count: 0, bytes_received: 0, bytes_sent: 0, xact_time: 0, query_time: 0, wait_time: 0, errors: 0 }, averages_updated: false }, error_count: 0 }
2024-09-17T14:34:08.666830Z INFO ThreadId(01) pgcat::pool: Creating a new server connection Address { id: 0, host: "aurora-primary-db", port: 5432, shard: 0, database: "testdb", role: Primary, replica_number: 0, address_index: 0, username: "testdb", pool_name: "testdb", mirrors: [], stats: AddressStats { total: AddressStatFields { xact_count: 0, query_count: 0, bytes_received: 0, bytes_sent: 0, xact_time: 0, query_time: 0, wait_time: 0, errors: 0 }, current: AddressStatFields { xact_count: 0, query_count: 0, bytes_received: 0, bytes_sent: 0, xact_time: 0, query_time: 0, wait_time: 0, errors: 0 }, averages: AddressStatFields { xact_count: 0, query_count: 0, bytes_received: 0, bytes_sent: 0, xact_time: 0, query_time: 0, wait_time: 0, errors: 0 }, averages_updated: false }, error_count: 0 }
2024-09-17T14:34:08.730908Z INFO ThreadId(01) pgcat: Config autoreloader: disabled
2024-09-17T14:34:08.730967Z INFO ThreadId(01) pgcat: Waiting for clients
2024-09-17T14:34:08.731368Z INFO ThreadId(04) pgcat::stats: Events reporter started
Expected behavior
I would expect that it works even if it can't reach one of the replicas. And if the primary host is not reachable, that it fails over to the replica when it becomes the writer.
Additional context
I am accessing Aurora Postgres RDS Global Database. I am running pgcat on EKS. I changed the auth method to md5 instead of scram. And it works when I only specify one host (the primary one). It does not start when the secondary is not reachable (which is my case at the moment).
The text was updated successfully, but these errors were encountered:
Same problem, no idea how to fix. If one of the servers is unavailable or even if it goes down after the start of PGCat - PGCat stops working. It tries to establish connection to the unavailable server, and after the fail - it discards the external connection at all. I've spend 5 hours trying to fix with no success :(
This behavior is currently by-design but I see the appeal of being able to start the application with a replica being down. I'll mark this issue as a feature request. In the meantime, did you try the validate_config flag in the config? I think you might be able to bypass the startup check if you set validate_config = false in your toml config file.
Description
Pgcat fails to start when one of the servers (replica) is not reachable.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect that it works even if it can't reach one of the replicas. And if the primary host is not reachable, that it fails over to the replica when it becomes the writer.
Configuration
This is the
config.toml
file:Additional context
I am accessing Aurora Postgres RDS Global Database. I am running pgcat on EKS. I changed the auth method to md5 instead of scram. And it works when I only specify one host (the primary one). It does not start when the secondary is not reachable (which is my case at the moment).
The text was updated successfully, but these errors were encountered: