PostgreSQL

PostgreSQL

All Your GUCs in a Row: gin_fuzzy_search_limit

The name is misleading twice over. It has nothing to do with fuzzy matching, the trigram-similarity, close-enough-spelling sense that people reach for pg_trgm to get. And it is not really a search limit either. The fuzziness is in the size of the result set, and what this parameter actually does is instruct PostgreSQL to give you fewer rows than match

All Your GUCs in a Row: The geqo Family

Seven parameters, one feature, and a reasonable goal of never using any of them.

geqo, geqo_threshold, geqo_effort, geqo_pool_size, geqo_generations, geqo_selection_bias, and geqo_seed all configure the Genetic Query Optimizer, an alternative join-order search that PostgreSQL falls back to when a query has too many relations for the regular planner to handle exhaustively. All seven

All Your GUCs in a Row: full_page_writes

full_page_writes is a boolean, it defaults to on, and its context is sighup, set in postgresql.conf or on the command line. It is the reason crash recovery works at all, and it is also the reason your WAL graph has a sawtooth in it.

All Your GUCs in a Row: fsync

fsync is a boolean, it defaults to on, and its context is sighup, so it can be changed with a configuration reload rather than a restart. It is also the most dangerous setting in postgresql.conf. Most of the parameters in this series, set wrong, cost you a bad plan or some wasted memory. This one, set wrong,

All Your GUCs in a Row: from_collapse_limit

Almost nobody writes the query shape this parameter governs:

1SELECT * FROM x, y, (SELECT * FROM a, b, c WHERE something) AS ss
2WHERE somethingelse;

But you produce it constantly without meaning to. Reference a view that contains a join and the view’s definition is inserted in place of the reference, leaving the

All Your GUCs in a Row: file_extend_method

file_extend_method is an escape hatch wearing the costume of a tuning knob. It exists for one purpose: to let you turn off a PostgreSQL 16 optimization on the filesystems where that optimization turned out to misbehave.

When a table grows, PostgreSQL has to extend its data file, and there are two ways to do that. posix_fallocate asks the operating

All Your GUCs in a Row: file_copy_method

file_copy_method is a two-value enum with a wildly disproportionate payoff. One of its settings makes copying a database take about the same fraction of a second whether the database is one gigabyte or one terabyte. The other is the way PostgreSQL has always done it. The enum is new in PostgreSQL 18, and the interesting value is clone.

All Your GUCs in a Row: extra_float_digits

extra_float_digits is the setting whose job changed out from under it. For most of PostgreSQL’s history it forced a choice between floating-point output that was easy to read and output that was exactly right, and you could not have both. Since PostgreSQL 12 you no longer have to choose, which is why the parameter you may remember reaching for is

All Your GUCs in a Row: external_pid_file

PostgreSQL already writes a PID file. Every time the postmaster starts, it drops postmaster.pid into the data directory and removes it on a clean shutdown. That file is the lock that stops a second postmaster from starting on the same data directory, and it carries eight lines of running-instance detail, the PID, the data directory, the start time, the port,

All Your GUCs in a Row: extension_control_path

For the whole of PostgreSQL’s history until now, an extension had to live in exactly one place. CREATE EXTENSION foo read foo.control from the compiled-in extension directory, the one pg_config --sharedir points at, and it looked nowhere else. If you wanted an extension available, its files had to be in that directory, which in practice meant installed as root into