commanded / eventstore

Event store using PostgreSQL for persistence
MIT License
1.05k stars 146 forks source link

Add option to use Eventstore with PGBouncer #249

Closed esse closed 2 years ago

esse commented 2 years ago

When using PGBouncer - we have three modes to choose: SESSION, TRANSACTION and STATEMENT.

Out of this three - only when in SESSION mode, we can use LISTEN. On the other other hand, using TRANSACTION mode makes scaling way easier.

This PR adds option to provide arbitrary configuration for notifications and locks, which will open two connections (using given url), allowing to use regular Postgres connection with TRANSACTION mode and only these two (which are needed) in SESSION mode.

esse commented 2 years ago

bump

esse commented 2 years ago

hey @slashdotdash, any chance for a review / merge?

slashdotdash commented 2 years ago

Thanks for the pull request Piotr.