Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wZUth-0015Q9-11 for pgsql-announce@arkaria.postgresql.org; Tue, 16 Jun 2026 14:36:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wZUte-000RDB-35 for pgsql-announce@arkaria.postgresql.org; Tue, 16 Jun 2026 14:36:10 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wZUtd-000RC5-2H for pgsql-announce@lists.postgresql.org; Tue, 16 Jun 2026 14:36:09 +0000 Received: from mahout.postgresql.org ([2001:4800:3e1:1::227]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wZUta-00000000kOF-4B3W for pgsql-announce@lists.postgresql.org; Tue, 16 Jun 2026 14:36:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Message-ID:Date:Reply-To:From:To:Subject: MIME-Version:Content-Type:Sender:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:In-Reply-To:References; bh=rpV7Y2I5iv7itQOVHezVilzZvACKpgSamO4SNIHYLCY=; b=pUhI9m1xcZna7HHzLwX8dkF2xK V70Ysfih7rxdGtcUUv/NdpTIJN6bEhA6YhmuymZ30p7kesBJ5kXvp4fG6xKZvIRTSBrc0Cj0n+Ms8 090f+GygeVPs7XWJIPwAwckuxejFd9fB+pLneWI+SrXdwvU+M0SXHpjUvWN60eUWZ36Lyr3M6oEFC 5mWDfRZdCS230A4aq1TNfBzWJya/nQjs5PYdTkE53ma/9gfW5QlQvRJ0Up3kZnYxs8PB6hly1xAYX MHbkcTGlNJ59EyKIToyM5aWsCCQfoiTdAeJhJj8nTada5YOr34TZ0FgN4EEGXZBCaNm0AZsjsOUu5 FeHWerAg==; Received: from wrigleys.postgresql.org ([217.196.149.60]) by mahout.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wZUtY-0021Mn-2g for pgsql-announce@lists.postgresql.org; Tue, 16 Jun 2026 14:36:05 +0000 Received: from localhost ([127.0.0.1] helo=wrigleys.postgresql.org) by wrigleys.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wZUtX-004Ak4-0f for pgsql-announce@lists.postgresql.org; Tue, 16 Jun 2026 14:36:03 +0000 Content-Type: multipart/alternative; boundary="===============8116911421770277312==" MIME-Version: 1.0 Subject: pg_kpart version 1.0 To: PostgreSQL Announce From: HexaCluster via PostgreSQL Announce Reply-To: gilles@hexacluster.ai Date: Tue, 16 Jun 2026 14:35:58 +0000 Message-ID: <178162055878.768.14334066630452471663@wrigleys.postgresql.org> X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-pglister-tags: related X-pglister-tagsig: cdec5f75ba52c5efda8d0d4a00cc6f8268174438be5b658f58a31bb268cb9aca List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --===============8116911421770277312== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Bangkok, Thailand - June 12, 2026 ## pg_kpart - Reject queries that scan all partitions without using the par= tition key `pg_kpart` is a PostgreSQL extension that rejects queries which would scan = every partition of a partitioned table without a usable predicate on the pa= rtition key. It prevents accidental full-hierarchy scans caused by missing = WHERE/JOIN conditions on the partition key. As a DBA, you have almost certainly run into queries that hit a partitioned= table without using the partition key. On tables holding hundreds of milli= ons or billions of rows, it is a disaster: PostgreSQL has no choice but to = scan every partition, the server's I/O subsystem saturates, and overall per= formance collapses for everyone connected to the instance. The rule it enforces is simple: if a query against a protected partitioned = table cannot prune *any* partitions, it is not allowed to run. The author g= ets a clear error instead of a server-wide I/O storm, and the query has to = be rewritten to filter on the partition key =E2=80=94 which is exactly the = access pattern partitioning is meant to encourage. `pg_kpart` turns "please always filter on the partition key" from a fragile= convention that depends on every developer remembering it into a guarantee= enforced by the database itself. With an audit mode to ease the rollout, b= lacklist/whitelist scoping to target exactly the tables that matter, and a = dedicated SQLSTATE so applications can react to violations cleanly, it slot= s neatly into a production workflow. If you run large partitioned tables an= d you would rather not be at the mercy of the next query that forgets the p= artition key, this extension is for you. See this blog post for more information: [https://hexacluster.ai/blog/pg-kp= art-postgresql-extension](https://hexacluster.ai/blog/pg-kpart-postgresql-e= xtension) ## Links & Credits pg_kpart is an open project. Any contribution to build a better tool is welcome. You just have to send your ideas, features requests or patches using the GitHub tools. Thank to the developers who submitted patches and users who reported bugs and feature requests, they are all cited in the ChangeLog file. Links: * Documentation: [https://github.com/HexaCluster/pg_kpart/blob/main/README.= md](https://github.com/HexaCluster/pg_kpart/blob/main/README.md) * Download: [https://github.com/hexacluster/pg_kpart/releases](https://gith= ub.com/hexacluster/pg_kpart/releases) * Development: [https://github.com/hexacluster/pg_kpart](https://github.com= /hexacluster/pg_kpart) * Changelog: [https://github.com/hexacluster/pg_kpart/blob/master/ChangeLog= ]([https://github.com/hexacluster/pg_kpart/blob/master/ChangeLog) ----------------- **About pg_kpart** The objective of pg_kpart is to have a tool to help PostgreSQL DBAs to enforce the correct use of PostgreSQL partitioning.=20 Tool created at HexaCluster Corp and maintained by Gilles Darold. pg_kpart works on Linux platform and is available under the PostgreSQL lice= nse. --===============8116911421770277312== Content-Type: text/html; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable pg_kpart version 1.0
 

pg_kpart version 1.0

Bangkok, Thailand - June 12, 2026

pg_kpart - Reject queries that = scan all partitions without using the partition key

pg_kpart is a PostgreSQL exten= sion that rejects queries which would scan every partition of a partitioned= table without a usable predicate on the partition key. It prevents acciden= tal full-hierarchy scans caused by missing WHERE/JOIN conditions on the par= tition key.

As a DBA, you have almost certainly run int= o queries that hit a partitioned table without using the partition key. On = tables holding hundreds of millions or billions of rows, it is a disaster: = PostgreSQL has no choice but to scan every partition, the server's I/O subs= ystem saturates, and overall performance collapses for everyone connected t= o the instance.

The rule it enforces is simple: if a query = against a protected partitioned table cannot prune any partitions,= it is not allowed to run. The author gets a clear error instead of a serve= r-wide I/O storm, and the query has to be rewritten to filter on the partit= ion key =E2=80=94 which is exactly the access pattern partitioning is meant= to encourage.

pg_kpart turns "please always = filter on the partition key" from a fragile convention that depends on ever= y developer remembering it into a guarantee enforced by the database itself= . With an audit mode to ease the rollout, blacklist/whitelist scoping to ta= rget exactly the tables that matter, and a dedicated SQLSTATE so applicatio= ns can react to violations cleanly, it slots neatly into a production workf= low. If you run large partitioned tables and you would rather not be at the= mercy of the next query that forgets the partition key, this extension is = for you.

See this blog post for more information: https://hexacluster.ai/blog= /pg-kpart-postgresql-extension

Links & Credits

pg_kpart is an open project. Any contributi= on to build a better tool is welcome. You just have to send your ideas, features requests or patches using the GitHub tools.

Thank to the developers who submitted patch= es and users who reported bugs and feature requests, they are all cited in the ChangeLog file.

Links:


About pg_kpart

The objective of pg_kpart is to have a tool= to help PostgreSQL DBAs to enforce the correct use of PostgreSQL partitioning.

Tool created at HexaCluster Corp and mainta= ined by Gilles Darold.

pg_kpart works on Linux platform and is ava= ilable under the PostgreSQL license.

This email was sent to you from HexaCluster. It was delivered on their beha= lf by the PostgreSQL project. Any questions about the content of the message shou= ld be sent to HexaCluster.

You were sent this email as a subscriber of the pgsql-announce mai= linglist, for the content tag Related Open Source. To unsubscribe from further emails, or change which emails you want to receive, please click th= e personal unsubscribe link that you can find in the headers of this email, or visit https://lists.postgresql.org/unsubscribe/.
 
--===============8116911421770277312==--