PG Phriday: Around the World in Two Billion Transactions

Transaction IDs (XID) have been something of a thorn in Postgres’ side since the dawn of time. On one hand, they’re necessary to differentiate tuple visibility between past, present, and concurrent transactions. On the other hand, the counter that stores it is only 32-bits, meaning it’s possible to eventually overflow without some kind of intervention. […]

Optimizing storage of small tables in PostgreSQL 12

The problem If your database has a large number of small tables, you likely have a lot of wasted space. To demonstrate this, let’s create a table with a single record: create table foo (str text); insert into foo values (‘a’); VACUUM foo; Now let’s find out the path of the file containing our data, […]

Buildfarm RSS feed

If you’ve visited almost any web page on the PostgreSQL Build Farm server in the last few days you might have noticed that it is sporting a new RSS feed, of changes in status. This is similar to the information on the buildfarm-status-green-chgs mailing list, except that it has all status changes, not just to […]

Postgres is the coolest database – Reason #1: Developers love it!

PostgreSQL has been my livelihood since 2004 – so I am naturally biased in its favor. I think it is the coolest piece of software on the planet, and I am not alone. DB-Engines See those 2 badges up there? That’s 2 years in a row. DB-Engines monitors a total of 343 databases and their […]

I am Developer! (And You Can Too!)

A while back, 2ndQuadrant notified a few of us that we should get more involved in Postgres Development in some capacity. Being as I’ve essentially fallen off the map in corresponding with the mailing lists in general, it would be a good way to get back into the habit. But wait! Don’t we want more […]

PostgreSQL Buildfarm Client Release 10

Announcing Release 10 of the PostgreSQL Buildfarm client Principal feature: support for non-standard repositories: support multi-element branch names, such as “dev/featurename” or “bug/ticket_number/branchname” provide a get_branches() method in SCM module support regular expression branches of interest. This is matched against the list of available branches prune branches when doing git fetch. This feature and some […]

Postgres-XL and global MVCC

Back to the PG I’m very excited to become a 2ndQuadrant member.  I was involved in PostgreSQL activities in NTT group (Japanese leading ICT company, see here and here), including log shipping replication and PostgreSQL scale out solution as PostgresXC and PostgresXL. At NTT I had several chances to work very closely with 2ndQuadrant.  After three years involvement in deep […]

Where and when you need a root.crt file

This is something people seem to get confused about quite often. A root.crt file is used to validate a TLS (a.k.a. SSL) certificate presented by the other end of a connection. It is usually the public certificate of the Certificate Authority (CA) that signed the presented certificate, and is used to validate that signature. If a non-root […]

Having Group By Clauses — elein’s GeneralBits

Some people go to great lengths to avoid GROUP BY and HAVING clauses in their queries. The error messages are fussy but they are usually right. GROUP BY and HAVING key words are essential for good SQL reporting. The primary reason for GROUP BY is to reduce the number of rows, usually by aggregation. It […]


 LATERAL The primary feature of LATERAL JOIN is to enable access elements of a main query in a subquery which can be very powerful. Several common uses of LATERAL are to: denormalize arrays into parent child tables aggregation across several tables row or action generation. Note, however, that the subquery will execute for each main […]