Previously I wrote about locating config files.
The thing is – postgresql.conf is not the only place you can set your configuration in.
In here, I'll describe all the places that can be used, why do we even have more than one place, and finally – how to find out where given value comes from.
Continue reading Starting with Pg – where/how can I set configuration parameters?
Ever since PostgreSQL 11 we have JIT (Just-In-Time compilation).
Information about JIT is displayed in explain analyze plans, but up to this moment, explain.depesz.com didn't display it properly. But not anymore. Thanks to release 1.05 of Pg::Explain and subsequent change in templates for the site, you can now see nice JIT info.
Hope you'll find it useful 🙂
Over the years I saw some people find themselves in position where they have to start dealing with PostgreSQL with minimal, or none, prior exposure. This leads to problems with seemingly easy tasks – how to change config? How to find stuff in logs?
So I decided to write some blogposts to be able to point such people to pre-made tutorials.
And I start today, with information on how to find PostgreSQL config files.
Continue reading Starting with Pg – where is the config?
Every so often, on irc, someone asks if they can remove postgres database, and why is it even there.
Figured I can write one blogpost to answer it once and for all, and use it as ready answer whenever the question resurfaces.
Continue reading Why is there database named “postgres"?
On 1st of February 2021, Peter Eisentraut committed patch:
SEARCH and CYCLE clauses
This adds the SQL standard feature that adds the SEARCH and CYCLE
clauses to recursive queries to be able to do produce breadth- or
depth-first search orders and detect cycles. These clauses can be
rewritten into queries using existing syntax, and that is what this
patch does in the rewriter.
Reviewed-by: Vik Fearing <email@example.com>
Reviewed-by: Pavel Stehule <firstname.lastname@example.org>
Continue reading Waiting for PostgreSQL 14 – SEARCH and CYCLE clauses
Couple of days earlier I wrote about tools to run tasks in db at scheduled times.
In writing this I missed pg_cron. So let's look into it now.
Continue reading How to run some tasks without user intervention, at specific times? – part 2
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.