Skip to content

postgres pgpool holds on to the previously active primary server connection #981

@zipakgow

Description

@zipakgow

Questions

we have F5 VIP for our postgres db, with gtm_monitor set which in realtime points to either the primary or secondary or DR server based on whichever is active.
using the PgPool seems to hold on to the connections to the previously active server and does not discard it.
postgres seems to be specifically returning an error code: 25006
exception message returned to app server (when connections from previous active servers are used): cannot execute INSERT in a read-only transaction
error code: 25006

can there be a method to discard connections from the pool when such error occurs? or this be handled internally?

Version

Which version(s) did you encounter this bug ?
vertx-pg-client: 3.9.7

Do you have a reproducer?

No

Steps to reproduce

Note: application connects to F5 VIP created for postgres

  1. primary server is ACTIVE, secondary server is on STANDBY
  2. APP starts sending requests to db with connection pool size atleast 1
  3. EFM is used on postgres to do the switch over for DB maintainence. This sets secondary server as ACTIVE and primary server to STANDBY.
  4. App continues to send requests, and all the requests fail with error code: 25006 and message: cannot execute INSERT in a read-only transaction

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions