<feed xmlns='http://www.w3.org/2005/Atom'>
<title>postgresql.git/src/include/catalog, branch master</title>
<subtitle>This is the main PostgreSQL git repository.</subtitle>
<id>http://git.postgresql.org/cgit/postgresql.git/atom?h=master</id>
<link rel='self' href='http://git.postgresql.org/cgit/postgresql.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/'/>
<updated>2026-09-15T15:19:13Z</updated>
<entry>
<title>Add slot-based table AM index scan interface.</title>
<updated>2026-09-15T15:19:13Z</updated>
<author>
<name>Peter Geoghegan</name>
</author>
<published>2026-09-15T15:19:13Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=ddce1da5b1b1b4672e621c0da245e01474cbd4e8'/>
<id>urn:sha1:ddce1da5b1b1b4672e621c0da245e01474cbd4e8</id>
<content type='text'>
Add table_index_getnext_slot, a new table AM interface that serves as
the single entry point for both plain and index-only index scans that
use amgettuple.  The table AM's index_scan_begin callback resolves which
implementation the scan will use and stores it in an IndexScanDesc
function pointer (xs_getnext_slot), which table_index_getnext_slot
dispatches through.

The interface intentionally avoids using fixed TableAmRoutine members,
allowing the table AM to dynamically register an implementation based on
conditions known at the start of each scan.  That way a table AM can
provide specialized variants that help the compiler produce more
efficient code.  heapam provides two implementations: one for plain
index scans, and one for index-only scans.  An upcoming commit that adds
the amgetbatch interface will add two more.  (Table AMs can opt to
provide a single generic implementation, or to provide many specialized
implementations, as requirements dictate.)

heapam's xs_getnext_slot implementations make aggressive use of forced
inlining to ensure that plain and index-only code paths are fully
specialized at compile time, without duplicating the code they have in
common.  This specialization is necessary to keep icache and iTLB
pressure to a minimum.

The new interface moves visibility map checks required by index-only
scans out of the executor (and selfuncs.c) and into heapam, enabling
batching of visibility map lookups (though for now we continue to just
perform retail lookups).  Using the new higher level slot-based
interface greatly simplifies nodeIndexonlyscan.c, which no longer has to
deal with the visibility map directly.  More importantly, this is a
significant architectural improvement: table AMs can now implement
index-only scans that are not tied to heapam's visibility map.

Two users of the now removed table_index_fetch_tuple interface,
_bt_check_unique and unique_key_recheck, fundamentally need to pass a
TID to the table AM to perform constraint enforcement.  Neither actually
performs an index scan (even though their TIDs are taken from an index),
so neither has any use for most of the index scan machinery.  Switch
these callers over to fetch_tid, a new special-purpose table AM
interface for constraint enforcement code.  All true index scan callers
now use the new slot-based interface.  (Note that fetch_tid doesn't
perform on-access pruning, which matches how things worked prior to
Postgres 12 commits c2fe139c2 and 71bdc99d0.)

The VISITED_PAGES_LIMIT mechanism used by get_actual_variable_range to
cap scan overhead during planning is reworked to go through a new scan
descriptor field (xs_visited_pages_limit), rather than having selfuncs.c
count heap page fetches and terminate the scan itself.  This is
necessary because callers that use the new slot-based interface no
longer have direct access to which heap blocks were fetched.  Similarly,
nodeIndexonlyscan.c can no longer use InstrCountTuples2 to count heap
fetches during an EXPLAIN ANALYZE.  EXPLAIN ANALYZE now obtains this
information from a new IndexScanInstrumentation field, which table AMs
are required to maintain during index-only scans.

Though independently useful, this commit is preparatory work for an
upcoming commit that will add an amgetbatch index AM interface, where
the table AM takes full responsibility for managing the progress of
index scans.  The table AM determines when to request the next batch
from the index AM, at a time of its choosing.  A follow-on commit will
rely on this to prefetch table blocks during index scans.  Having a
single entry point for all index scan callers unambiguously puts the
table AM in control of the scan.

Author: Peter Geoghegan &lt;pg@bowt.ie&gt;
Reviewed-by: Andres Freund &lt;andres@anarazel.de&gt;
Reviewed-by: Tomas Vondra &lt;tomas@vondra.me&gt;
Reviewed-by: Rui Zhao &lt;zhaorui126@gmail.com&gt;
Discussion: https://postgr.es/m/CAH2-WzmYqhacBH161peAWb5eF=Ja7CFAQ+0jSEMq=qnfLVTOOg@mail.gmail.com
</content>
</entry>
<entry>
<title>Revert UPDATE/DELETE FOR PORTION OF</title>
<updated>2026-09-15T10:12:37Z</updated>
<author>
<name>Peter Eisentraut</name>
</author>
<published>2026-09-15T10:12:37Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=a4b26b8f7cd07a3e7f0cba550c30db142329e065'/>
<id>urn:sha1:a4b26b8f7cd07a3e7f0cba550c30db142329e065</id>
<content type='text'>
List of commits reverted:

  8e72d914c52  Add UPDATE/DELETE FOR PORTION OF
  b6ccd30d8ff  Add isolation tests for UPDATE/DELETE FOR PORTION OF
  33db6c4baf1  Fix DELETE/UPDATE FOR PORTION OF with rules
  7b22f15a015  Add psql tab completion for FOR PORTION OF clause
  7ca8c942967  Fix FOR PORTION OF with non-updatable view columns
  993a7aa0e4a  Fix cross-leftover pollution in FOR PORTION OF insert triggers
  7ac030d5b15  Require UPDATE permission on FOR PORTION OF column
  f0aedc7cb0e  Small terminology fixes in comments
  7d13b03a2e6  Fix FOR PORTION OF for inheritance children
  a272a58b942  Move FOR PORTION OF volatile check into planner
  a40fdf65886  Reject child partition FDWs in FOR PORTION OF
  bc3ae886a75  Forbid FOR PORTION OF with WHERE CURRENT OF
  e994f956e48  Forbid generated columns in FOR PORTION OF
  dfce19c2300  Forbid FOR PORTION OF on views with INSTEAD OF triggers
  20fe90bbb93  Fix RLS checks for FOR PORTION OF leftover rows
  9170c8b7169  Test what BEFORE UPDATE triggers do to FOR PORTION OF
  7090c696cc9  Deparse FOR PORTION OF using the range column's current name.
  62d1a5f8be8  Avoid RETURNING side effects for FOR PORTION OF leftovers.
  9924e2d900b  Enforce WITH CHECK OPTION on DELETE FOR PORTION OF leftovers
  c16a1b4f2ce  Fix error code for null FOR PORTION OF target
  610976420a3  Fix assertion failures in DELETE FOR PORTION OF tuple routing
  438f027238c  Resolve untyped parameters in FOR PORTION OF FROM/TO bounds
  140fdfcdf12  Don't evaluate the FOR PORTION OF target under EXPLAIN

Discussion: https://www.postgresql.org/message-id/62bf70cc-dc33-4188-8070-a8c177bb61de%40eisentraut.org
</content>
</entry>
<entry>
<title>Add support for external on-disk TOAST pointers as oid8</title>
<updated>2026-09-15T06:00:01Z</updated>
<author>
<name>Michael Paquier</name>
</author>
<published>2026-09-15T06:00:01Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=6e58d6356fcb58f06bfcebb5bfa808660e9531d2'/>
<id>urn:sha1:6e58d6356fcb58f06bfcebb5bfa808660e9531d2</id>
<content type='text'>
A TOAST table whose chunk_id column is oid8 is now fed a 64-bit object
ID thanks to the introduction of a new vartag_external called
VARTAG_ONDISK_OID8, coupled with a new varatt_external_oid8.  The only
difference between the existing varatt_external_oid and the new
varatt_external_oid8 is an extra 4 bytes to store 8 bytes worth an
object ID, spread across two uint32 to force alignement as memcmp may be
used for TOAST pointer comparison (line varatt_external_oid).

There is a one-one mapping between the vartag_external and the type of a
chunk_id:
- An oid8 chunk_id implies the use of VARTAG_ONDISK_OID8.
- An oid chunk_id implies the use of VARTAG_ONDISK_OID.

There are a couple of changes worth noting:
- In toast_tuple_init(), for the comparison of old and new external
values with a memcmp over VARSIZE_EXTERNAL(old_value).  Now that
multiple types of external on-disk TOAST pointers are possible, we
need to add a check based on the vartag used by an old or new value.
One of the tests added by c68cba09dd7f cover this case.
- In toast_tuple_find_biggest_attribute(), the initial "biggest_size"
depends on the type of chunk_id.  This needs a change in RelationData to
track the chunk_id type; this cached data is filled on demand.
- In detoast.h, toast_external_info_get() and toast_external_data act as
a translation layer to retrieve all the data associated to an Oid or an
Oid8 TOAST pointer, without the need to worry about the vartag dealt
with.  The introduction of this function and structure has reduced a lot
of code churn that existed in the initial versions of this patch, as per
a suggestion from Bharath Rupireddy.
- amcheck is updated to check the vartag &lt;-&gt; chunk_id type mapping
requirements, handling both vartags depending on the underlying type of
chunk_id on the TOAST table.

Bump catalog version, due to at least the change of VARTAG_SIZE().
(This counts for the bump forgotten in a625fc570c22..)

Author: Michael Paquier &lt;michael@paquier.xyz&gt;
Reviewed-by: Greg Burd &lt;greg@burd.me&gt;
Reviewed-by: Bharath Rupireddy &lt;bharath.rupireddyforpostgres@gmail.com&gt;
Reviewed-by: Yugo Nagata &lt;nagata@sraoss.co.jp&gt;
Discussion: https://postgr.es/m/af19kUjwjhaoUTLn@paquier.xyz
</content>
</entry>
<entry>
<title>Add support for toast_value_type=oid8</title>
<updated>2026-09-14T23:37:06Z</updated>
<author>
<name>Michael Paquier</name>
</author>
<published>2026-09-14T23:37:06Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=a625fc570c22e199471e1a2656e2c32b8dc0c0fd'/>
<id>urn:sha1:a625fc570c22e199471e1a2656e2c32b8dc0c0fd</id>
<content type='text'>
This commit adds the possibility to define TOAST tables with oid8 as
their chunk_id, based on the reloption toast_value_type.  All the
external TOAST pointers still rely on varatt_external_oid and a single
vartag.  The values inserted in the oid8 TOAST tables are fed from the
OID8 value generator, casted to OID for now, as we do not have a
vartag_external able to store Oid8 values yet.

An upcoming commit will add support for a new vartag_external and its
associated structures, with the code being able to use a different
on-disk external TOAST pointer depending on the attribute type of
chunk_id defined in TOAST relations.

All the changes done here are mechanical, mostly around the TOAST code
that needs to be able to do chunk_id lookups based on the two types now
supported.

Bump catalog version.

Author: Michael Paquier &lt;michael@paquier.xyz&gt;
Reviewed-by: Greg Burd &lt;greg@burd.me&gt;
Reviewed-by: Bharath Rupireddy &lt;bharath.rupireddyforpostgres@gmail.com&gt;
Reviewed-by: Yugo Nagata &lt;nagata@sraoss.co.jp&gt;
Discussion: https://postgr.es/m/af19kUjwjhaoUTLn@paquier.xy
</content>
</entry>
<entry>
<title>Do not adopt data checksum state from another node during replay</title>
<updated>2026-09-14T13:32:55Z</updated>
<author>
<name>Daniel Gustafsson</name>
</author>
<published>2026-09-14T13:32:55Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=b52a1c2c8a6acd4541a52e04cd14e3fcaffbeba0'/>
<id>urn:sha1:b52a1c2c8a6acd4541a52e04cd14e3fcaffbeba0</id>
<content type='text'>
Offline data checksum changes with pg_checksums are local to one node,
but replay adopted the data checksum state carried by checkpoint record
unconditionally.  After enabling checksums offline on only the primary,
a standby thus started verifying checksums it does not have.  After an
offline change on a standby, the next replayed checkpoint silently
reverted the state.

To fix, make the control file track this node's state alone, and have
replay cross-check the replayed state against it instead of adopting
it, warning once per divergent value and reporting when the states
agree again.  pg_control gains a watermark, normally the end LSN of
the newest XLOG2_CHECKSUMS record the node has written or applied,
and a flag marking that the state was last written by pg_checksums.
Recovery must never overwrite this state with a replayed one.  The
control file is updated when all pages are flushed.  This requires
a PG_CONTROL_VERSION bump.

