https://authzed.com logo
Hello is there anyone using pgbouncer
p

poulpi

01/06/2023, 4:38 PM
Hello, is there anyone using pgbouncer around here? I'm having some errors that seems to come from it + SpiceDB. Like:
2 UNKNOWN: unable to find revision: ERROR: prepared statement \"lrupsc_89_0\" does not exist (SQLSTATE 26000)
l

leonnicolas

03/21/2023, 10:12 AM
yes, we also ran into this using zalando's postgres operator and enabling the connection pooler. This uses pgbouncer. To fix the errors, you can also use a different mode for pgbouncer (when you use zalando's operator)
connectionPooler:
    mode: session
or see https://www.pgbouncer.org/config.html#pool_mode. Otherwise I believe, the pgbouncer cleans up all prepared statements, causing those errors
v

vroldanbet

03/21/2023, 1:33 PM
opened https://github.com/authzed/spicedb/issues/1217 to explore adding pgbouncer tests and documenting configuration, we've honestly not tested it, so thanks @poulpi for reporting and @leonnicolas for sharing your fix!