On 17th of January 2021, Magnus Hagander committed patch:
Add pg_stat_database counters for sessions and session time
This add counters for number of sessions, the different kind of session
termination types, and timers for how much time is spent in active vs
idle in a database to pg_stat_database.
Internally this also renames the parameter "force" to disconnect. This
was the only use-case for the parameter before, so repurposing it to
this mroe narrow usecase makes things cleaner than inventing something
Author: Laurenz Albe
Reviewed-By: Magnus Hagander, Soumyadeep Chakraborty, Masahiro Ikeda
Continue reading Waiting for PostgreSQL 14 – Add pg_stat_database counters for sessions and session time
A while ago someone wrote on irc that PostgreSQL has built in hard limit to number of partitions. This tweet was linked as a source of this information.
Decided to check it.
Continue reading Are there limits to partition counts?
Every now and then someone complains (me included) that PostgreSQL doesn't have job scheduler.
This is true, to some extent. I'll try to show you couple of approaches to solving this particular problem.
Continue reading How to run some tasks without user intervention, at specific times?
On 6th of January 2021, Tom Lane committed patch:
This GUC variable works much like idle_in_transaction_session_timeout,
in that it kills sessions that have waited too long for a new client
query. But it applies when we're not in a transaction, rather than
when we are.
Li Japin, reviewed by David Johnston and Hayato Kuroda, some
fixes by me
Continue reading Waiting for PostgreSQL 14 – Add idle_session_timeout.
On 6th of January 2021, Tomas Vondra committed patch:
Report progress of COPY commands
This commit introduces a view pg_stat_progress_copy, reporting progress
of COPY commands. This allows rough estimates how far a running COPY
progressed, with the caveat that the total number of bytes may not be
available in some cases (e.g. when the input comes from the client).
Author: Josef Šimánek
Reviewed-by: Fujii Masao, Bharath Rupireddy, Vignesh C, Matthias van de Meent
Continue reading Waiting for PostgreSQL 14 – Report progress of COPY commands
A bit ago I wrote a blog post that was supposed to show how to keep number of rows in table to N per some category.
Unfortunately, I overlooked a problem related to concurrency.
Continue reading How to limit rows to at most N per category – fix
In case you're not familiar with this site, why-upgrade.depesz.com shows you aggregated changelog between any two releases, with optionally searching for some keywords.
Yesterday azeem on irc pointed me towards a problem on why-upgrade.depesz.com. Specifically, when displaying changes from 9.5.24 to 13.1 site showed 30 security fixes. But in reality there should be only 10.
Continue reading Fixes on why-upgrade.depesz.com
In my work I'm often in situation where I want to restart remote server, and then immediately connect to it over ssh.
This can be done by repeating ssh HOST in shell, but it gets tedious.
Continue reading Reconnecting to SSH servers
In previous post I showed how I'd install PostgreSQL for developer.
But that's not all. Now we need to add some configuration. What, how, where?
Continue reading How to install and configure PostgreSQL Debian/Ubuntu – for developer use – part 2
Recently I spent some time thinking about what can be improved when it comes to helping new users start using PostgreSQL.
One thing that almost immediately jumped to my mind is – how to install PostgreSQL? The task is theoretically simple. But there are always some caveats – which packages to use, what to configure in the beginning, where to find config files and logs.
With that in mind I decided to write a howto based on my ideas on what is right. These do not necessarily mean that these are the best for everybody, but I think this is a good start for anyone wanting to start their adventure with PostgreSQL.
Final note of warning – this post is for installing and setting PostgreSQL on developer workstation. As in: server where user can do anything, and we don't really care about security. Please do not configure production servers using this howto.
Continue reading How to install and configure PostgreSQL Debian/Ubuntu – for developer use – part 1