Recovery from a base backup may be an exception to not adopting: its
control file was copied at an arbitrary moment, so the state carried
by the starting checkpoint is the one the WAL from there on was

Also document the offline procedure for replication setups.

Author: Zsolt Parragi &lt;zsolt.parragi@percona.com&gt;
Author: Bertrand Drouvot &lt;bertranddrouvot.pg@gmail.com&gt;
Reported-by: Bertrand Drouvot &lt;bertranddrouvot.pg@gmail.com&gt;
Reviewed-by: Bertrand Drouvot &lt;bertranddrouvot.pg@gmail.com&gt;
Reviewed-by: Daniel Gustafsson &lt;daniel@yesql.se&gt;
Discussion: https://postgr.es/m/anwm6UPxoVS41QA2@bdtpg
Backpatch-through: 19
</content>
</entry>
<entry>
<title>Disallow SET UNLOGGED for tables in a publication's EXCEPT clause.</title>
<updated>2026-09-14T04:10:18Z</updated>
<author>
<name>Amit Kapila</name>
</author>
<published>2026-09-14T04:10:18Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=7056ed4663f5ce4214cc1ebce42ec40f4400a7ea'/>
<id>urn:sha1:7056ed4663f5ce4214cc1ebce42ec40f4400a7ea</id>
<content type='text'>
Unlogged tables cannot be replicated, so they can neither be published nor
be named in a publication's EXCEPT clause.  ALTER TABLE ... SET UNLOGGED
checked only whether the table was published, so a table in an EXCEPT
clause could still be made unlogged, leaving a state that CREATE
PUBLICATION would reject and that pg_dump could not restore.

Author: Vignesh C &lt;vignesh21@gmail.com&gt;
Reviewed-by: Amit Kapila &lt;amit.kapila16@gmail.com&gt;
Reviewed-by: Chao Li &lt;li.evan.chao@gmail.com&gt;
Reviewed-by: shveta malik &lt;shveta.malik@gmail.com&gt;
Reviewed-by: Hayato Kuroda &lt;kuroda.hayato@fujitsu.com&gt;
Reviewed-by: Peter Smith &lt;smithpb2250@gmail.com&gt;
Reviewed-by: Zhijie Hou &lt;houzj.fnst@fujitsu.com&gt;
Discussion: https://postgr.es/m/CALDaNm1r2MkGu6h8zgU1Kj1sX-FcMQ7wGTeLSnhx-5joiyXEvg@mail.gmail.com
Backpatch-through: 19, where it was introduced
</content>
</entry>
<entry>
<title>Switch pg_column_toast_chunk_id() return value from oid to oid8</title>
<updated>2026-09-14T02:02:21Z</updated>
<author>
<name>Michael Paquier</name>
</author>
<published>2026-09-14T02:02:21Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=4000ab1decb6138a11fb4423237589376cb9ff54'/>
<id>urn:sha1:4000ab1decb6138a11fb4423237589376cb9ff54</id>
<content type='text'>
This is required for a follow-up commit that will add support for 8-byte
TOAST values, with this function being changed so as it is able to
support the largest TOAST value type available.

Most of the changes in this commit are in the regression tests that use
pg_column_toast_chunk_id(), that need to use some oid8-ish changes.  The
change is surprisingly not invasive as casts from oid to oid8 are
possible (the opposite cast oid8-&gt;oid is not supported).

Bump catalog version.

Author: Michael Paquier &lt;michael@paquier.xyz&gt;
Reviewed-by: Greg Burd &lt;greg@burd.me&gt;
Reviewed-by: Bharath Rupireddy &lt;bharath.rupireddyforpostgres@gmail.com&gt;
Reviewed-by: Yugo Nagata &lt;nagata@sraoss.co.jp&gt;
Discussion: https://postgr.es/m/af19kUjwjhaoUTLn@paquier.xy
</content>
</entry>
<entry>
<title>Add relation option toast_value_type</title>
<updated>2026-09-11T03:26:58Z</updated>
<author>
<name>Michael Paquier</name>
</author>
<published>2026-09-11T03:26:58Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=f33844889bb6950f9c207b9ea4830947f1e1f50e'/>
<id>urn:sha1:f33844889bb6950f9c207b9ea4830947f1e1f50e</id>
<content type='text'>
This relation option gives the possibility to define the attribute type
that can be used for chunk_id in a TOAST table when it is initially
created.  An update of this parameter has no effect if a TOAST table
already exists under the relation, even on rewrites.  It cannot be set
for TOAST relations.

