At a company we have literally thousands of Pg servers. The layout is also kinda non-obvious. Each database is named the same, but contains different data. And in front of it all, we have pgbouncers.
After some talk, it was suggested that perhaps we could make psql prompt show which database it is connected to. And perhaps some more information, like backend pid. I thought it will be simple…
Continue reading A tale of making company-wide standard psqlrc
On 7th of July, Andres Freund committed patch:
Add psql PROMPT variable showing the pid of the connected to backend.
The substitution for the pid is %p.
Author: Julien Rouhaud
Discussion: <a href="http://git.postgresql.org/gitweb/?p=postgresql.git;a=object;h=116262CF971C844FB6E793F8809B51C6E99D48">116262CF971C844FB6E793F8809B51C6E99D48</a>@BPXM02GP.gisp.nec.co.jp
Continue reading Waiting for 9.6 – Add psql PROMPT variable showing the pid of the connected to backend.
One of my clients is upgrading some servers. The procedure we have took some time to get to current state, and we found some potential problems, so decided to write more about it.
Continue reading How to pg_upgrade …
Some of you might be familiar with pgBouncer project. Some are not. Some understand what/how/why it does, others do not.
This blog post is to have a place where I can point people who have question about how it works, why, and when it makes sense to use it (pgBouncer that is).
Continue reading What is the point of bouncing?
As you perhaps know I'm fan of pgbouncer – connection pooling solution for PostgreSQL.
It can do many really cool things, but has one slight issue.
Since it can reuse connections – it has to provide a way to check if user supplied password is correct without consulting database. And it lately (since 9.0 to be exact) became somewhat of a problem.
Continue reading Auto refreshing password file for pgbouncer