RSSAmplifier

Blog

select * from depesz;

depesz.comRSS feed ↗30 posts

Latest posts

Waiting for PostgreSQL 19 – SQL Property Graph Queries (SQL/PGQ)

On 16th of March 2026, Peter Eisentraut committed patch: SQL Property Graph Queries (SQL/PGQ) Implementation of SQL property graph queries, according to SQL/PGQ standard (ISO/IEC 9075-16:2023). This adds: - GRAPH_TABLE table function for graph pattern matching - DDL commands CREATE/ALTER/DROP PROPERTY GRAPH - several new system catalogs and information schema views - Continue reading "Waiting for…

Waiting for PostgreSQL 20 – Add min() and max() aggregate support for uuid.

On 1st of July 2026, Masahiko Sawada committed patch: Add min() and max() aggregate support for uuid. The uuid type already has a full set of comparison operators and a btree operator class, so it is totally ordered. min() and max() were the only common aggregates missing for it. Add the uuid_larger() and uuid_smaller() Continue reading "Waiting for PostgreSQL 20 Add min() and max() aggregate…

Waiting for PostgreSQL 20 – Add backend-level lock statistics

On 30th of June 2026, Michael Paquier committed patch: Add backend-level lock statistics This commit adds per-backend lock statistics, providing the same information as pg_stat_lock. It is now possible to retrieve those stats (lock wait counts, wait times, and fast-path exceeded count) on a per-backend basis. This data can be retrieved with a Continue reading "Waiting for PostgreSQL 20 Add…

Posting explains from tools (and not web browsers)

Some time ago (well, a month ago) someone called zam6ak reached to me and asked about extraction of delete_key from plans posted using tool, and not website. Specifically they were doing something like: curl --silent --include \ --request 'POST' 'https://explain.depesz.com/' \ --data-urlencode 'title=sample' \ --data-urlencode 'plan@sample-plan.txt' \ --data-urlencode 'query@sample-query.sql' \…

Polish configuration for TSearch

Some time ago someone posted on Reddit that they have problems adding Polish configuration to their PostgreSQL. While checking it, I found some interesting news. And of course figured out how to have Polish configuration… First, the news: apparently in PostgreSQL 19, we will automatically get Polish dictionary, thanks to this commit from 5th of Continue reading "Polish configuration for TSearch"

Waiting for PostgreSQL 19 – Add CONCURRENTLY option to REPACK

On 6th of April 2026, Álvaro Herrera committed patch: Add CONCURRENTLY option to REPACK When this flag is specified, REPACK no longer acquires access-exclusive lock while the new copy of the table is being created; instead, it creates the initial copy under share-update-exclusive lock only (same as vacuum, etc), and it follows an MVCC Continue reading "Waiting for PostgreSQL 19 Add CONCURRENTLY…

Waiting for PostgreSQL 19 – Online enabling and disabling of data checksums

On 3rd of April 2026, Daniel Gustafsson committed patch: Online enabling and disabling of data checksums This allows data checksums to be enabled, or disabled, in a running cluster without restricting access to the cluster during processing. Data checksums could prior to this only be enabled during initdb or when the cluster is Continue reading "Waiting for PostgreSQL 19 Online enabling and…

Waiting for PostgreSQL 19 – new pg_get_*_ddl() functions

On 5th of April 2026, Andrew Dunstan committed patch: Add pg_get_database_ddl() function Add a new SQL-callable function that returns the DDL statements needed to recreate a database. It takes a regdatabase argument and an optional VARIADIC text argument for options that are specified as alternating name/value pairs. The following options are supported: pretty (boolean) Continue reading "Waiting…

Waiting for PostgreSQL 19 – Add UPDATE/DELETE FOR PORTION OF

