Odyssey – Scalable PostgreSQL connection pooler
1–10 of 42 posts
Re: Odyssey – Scalable PostgreSQL connection pooler
#2that's my biggest issue with pgbouncer, is there a docker image for it?
Re: Odyssey – Scalable PostgreSQL connection pooler
#3Re: Odyssey – Scalable PostgreSQL connection pooler
#4Re: Odyssey – Scalable PostgreSQL connection pooler
#5Would be interesting to have a side by side comparison with PgBouncer
Re: Odyssey – Scalable PostgreSQL connection pooler
#6> Advanced transactional pooling > Odyssey tracks current transaction state and in case of unexpected client disconnection can emit automatic Cancel connection and do Rollback that's my biggest issue with pgbouncer, is there a docker image for it?
i tested this on my local machine and if i drop a connection while it is inside a transaction it closes the server connection.
client close:
2018-05-30 15:28:42.068 21702 LOG C-0x7f9728816a10: DB/USER@[::1]:64342 closing because: client close request (age=85)
2018-05-30 15:28:42.068 21702 LOG S-0x7f972980a190: DB/USER@127.0.0.1:5432 closing because: unclean server (age=85)
client unexpected death: 2018-05-30 15:33:57.197 21702 LOG C-0x7f9728816a10: DB/USER@[::1]:64376 closing because: client unexpected eof (age=15)
2018-05-30 15:33:57.198 21702 LOG S-0x7f972980a190: DB/USER@127.0.0.1:5432 closing because: unclean server (age=10)
i guess it sucks that it doesn't reuse the connection but presumably this shouldn't happen that often that it would actually be a problem.Re: Odyssey – Scalable PostgreSQL connection pooler
#7I often wonder why connections aren't made more lightweight in Postgres, or if there was an option to steal a connection and have a "RESET" command that destroyed all state. In my Postgres library, I have to keep state information too just so I can "reset" a connection. Also maybe the protocol can add a (optionally client supported) PING to check for socket death to know if a connection is stealable.
Re: Odyssey – Scalable PostgreSQL connection pooler
#8I often wonder why connections aren't made more lightweight in Postgres, or if there was an option to steal a connection and have a "RESET" command that destroyed all state. In my Postgres library, I have to keep state information too just so I can "reset" a connection. Also maybe the protocol can add a (optionally client supported) PING to check for socket death to know if a connection is stealable.
Re: Odyssey – Scalable PostgreSQL connection pooler
#9Shameless plug. We have recently forked pgbouncer to add multicore support[0]. We are running in production for couple of weeks and the performance is great.
Our design is very straightforward. Instead of touching the current code, we've extended it by a manager, that spins workers, which are essentially forks of pgbouncer itself (one per core, or whatever you specify in the settings), and then distributes the connections between the clients and the workers. So if you decide not to use the multiprocessing part, you can just turn it off and you will be running the same old pgbouncer you are used to. It also allows for the code to be merged to the original code base without any significant changes.
Re: Odyssey – Scalable PostgreSQL connection pooler
#10I often wonder why connections aren't made more lightweight in Postgres, or if there was an option to steal a connection and have a "RESET" command that destroyed all state. In my Postgres library, I have to keep state information too just so I can "reset" a connection. Also maybe the protocol can add a (optionally client supported) PING to check for socket death to know if a connection is stealable.
That already exists via the "DISCARD" command: https://www.postgresql.org/docs/current/static/sql-discard.h...