mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-12-23 22:07:06 +00:00
Remove prepared stmnts from pgsql physical backend
Prepared statements prevent the use of connection multiplexing software such as PGBouncer. Even when PGBouncer is configured for [session mode][1] there's a possibility that a connection to PostgreSQL can be re-used by different clients. This leads to errors when clients use session based features (like prepared statements). This change removes prepared statements from the PostgreSQL physical backend. This will allow vault to successfully work in infrastructures that employ the use of PGBouncer or other connection multiplexing software. [1]: https://pgbouncer.github.io/config.html#poolmode
This commit is contained in:
@@ -32,7 +32,7 @@ func TestPostgreSQLBackend(t *testing.T) {
|
||||
|
||||
defer func() {
|
||||
pg := b.(*PostgreSQLBackend)
|
||||
_, err := pg.client.Exec("DROP TABLE " + pg.table)
|
||||
_, err := pg.client.Exec("TRUNCATE TABLE " + pg.table)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to drop table: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user