On 1st of April 2026, Peter Eisentraut committed patch: Add UPDATE/DELETE FOR PORTION OF This is an extension of the UPDATE and DELETE commands to do a 'temporal update/delete' based on a range or multirange column. The user can say UPDATE t FOR PORTION OF valid_at FROM '2001-01-01' TO '2002-01-01' SET ... (or likewise Continue reading "Waiting for PostgreSQL 19 Add UPDATE/DELETE FOR PORTION OF"

Waiting for PostgreSQL 19 – json format for COPY TO

On 20th of March 2026, Andrew Dunstan committed patch: json format for COPY TO This introduces the JSON format option for the COPY TO command, allowing users to export query results or table data directly as a stream of JSON objects (one per line, NDJSON style). The JSON format is currently supported only Continue reading "Waiting for PostgreSQL 19 json format for COPY TO"

Waiting for PostgreSQL 19 – Add support for EXCEPT TABLE in ALTER PUBLICATION.

On 20th of March 2026, Amit Kapila committed patch: Add support for EXCEPT TABLE in ALTER PUBLICATION. Following commit fd366065e0, which added EXCEPT TABLE support to CREATE PUBLICATION, this commit extends ALTER PUBLICATION to allow modifying the exclusion list. New Syntax: ALTER PUBLICATION name SET publication_all_object [, ... ] where publication_all_object is Continue reading "Waiting for…

Waiting for PostgreSQL 19 – Add pg_plan_advice contrib module.

On 12nd of March 2026, Robert Haas committed patch: Add pg_plan_advice contrib module. Provide a facility that (1) can be used to stabilize certain plan choices so that the planner cannot reverse course without authorization and (2) can be used by knowledgeable users to insist on plan choices contrary to what the planner believes Continue reading "Waiting for PostgreSQL 19 Add pg_plan_advice…

Waiting for PostgreSQL 19 – Introduce the REPACK command

On 10th of March 2026, Álvaro Herrera committed patch: Introduce the REPACK command REPACK absorbs the functionality of VACUUM FULL and CLUSTER in a single command. Because this functionality is completely different from regular VACUUM, having it separate from VACUUM makes it easier for users to understand; as for CLUSTER, the term is heavily Continue reading "Waiting for PostgreSQL 19 Introduce…

Waiting for PostgreSQL 19 – Allow table exclusions in publications via EXCEPT TABLE.

On 4th of March 2026, Amit Kapila committed patch: Allow table exclusions in publications via EXCEPT TABLE. Extend CREATE PUBLICATION ... FOR ALL TABLES to support the EXCEPT TABLE syntax. This allows one or more tables to be excluded. The publisher will not send the data of excluded tables to the subscriber. To Continue reading "Waiting for PostgreSQL 19 Allow table exclusions in publications via…

Waiting for PostgreSQL 19 – Add non-text output formats to pg_dumpall

On 26th of February 2026, Andrew Dunstan committed patch: Add non-text output formats to pg_dumpall pg_dumpall can now produce output in custom, directory, or tar formats in addition to plain text SQL scripts. When using non-text formats, pg_dumpall creates a directory containing: - toc.glo: global data (roles and tablespaces) in custom format - map.dat: Continue reading "Waiting for PostgreSQL 19…

Waiting for PostgreSQL 19 – Allow log_min_messages to be set per process type

On 9th of February 2026, Álvaro Herrera committed patch: Allow log_min_messages to be set per process type Change log_min_messages from being a single element to a comma-separated list of type:level elements, with 'type' representing a process type, and 'level' being a log level to use for that type of process. The list must also Continue reading "Waiting for PostgreSQL 19 Allow log_min_messages…

Waiting for PostgreSQL 19 – psql: Add %i prompt escape to indicate hot standby status.

On 3rd of February 2026, Fujii Masao committed patch: psql: Add %i prompt escape to indicate hot standby status. This commit introduces a new prompt escape %i for psql, which shows whether the connected server is operating in hot standby mode. It expands to standby if the server reports in_hot_standby = on, and primary Continue reading "Waiting for PostgreSQL 19 psql: Add %i prompt escape to…

Per-worker, and global, IO bandwidth in explain plans

Jeremy Schneider suggested a change to how plans are displayed adding another bit of information in case we have timing information for IO for explain node. Took me a while to research, but it finally made it's way… Let's consider this simple plan. In it's Parallel Seq Scan node we see: - Parallel Seq Continue reading "Per-worker, and global, IO bandwidth in explain plans"

How to render timestamp with a timezone that is different from current?

This question appeared on IRC, and while I wasn't there while it happened, it caught my eye: » Can I not render this with timezone offset: select 2026-01-09 04:35:46.9824-08'::timestamp with time zone at time zone UTC'; » Returns 2026-01-09 12:35:46.9824' which is without the offset. Let's see what can be done about it. First, let's Continue reading "How to render timestamp with a timezone that is…

Quick and dirty loading of CSV files

Back in September 2025, David Fetter asked on IRC, about a tool to quickly load CSV to database. One that would require minimal configuration, will try to figure out as much as possible on its own. I thought that it would be great idea. Plus, I'm trying to learn more JavaScript / Node, so figured Continue reading "Quick and dirty loading of CSV files"

Small improvement for pretty-printing in paste.depesz.com

As you maybe know, some time ago I made paste service, mostly to use for queries, or related text to share on IRC. One part of it is that it also has pretty printer of provided queries. Recently I realized that in case of complex join conditions, the output is, well, sub-optimal. For example: SELECT Continue reading "Small improvement for pretty-printing in paste.depesz.com"

What is index overhead on writes?

One of things people learn is that adding indexes isn't free. All write operations (insert, update, delete) will be slower well, they have to update index. But realistically how much slower? Full tests should involve lots of operations, on realistic data, but I just wanted to see some basic info. So I figured Continue reading "What is index overhead on writes?"

Waiting for PostgreSQL 19 – Implement ALTER TABLE … MERGE/SPLIT PARTITIONS … command

On 14th of December 2025, Alexander Korotkov committed patch: Implement ALTER TABLE ... MERGE PARTITIONS ... command This new DDL command merges several partitions into a single partition of the target table. The target partition is created using the new createPartitionTable() function with the parent partition as the template. This commit comprises a Continue reading "Waiting for PostgreSQL 19…

Using JSON: json vs. jsonb, pglz vs. lz4, key optimization, parsing speed?

Recently(ish) I had a conversation on one of PostgreSQL support chats (IRC, Slack, or Discord) about efficient storage of JSON data, which compression to use, which datatype. Unrelated to this, some people (at least two over the last year or so) said that they aren't sure if PostgreSQL doesn't optimize storage between columns, for example, Continue reading "Using JSON: json vs. jsonb, pglz vs.…

Waiting for PostgreSQL 19 – Sequence synchronization in logical replication.

First, on 9th of October 2025, Amit Kapila committed patch: Add 'ALL SEQUENCES' support to publications. This patch adds support for the ALL SEQUENCES clause in publications, enabling synchronization/replication of all sequences that is useful for upgrades. Publications can now include all sequences via FOR ALL SEQUENCES. psql enhancements: \d shows publications for Continue reading "Waiting for…

Do you really need tsvector column?

When using tsearch one usually, often, creates a tsvector column to put data in, and then create index on it. But, do you really need the index? I wrote once already that you don't have to, but then a person talked with me on IRC, and pointed this section of docs: One advantage of the Continue reading "Do you really need tsvector column?"

Waiting for PostgreSQL 19 – Add psql PROMPT variable for search_path.

On 28th of October 2025, Nathan Bossart committed patch: Add psql PROMPT variable for search_path. The new %S substitution shows the current value of search_path. Note that this only works when connected to Postgres v18 or newer, since search_path was first marked as GUC_REPORT in commit 28a1121fd9. On older versions that don't report search_path, Continue reading "Waiting for PostgreSQL 19 Add…

Waiting for PostgreSQL 19 – Support COPY TO for partitioned tables.

On 20th of October 2025, Masahiko Sawada committed patch: Support COPY TO for partitioned tables. Previously, COPY TO command didn't support directly specifying partitioned tables so users had to use COPY (SELECT ...) TO variant. This commit adds direct COPY TO support for partitioned tables, improving both usability and performance. Performance tests show Continue reading "Waiting for PostgreSQL…

Waiting for PostgreSQL 19 – Add IGNORE NULLS/RESPECT NULLS option to Window functions.

On 3rd of October 2025, Tatsuo Ishii committed patch: Add IGNORE NULLS/RESPECT NULLS option to Window functions. Add IGNORE NULLS/RESPECT NULLS option (null treatment clause) to lead, lag, first_value, last_value and nth_value window functions. If unspecified, the default is RESPECT NULLS which includes NULL values in any result calculation. IGNORE NULLS ignores NULL values. Continue reading…

Waiting for PostgreSQL 19 – Add GROUP BY ALL.

Important update It seems that it has been rolled back in this commit. On 29th of September 2025, Tom Lane committed patch: Add GROUP BY ALL. GROUP BY ALL is a form of GROUP BY that adds any TargetExpr that does not contain an aggregate or window function into the groupClause of the query, Continue reading "Waiting for PostgreSQL 19 Add GROUP BY ALL."