PostgreSQL

PostgreSQL

All Your GUCs in a Row: port

Most people first read this parameter’s value in an error message that has no TCP in it:

1psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
2 Is the server running locally and accepting connections on that socket?

The 5432 on the end of that file name is port.

The Patch Is Coming From Inside the House

On August 25, Robert Haas opened a pgsql-hackers thread like this:

I asked Claude to evaluate which v19 patches were the scariest based on the number and type of bugs fixed post-freeze. Results below, with a few particularly cutting remarks from the LLM edited out.

The subject line was “scary patch contest.” Six patches made the

All Your GUCs in a Row: plan_cache_mode

plan_cache_mode is the override for a decision PostgreSQL makes on your behalf, from estimates alone, the sixth time a prepared statement runs. I spent eighteen minutes of your time on that decision in The Sixth Execution and will not repeat it here. The short version: a prepared statement can run with a custom plan, built for the parameter values

All Your GUCs in a Row: password_encryption

password_encryption was a boolean from 7.2 through 9.6, and the question it answered was whether PostgreSQL should hash a new password or store it exactly as typed. In 7.2 the default was off. That is where the name comes from, and why a parameter that has never encrypted anything is still called this. PostgreSQL 10 removed the option of

All Your GUCs in a Row: parallel_setup_cost and parallel_tuple_cost

Nearly everything in the planner’s model of parallel query is a discount: the rows are divided among the processes, and the CPU cost is divided along with them. parallel_setup_cost and parallel_tuple_cost are the two settings that charge something for going parallel. The first is a flat fee for each Gather node; the second is a fee for each row that

All Your GUCs in a Row: parallel_leader_participation

max_parallel_workers_per_gather = 2 gets you three processes. The third is the backend your client is connected to, the leader, which launches the two workers and then, instead of waiting for them, runs its own copy of the same plan. parallel_leader_participation decides whether it does that. It is a boolean, the default is on, the context is user (any

Portions Copyright

In October 2014, a developer wrote to a PostgreSQL mailing list with a problem. His employer’s open source office required a signed contributor license agreement before he could contribute, and he could not find PostgreSQL’s. Tom Lane answered:

There are no such agreements for Postgres work. The community explicitly rejected the idea more than a dozen years

All Your GUCs in a Row: array_nulls (Special Update)

Errata: the July post on escape_string_warning said to leave that parameter on. It was removed in PostgreSQL 19, by a commit that predates the post by almost six months. The audit at the end of this post covers it.

This series covered array_nulls in April, sorted the applications that still need it into extinct, museum pieces, and things running

The International Ice Patrol

On September 30, AWS announced that Aurora PostgreSQL can now query Apache Iceberg and Parquet data directly. That brings the number of things a vendor might mean by “Postgres reads Iceberg” to at least four, and they have about as much in common as the four things a vendor might mean by “serverless.”

The four: Aurora’s new

All Your GUCs in a Row: num_os_semaphores

num_os_semaphores exists because the PostgreSQL documentation kept getting an addition problem wrong, on and off, for twelve years. It is a preset: context internal, read-only, new in PostgreSQL 18. It reports how many operating-system semaphores the server asks for at startup, and on a default 18 installation the answer is 174.

If you run PostgreSQL on