This new option can be set only to "oid" as of this commit.  This
feature is extracted as a patch of its own to ease the introduction of a
second mode in a follow-up change, related to the introduction of 8-byte
OIDs in external TOAST pointers.

Bump catalog version, as StdRdOptions has changed.

Author: Michael Paquier &lt;michael@paquier.xyz&gt;
Reviewed-by: Greg Burd &lt;greg@burd.me&gt;
Reviewed-by: Bharath Rupireddy &lt;bharath.rupireddyforpostgres@gmail.com&gt;
Reviewed-by: Yugo Nagata &lt;nagata@sraoss.co.jp&gt;
Discussion: https://postgr.es/m/af19kUjwjhaoUTLn@paquier.xyz
</content>
</entry>
<entry>
<title>Add support for TOAST chunk_id type in binary upgrades</title>
<updated>2026-09-11T01:54:48Z</updated>
<author>
<name>Michael Paquier</name>
</author>
<published>2026-09-11T01:54:48Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=34fcd735f1ebd5efba8653cdbfbfd076b081660a'/>
<id>urn:sha1:34fcd735f1ebd5efba8653cdbfbfd076b081660a</id>
<content type='text'>
This commit adds a new SQL function able to set the type of a chunk_id
attribute for a TOAST table across binary upgrades.  The value is set
when the creation of a TOAST table is required across upgrades, in the
same fashion as the TOAST relation's oid and relfilenode.

Note that this piece currently works only with a TOAST table's chunk_id
set at OIDOID, because it is currently the only type of on-disk external
TOAST pointer supported.  This change is required for a follow-up
feature that aims to introduce support for 8-byte OIDs in external TOAST
pointers.

Taking care of this issue separately is less code churn for the next
changes, and perhaps some of the surrounding discussions with support
for different types of external on-disk TOAST pointers will find this
new facility useful.

Bump catalog version.

Author: Michael Paquier &lt;michael@paquier.xyz&gt;
Reviewed-by: Greg Burd &lt;greg@burd.me&gt;
Reviewed-by: Bharath Rupireddy &lt;bharath.rupireddyforpostgres@gmail.com&gt;
Reviewed-by: Yugo Nagata &lt;nagata@sraoss.co.jp&gt;
Discussion: https://postgr.es/m/af19kUjwjhaoUTLn@paquier.xyz
</content>
</entry>
<entry>
<title>Fix pg_stat_progress_cluster command reporting for unprivileged users</title>
<updated>2026-09-10T02:51:06Z</updated>
<author>
<name>Fujii Masao</name>
</author>
<published>2026-09-10T02:51:06Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=054c1c3e650b2fe0c44570a59bc4ea05bd2ac142'/>
<id>urn:sha1:054c1c3e650b2fe0c44570a59bc4ea05bd2ac142</id>
<content type='text'>
Previously, when another session ran REPACK, CLUSTER, or VACUUM FULL and
the user lacked permission to view its progress details,
pg_stat_progress_cluster incorrectly reported the command as CLUSTER
instead of NULL.

pg_stat_progress_cluster is based on pg_stat_progress_repack and
translates REPACK into CLUSTER or VACUUM FULL depending on whether index
ordering is requested. However, this translation defaulted to CLUSTER,
incorrectly converting NULL commands returned for insufficient privileges
into CLUSTER.

Fix this translation to preserve a NULL command when the user lacks
permission to view the progress details.

Bump catalog version.

Author: Zsolt Parragi &lt;zsolt.parragi@percona.com&gt;
Reviewed-by: Fujii Masao &lt;masao.fujii@gmail.com&gt;
Reviewed-by: Chao Li &lt;lic@highgo.com&gt;
Discussion: https://postgr.es/m/CAN4CZFMzy2V_wvRCBW5K8=wVCk1-C7nq=8otXO=u+s_1KZHqyA@mail.gmail.com
Backpatch-through: 19
</content>
</entry>
</feed>
