1
0
mirror of https://github.com/postgres/postgres.git synced 2026-10-23 13:29:09 +03:00
Commit Graph

18457 Commits

Author SHA1 Message Date
Heikki Linnakangas
6aa2cefe11 Fix autovacuum docs related to widening multixid offsets to 64 bits
The explanation of aggressive scans claimed that if the multixact
members grows to 2 billion entries, we launch autovacuum even if it's
nominally disabled.  That's no longer true; anti-wraparound vacuum is
only triggered if we're in danger of running out of multixids, we no
longer launch it just to shrink the 'members' SLRU.  There's no
wraparound danger with 'members' anymore, so it's no worse than if a
user table becomes very bloated.

We do still adjust the freeze threshold though, so that if autovacuum
runs, whether on schedule or as an emergency autovacuum to avoid
wraparound, it will freeze more aggressively if the members SLRU is
large.

I removed the mention of the 4 billion member threshold, even though
that still exists, because the explanation felt misleading.  The
aggressiveness is scaled proportionally between 2 and 4 billion
members.  At 4 billion it's as aggressive as it gets, but there's no
sudden cliff.

In the passing, fix some comments.  Remove obsolete mention of safe
threshold for member storage triggering autovacuum.  Secondly, the
freezing cutoff is adjusted to avoid the *members* SLRU from growing
too large.

Reported-by: Noah Misch <noah@leadboat.com>
Discussion: https://www.postgresql.org/message-id/20260827231757.78.noahmisch@microsoft.com
Backpatch-through: 19
2026-09-30 15:37:23 +03:00
David Rowley
ecd840a087 Doc: add missing new line in DO example block
Reported-by: Oli Sennhauser <oli.sennhauser@fromdual.com>
Discussion: https://postgr.es/m/777637c4-9d31-498d-a8ef-645fb510bf5a@fromdual.com
Backpatch-through: 14
2026-09-30 02:16:44 +13:00
Daniel Gustafsson
15fea50a8e doc: Fix incorrect output in example
Reported-by: y.saburov@gmail.com
Reviewed-by: David G. Johnston <david.g.johnston@gmail.com>
Discussion: https://postgr.es/m/CAKFQuwZ5zQzv1uyoH1UD5ETb7+ArqF2zNXVU4Et+b0_E8bS2sQ@mail.gmail.com
Backpatch-through: 14
2026-09-29 10:49:15 +02:00
Michael Paquier
b80d5b17ea Enforce pg_class.relchecks limit (32,767 or INT16_MAX)
pg_class.relchecks reports the number of CHECK constraints in a table,
and is stored within a smallint.  It was possible to define a table that
could overflow the counter when specifying more than 32k constraints
(new table or adding a constraint).  This would cause the table to
become undroppable, as this counter should never be negative when
dropping these constraints.

Author: Matthias van de Meent <boekewurm+postgres@gmail.com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Jian He <jian.universality@gmail.com>
Reviewed-by: Sivaprasad <sivaprasad.postgres@gmail.com>
Discussion: https://postgr.es/m/CAEze2WjSW4qaHYnvkTtbknp85eGEirGJTLMZatotdJJKiA+_hA@mail.gmail.com
Backpatch-through: 14
2026-09-28 06:55:05 +09:00
Tom Lane
d26295f12e Doc: clarify there's no log_line_prefix in csvlog or jsonlog output.
The documentation didn't make clear that "log_line_prefix" is
not output when "log_destination" is "csvlog" or "jsonlog".

Reported-by: Michael Schönitzer <michael@schoenitzer.de>
Author: Laurenz Albe <laurenz.albe@cybertec.at>
Co-authored-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/179032875673.1026201.6950455317699774504@wrigleys.postgresql.org
Backpatch-through: 14
2026-09-25 18:36:24 -04:00
Masahiko Sawada
8a2beb5f15 doc: Clarify phase descriptions of pg_stat_progress_repack.
The "initializing" phase was described as expected to be very brief,
but for REPACK (CONCURRENTLY), it also covers enabling and
initializing logical decoding, either of which can take a long
time. Also, the "catch-up" phase includes waiting for the ACCESS
EXCLUSIVE lock needed to swap the files, which was not mentioned.

Adding separate progress phases for these steps is left for v20; for
v19 we only clarify the description.

Author: Sami Imseih <samimseih.pg@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Manuel Reyes Bravo <manuelreyesbravo@gmail.com>
Discussion: https://postgr.es/m/CAN12%2BYJOeOyPYB5JS28VE_%2Brzg%3DRbzQXfj58TGfMYwv-TX9mJA%40mail.gmail.com
Backpatch-through: 19
2026-09-23 14:57:50 -07:00
Nathan Bossart
f94f8b18d3 Adjust list of major features in the v19 release notes.
Author: Jonathan S. Katz <jkatz@postgresql.org>
Discussion: https://postgr.es/m/e2324238-abec-4026-bd44-9b3e6c70bd49%40postgresql.org
Backpatch-through: 19 only
2026-09-23 14:08:48 -05:00
Daniel Gustafsson
1b940d1024 doc: Fix example output for format()
The example output for format() didn't show the actual output
generated for the example query.  Backpatch to all supported
branches.

Author: shihao zhong <zhong950419@gmail.com>
Reported-by: y.saburov@gmail.com
Reviewed-by: David G. Johnston <david.g.johnston@gmail.com>
Discussion: https://postgr.es/m/178979714249.1241.1230833804069549466@wrigleys.postgresql.org
Backpatch-through: 14
2026-09-23 14:07:25 +02:00
Heikki Linnakangas
b118f8c841 Fix SHMEM_ATTACH_UNKNOWN_SIZE when the shmem area doesn't exist
SHMEM_ATTACH_UNKNOWN_SIZE can be passed as argument to
ShmemRequestStruct() when the caller wants to attach to an existing
shared memory structure whose size it doesn't know.  If the shared
memory structure doesn't exist, the request should fail, but instead,
ProcessShmemRequestsAfterStartup() tried to create the structure with
size = -1.  That led to integer overflow in ShmemAllocRaw() and memory
corruption.

Fix by rejecting requests with SHMEM_ATTACH_UNKNOWN_SIZE when the
structure doesn't exist.  Also add an integer overflow check in
ShmemAllocRaw(), to protect from this kind of confusion or simply too
large requests.  Also document SHMEM_ATTACH_UNKNOWN_SIZE.

Author: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Discussion: https://www.postgresql.org/message-id/CAExHW5u_fTsOAS85kG981Vu6eR1GV-344rup6zYew7xMjEDREw@mail.gmail.com
Backpatch-through: 19
2026-09-18 12:13:22 +03:00
Alexander Korotkov
6fe990f348 Say what WAIT's snapshot restriction actually is
The reference page said WAIT "cannot be used in contexts where such a
snapshot must remain active, including transactions running at isolation
levels higher than READ COMMITTED", which reads as a blanket ban at those
levels.  It is not one.  The rule the code enforces is that the current
transaction must hold no snapshot, and a transaction-snapshot-mode
transaction has no snapshot until its first query: WaitStmt is exempt in
PlannedStmtRequiresSnapshot(), so the command itself does not take one.
WAIT therefore works before that first query, which is the order an
application wants anyway, and it is what 447aae13b0 set out to allow by
keeping the wait snapshot-free.

State the rule in terms of the snapshot rather than the isolation level,
say that WAIT acquires none of its own and name the other ways to hold
one, and give the consequence of holding one: it can delay replay, which
standby_replay waits for and which the other standby modes ultimately
depend on as well.

The error for a held snapshot named the internal snapshot states instead
of saying what the user did, and attached the isolation-level
explanation as DETAIL unconditionally, so a READ COMMITTED session with a
cursor was told its isolation level was too high.  Report what is held
rather than how it is held, and emit the DETAIL only when the isolation
level is in fact the reason.

Reported-by: Sami Imseih <samimseih.pg@gmail.com>
Reported-by: Xuneng Zhou <xunengzhou@gmail.com>
Reviewed-by: Sami Imseih <samimseih.pg@gmail.com>
Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/CAN12%2BYJddgAZzA36JZFX%2BYrnNR7Uubp9qWFz6ASs3v0kL30AMA%40mail.gmail.com
Backpatch-through: 19
2026-09-18 09:34:43 +03:00
Daniel Gustafsson
6b0760a10a Further post-revert cleanup after online checksums
When reverting I had missed updating the documentation for tracking data
checksum failures and the checksum version in the REDO record.  The test-
code for enabling and disabling checksums offline was originally kept to
minimize backpatching conflicts, but the amount of testcode backpatching
doesn't really warrant keeping dead code.

Since no version has been shipped since bumping XLOG_PAGE_MAGIC it is
left at the previous bump version.

Reported-by: Fujii Masao <masao.fujii@gmail.com>
Reported-by: Manuel Reyes Bravo <manuelreyesbravo@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwFLNCA9nVHSsC_=G_mvsK_fAFb+QbJAL7=R9cK2PL9ZBQ@mail.gmail.com
2026-09-17 23:04:04 +02:00
Alexander Korotkov
a203d20190 doc: Say which LSN gives read-your-writes with WAIT
The reference page and the read-your-writes section both presented
WAIT in standby_replay mode as enough for read-your-writes, without
saying which LSN to wait for.  Read as written, an LSN taken after the
last statement but before COMMIT would do, and it would not: the standby
position WAIT compares against is the end of the last replayed record, so
a target that falls inside the COMMIT record is satisfied while that
record is still unapplied.

Say that the target must be at or after the end of the write
transaction's COMMIT record, and note in the example that autocommit is
what puts the UPDATE's commit before the call that reads the position.

Author: Sami Imseih <samimseih.pg@gmail.com>
Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Discussion: https://postgr.es/m/CAN12%2BYKN7gXb1o9bDWgfA%3D6wjDrqNEgt%2BrXJiAWXgPCXQ5TqpA%40mail.gmail.com
Backpatch-through: 19
2026-09-17 09:36:36 +03:00
Alexander Korotkov
3f8b8ddea0 doc: Explain when to use the WAIT NO_THROW option
The description of NO_THROW covered what the option does but not when an
application would want it.  Explain that it suits callers that treat
timeout or not in recovery as expected results to be handled as part of
ordinary control flow, note the obligation to check the returned status,
and give the reason to omit the option.

Be precise about the option's scope: it changes only how those two wait
outcomes are reported.  Soften the description's claim that the command
"returns a status string instead of throwing errors" accordingly, and say
that invalid input still raises an error, as does any condition checked
before the wait begins.  Name two of those conditions as examples rather
than listing them, since the set grows.

Author: Rithvika Devisetti <devisettirithvika@gmail.com>
Reported-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Kiran Kaki <itskkpg@gmail.com>
Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com>
Reviewed-by: Satyanarayana Narlapuram <satyanarlapuram@gmail.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Discussion: https://postgr.es/m/14415b05-16d0-446f-ba7d-c891db8b3406%40eisentraut.org
Backpatch-through: 19
2026-09-17 09:36:36 +03:00
Robert Haas
3201ea8f17 pg_plan_advice: Disallow partition name without partition schema.
Up until now, pg_plan_advice has had a feature that allows an advice
target to mention a partition name but omit the partition schema;
that is, something like SEQ_SCAN(foo/bar) forces a sequential scan on
every child of table foo whose partition name is bar, regardless of
the schema in which bar appears. However, that feature turns out to
have a nasty design flaw: while advice enforcement handles this case
just fine, the advice feedback code doesn't know about it and will
mark such advice as "matched, failed" even when everything worked
perfectly. Unfortunately, there seems to be no simple code fix for
this problem.

Since the release of PostgreSQL 19 is imminent, take the conservative
course and revert this feature of pg_plan_advice. In other words,
require the partition schema whenever the partition name is present.
You must now write e.g. SEQ_SCAN(foo/public.bar) rather than just
SEQ_SCAN(foo/bar). This doesn't affect any cases where automatically
generated advice is supplied, since generated advice has always
included the partition schema anyway. Manually written advice will
have to conform to the new, stricter rule. For a later release, we
can consider whether to again relax this restriction in some way,
but now is not the time to design new things.

Reported-by: Noah Misch <noah@leadboat.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/CA+TgmoYmXy-jiP5qDhqNEiYFEBzQsArO6O2d9E8szNZqi1bePQ@mail.gmail.com
2026-09-16 21:09:39 -04:00
Daniel Gustafsson
c05d5ce123 Revert online data checksum transitions
The feature to enable, or disable, data checksums in an online
cluster saw a number of postcommit fixes during the beta period.
Suspicions were raised about the risk of more issues surfacing
after GA.  To avoid shipping code which may have bugs, this
reverts in full, or in part, the following commits:

aaf8b9989f, cd857dec0e, 5fee7cab1b, 25b922ec58, 8fb8ded889,
b3a37ffbc5, abac86c7a2, 3a18526e8d, 01805b7d16, 343d98c360,
e469e4784e, 8d22f52324, e5e1f6dc79, 5ab239c9a9, 0ca1b30105,
9a39056c41, 2018bd6167, 1df361e3d8, bf25e5571b, 381d19da15,
b120358c61, 07009121c2, d771b0a907, f19c0eccae, 0907112d38,
397f0fd06e, 602f19c84c, e3a27cad46, 4ae3e98c02, b364828f82

A few bits remain as they have merit on their own:
* The fix for offline checksums not preserving initial state in
  pg_control_init.  The test case for this fix has been moved to
  src/bin/pg_checksums/t/002_actions.pl to survive the revert
  which removed the previous location.
* When a page verification is logged, the additional note which
  informs if the buffer will be zeroed out was kept to aid any
  debugging around checksum failures.
* The Data Checksum section in the docs was kept, but rewritten
  to reflect the current state.
* The enum containing checksum states is kept and some hardcoded
  references to the off state (0) are replaced with the label
  PG_DATA_CHECKSUM_OFF instead.

Discussion: https://postgr.es/m/E15AC050-C4B5-488D-BB2D-3C7AC9F89EA8@yesql.se
Discussion: https://postgr.es/m/anwm6UPxoVS41QA2@bdtpg
Discussion: https://postgr.es/m/CA+Tgmob9NY6m0YNFTQ4nFH2d0iC9SQRruDYxfndGKKzh8OC80w@mail.gmail.com
Discussion: https://postgr.es/m/E07A611B-9CF3-4FDB-8CE8-A221E39040EC%40yesql.se
2026-09-16 11:01:27 +02:00
Fujii Masao
5a8cacfe5c doc: Fix primary status update WAL position description
Commit 5f3a49abf7 changed the primary status update message to report the
end of the last inserted WAL record instead of the WAL write position.
However, the protocol documentation still described the WAL position field as
the latest WAL write position, which no longer matches the message sent by
walsender.

Update the description of the WAL position field to indicate the end of the
last inserted WAL record, matching the implementation.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwFn2QfpHDR6cWxd98tqNb5vyguEis8rtqnqidFR36p4QQ@mail.gmail.com
Backpatch-through: 19
2026-09-16 16:55:35 +09:00
Álvaro Herrera
0cabab44f1 Fail REPACK in presence of invalid indexes, take 2
Commit 0c5d626961 was confused about which indexes are potentially
problematic to rebuild: we thought only !indisready indexes could fail
to rebuild, and thus would attempt to rebuild !indisvalid ones that are
"ready" (that is, being maintained by DML but not yet completed).
However, that's wrong, because it could be that the validation phase of
such an index failed or was interrupted partway through.  So, have
REPACK throw an error with all !indisvalid indexes, not just those
!indisready.

(!indisready implies !indisvalid, so this is an expansion of what
happened with the previous commit.)

Reported-by: shihao zhong <zhong950419@gmail.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/CAGRkXqRA4YetT8Nu3+1-45+ffTwi2bd1d1eDFME39Y9OPRMytQ@mail.gmail.com
2026-09-15 15:40:59 +02:00
Daniel Gustafsson
2874526137 doc: Database and tablespace size functions throws error
Commit b6463ea6ef added an explicit ereport on missing object
to pg_database_size and pg_tablespace_size, but the documentation
wasn't updated to match.

Author: Zhong ShiHao <zhong950419@gmail.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: solai v <solai.cdac@gmail.com>
Discussion: https://postgr.es/m/CAGRkXqQSegqDnkRf344G=80mJMn78o9u=auHnx=u1jf=XpuE0A@mail.gmail.com
Backpatch-through: 18
2026-09-15 13:46:52 +02:00
Peter Eisentraut
a9d2f72824 Revert UPDATE/DELETE FOR PORTION OF
List of commits reverted:

  8e72d914c5  Add UPDATE/DELETE FOR PORTION OF
  b6ccd30d8f  Add isolation tests for UPDATE/DELETE FOR PORTION OF
  33db6c4baf  Fix DELETE/UPDATE FOR PORTION OF with rules
  7b22f15a01  Add psql tab completion for FOR PORTION OF clause
  7ca8c94296  Fix FOR PORTION OF with non-updatable view columns
  993a7aa0e4  Fix cross-leftover pollution in FOR PORTION OF insert triggers
  7ac030d5b1  Require UPDATE permission on FOR PORTION OF column
  f0aedc7cb0  Small terminology fixes in comments
  7d13b03a2e  Fix FOR PORTION OF for inheritance children
  a272a58b94  Move FOR PORTION OF volatile check into planner
  a40fdf6588  Reject child partition FDWs in FOR PORTION OF
  bc3ae886a7  Forbid FOR PORTION OF with WHERE CURRENT OF
  c8d49ffb00  Forbid generated columns in FOR PORTION OF
  5b5e99047a  Forbid FOR PORTION OF on views with INSTEAD OF triggers
  c58c83ce50  Fix RLS checks for FOR PORTION OF leftover rows
  5454fe4a6e  Test what BEFORE UPDATE triggers do to FOR PORTION OF
  2a9541ddfd  Deparse FOR PORTION OF using the range column's current name.
  fd92f74b91  Avoid RETURNING side effects for FOR PORTION OF leftovers.
  f3a116a26f  Enforce WITH CHECK OPTION on DELETE FOR PORTION OF leftovers
  c7e34c31e8  Fix error code for null FOR PORTION OF target
  938f4f8f34  Fix assertion failures in DELETE FOR PORTION OF tuple routing
  f194032168  Resolve untyped parameters in FOR PORTION OF FROM/TO bounds
  98f6984e5c  Don't evaluate the FOR PORTION OF target under EXPLAIN

plus release notes entries.

Discussion: https://www.postgresql.org/message-id/62bf70cc-dc33-4188-8070-a8c177bb61de%40eisentraut.org
2026-09-15 12:16:42 +02:00
Peter Eisentraut
b906997438 doc: Synopsis placeholder consistency
Make the placeholder for SUPPORT for CREATE AGGREGATE match the
previously existing use for CREATE FUNCTION (psfunc ->
support_function).
2026-09-15 10:33:50 +02:00
Bruce Momjian
f0b40d33a6 doc PG 19 relnotes: fix retain_dead_tuples details
It is a _subscription_ option, not publication, and is for conflict
_detection_, not resolution.

Reported-by: Masahiko Sawada

Author: Masahiko Sawada

Discussion: https://postgr.es/m/CAD21AoDWo7jD3wnxn3uyjvjU0qhXjzL+f_TzutEGHyyJ_RP0hQ@mail.gmail.com

Backpatch-through: 19 only
2026-09-14 23:00:02 -04:00
Bruce Momjian
f5b23444b0 doc PG 19 relnotes: add mention of commit_delay wait event
Reported-by: Chong Peng

Discussion: https://postgr.es/m/tencent_3A009A1049F25EBF5C855770@qq.com

Backpatch-through: 19 only
2026-09-14 22:52:00 -04:00
Bruce Momjian
e7c1b57012 doc PG 19 relnotes: update to current
Backpatch-through: 19 only
2026-09-14 22:28:29 -04:00
Alexander Korotkov
1a562a2661 Rename the WAIT FOR command to WAIT in the documentation
The command tag is WAIT, but the reference page called the command
"WAIT FOR" in its title, index entry, psql help name and throughout its
prose, and so did the error messages.  FOR is a noise word that makes the
grammar read like English, exactly as INTO does for INSERT and FROM does
for DELETE; neither of those is part of the command's name.  Settle on
WAIT everywhere the command is named, and keep WAIT FOR LSN wherever the
syntax itself is being shown.

Rename the reference page's id and file name to match, following
cb2c696b1d: v19 is not released, so the URL is not yet baked into a
supported version, and every other page's id matches its title.

Reported-by: Masahiko Sawada sawada.mshk@gmail.com
Author: Xuneng Zhou xunengzhou@gmail.com
Reviewed-by: Alexander Korotkov aekorotkov@gmail.com
Discussion: https://postgr.es/m/CAD21AoBdtiPTbm7T_aNeDON9JpFG9g%3DJDUP4WU-Y8t8_xqvR5Q%40mail.gmail.com
Backpatch-through: 19
2026-09-14 14:49:39 +03:00
Alexander Korotkov
f260c03bcc Fix timeout overflow in WAIT FOR LSN
Commit 447aae13b0 accepted TIMEOUT values up to INT64_MAX
milliseconds, but computing the deadline multiplies by 1000, which
caused an int64 overflow. And the command reported a timeout at once
instead of waiting.

Parse the value as an int instead, which simplifies the code and is
consistent with other timeout values such as the statement_timeout GUC.

The specified values are now rounded to the nearest millisecond, so a
positive timeout below half a millisecond becomes zero and waits
indefinitely.

Backpatch to v19, where the TIMEOUT option was introduced.

Reported-by: ChangAo Chen <cca5507@qq.com>
Author: ChangAo Chen <cca5507@qq.com>
Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/tencent_86B83240785807077600A1778566B5C12908@qq.com
Backpatch-through: 19
2026-09-14 14:14:09 +03:00
Etsuro Fujita
3e44c8a441 postgres_fdw: Disable attribute statistics import from pre-9.1 servers.
To import attribute statistics, postgres_fdw sent a query wity COLLATE
"C" to remote servers without checking their version.  Since COLLATE is
only supported since v9.1, this could break the import against older
servers; fix by modifying postgres_fdw to check their version and if
older, fall back to sampling.  (This commit still allows importing only
relation statistics from such an older server.)

Also, expand the documentation to mention that attribute statistics are
stored into the local server without applying the foreign table columns'
n_distinct option.

Oversight in commit 28972b6fc.

Reported-by: Fujii Masao <masao.fujii@gmail.com>
Reported-by: Osama Abdul Qader <osamaabdulqader.cs@gmail.com>
Author: Etsuro Fujita <etsuro.fujita@gmail.com>
Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwH8%2BuDTwfohpck9v_9L3nwSWACbmC36JYRyqHd5xQN_OA%40mail.gmail.com
Backpatch-through: 19
2026-09-14 19:00:01 +09:00
Andrew Dunstan
db169985c1 Revert pg_get_role_ddl(), pg_get_tablespace_ddl(), and pg_get_database_ddl().
List of commits reverted:

  4881981f92  Add infrastructure for pg_get_*_ddl functions
  76e514ebb4  Add pg_get_role_ddl() function
  b99fd9fd7f  Add pg_get_tablespace_ddl() function
  a4f774cf1c  Add pg_get_database_ddl() function
  6c7bce28c8  Fixups for a4f774cf1c
  1f108fc02e  Fix pfree crash in pg_get_role_ddl() and pg_get_database_ddl().
  cda0c4c5d6  Reject invalid databases in pg_get_database_ddl()
  79fba6ebab  doc: Fix missing role attribute in pg_get_tablespace_ddl() description.
  c529ee38b9  Convert ddlutils regression tests to TAP tests.
  df1bac400f  Fix timezone dependence in test_misc/012_ddlutils.pl
  5642a0367c  Avoid SIGSEGV in pg_get_database_ddl() on NULL tablespace
  2af70e9374  Fix incorrect declarations of variadic pg_get_*_ddl() functions.
  d6ed87d198  Use named boolean parameters for pg_get_*_ddl option arguments

plus the corresponding release notes entries.

Discussion: https://postgr.es/m/20260827015242.54.noahmisch@microsoft.com
2026-09-13 12:30:28 -04:00
Alexander Korotkov
f7c0929170 Prevent WAIT FOR LSN from deadlocking recovery on held locks
A backend waiting for WAL replay can retain locks acquired by earlier
statements.  If the startup process needs one of those locks, directly or
through another backend, before reaching the target LSN, a deadlock can
arise: startup waits for the backend to release the lock, while the backend
waits for startup to advance replay.  The lock manager records the
backend's held locks, but WAIT FOR LSN does not register its dependency on
replay as a lock wait.  The deadlock detector therefore cannot see the
complete cycle.  With unlimited standby conflict delays and no other
timeout or cancellation, this deadlock can persist indefinitely.

Write and flush waits are restricted as well.  Their positions are floored
by the replay position, so without an active walreceiver the startup
process can be their only source of progress.  If a held lock blocks
replay, these waits can form the same cycle: the backend waits for replay
to advance, while replay waits for the backend to release the lock.

Streaming does advance them independently, but only while WAL keeps
arriving.  If reception stops before the target is reached, a blocked
startup process cannot restart the walreceiver.  It also cannot replay
newer checkpoint records needed to advance restartpoints and recycle WAL,
so continued reception can exhaust available space in pg_wal before the
target is reached.  An active receiver at the start of the wait therefore
does not guarantee that the wait can finish while replay remains blocked.

Reject an unsatisfied standby_replay, standby_write, or standby_flush wait
while recovery is active when the backend already holds a granted
heavyweight lock.  This conservative restriction covers direct
relation-lock cycles and indirect cycles involving advisory locks.  It
also rejects some write and flush waits that an active receiver could
satisfy.  Requests whose target is observed as already reached are exempt
from this check, as are primary_flush requests and requests issued after
recovery has ended.  Existing snapshot and recovery-state checks still
apply.

Report one of the held locks so the user can find it, using the same
description the deadlock report uses.

Add replay-mode tests for relation and advisory locks and for the
already-reached case, and document the restriction along with the
recommended usage pattern.

Author: Xuneng Zhou <xunengzhou@gmail.com>
Discussion: https://postgr.es/m/CABPTF7U0gW5%2B-4oL7-qdML-yerZxUb7ku4QXp7JxCYo0qyJ_Tw%40mail.gmail.com
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Backpatch-through: 19
2026-09-12 23:30:28 +03:00
Michael Paquier
e31766933a doc: Fix output column name for pg_stat_get_backend_subxact()
pg_stat_get_backend_subxact()'s second attribute was written as
"subxact_overflow" in the docs, but its name is "subxact_overflowed".
Note that the attribute name is still wrong in the TupleDesc generated
in the function; pg_proc agrees with "overflowed".

Author: Shihao Zhong <zhong950419@gmail.com>
Reviewed-by: Jim Jones <jim.jones@uni-muenster.de>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAGRkXqTBZ+zbVuDC8xGEB6Btj61hsui5H5nGqzFBDyOXc=4bjQ@mail.gmail.com
Backpatch-through: 16
2026-09-12 09:04:07 +09:00
Tom Lane
6351dadfcf Doc: update v19 release notes for reversion of a9c350d9e.
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/20260904180712.cc.noahmisch@microsoft.com
2026-09-11 11:51:14 -04:00
Tom Lane
e0fdc3f54b Revert "Don't try to re-order the subcommands of CREATE SCHEMA".
This reverts commit a9c350d9ee.
While that intentionally changed our semantics for CREATE SCHEMA
subcommands, it's being argued that the functionality gain does
not justify potentially-subtle compatibility breakage.  The most
useful bit of functionality gain came from commit 404db8f9e
("Execute foreign key constraints in CREATE SCHEMA at the end"),
which we're keeping because it's required by SQL spec and doesn't
seem to create a compatibility hazard by itself.

This is not an exact revert, partly because we're keeping 404db8f9e,
and partly because I kept the API changes that allowed passing down
a ParseState (which allows providing an error cursor for many of the
errors thrown in CREATE SCHEMA).

Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/20260904180712.cc.noahmisch@microsoft.com
Backpatch-through: 19
2026-09-11 11:38:16 -04:00
Tom Lane
3c5d28ba64 Revert "Support more object types within CREATE SCHEMA".
This reverts commit d516974840,
along with parts of commit 049b742daa
("psql: Tighten heuristics for BEGIN/END within CREATE SCHEMA").

While there's nothing particularly wrong with d51697484 in itself,
it depends on a9c350d9e ("Don't try to re-order the subcommands of
CREATE SCHEMA"), and concerns have been raised that the compatibility
impact of that outweighs the benefit of allowing more object types
within CREATE SCHEMA.

It's not possible to revert 049b742da verbatim, because the
CVE-2026-6464 patches 3045a25ba ("Teach psql to skip in-line COPY
... FROM STDIN data after a failure") and cf754f741 ("Save/restore
more lexer state when skipping text due to \if") depend on
infrastructure it added.  Instead, rip out just the bits specifically
needed to parse CREATE FUNCTION within CREATE SCHEMA.  This results in
lexer code that matches v18-and-earlier as modified by CVE-2026-6464.

Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/20260904180712.cc.noahmisch@microsoft.com
Backpatch-through: 19
2026-09-11 11:32:16 -04:00
Robert Haas
9ed2684b89 pg_plan_advice: Document interaction with GEQO.
The general nature of this interaction has been understood (at least
by me) since before the original commit, but I failed to explicitly
document it. I also left behind an XXX in the README which I intended
to remove before commit. Fix those things.

Reported-by: Noah Misch <noah@leadboat.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/CA+TgmoYmXy-jiP5qDhqNEiYFEBzQsArO6O2d9E8szNZqi1bePQ@mail.gmail.com
2026-09-10 13:54:45 -04:00
Álvaro Herrera
07aef52eba Rework REPACK's documentation on clustering
Commit ac58465e06 moved the discussion on clustering from CLUSTER's
refpage to REPACK's, but somehow introduced a mistake regarding when
exactly can the seqscan-and-sort strategy be used with respect to btrees
(spoiler: it was 100% backwards).  Fix that, but also restructure and
reword the whole subsection more fully to try and make it more coherent.

Author: Chao Li <li.evan.chao@gmail.com>
Author: Álvaro Herrera <alvherre@kurilemu.de>
Reported-by: Antonin Houska <ah@cybertec.at>
Backpatch-through: 19
Discussion: https://postgr.es/m/69CA7636-0359-42B6-B971-16A036698187@gmail.com
2026-09-10 17:56:39 +02:00
Etsuro Fujita
683ce2329c postgres_fdw: Adjust warning message in statistics import.
The previous warning message when falling back to sampling in a certain
case failed to properly mention the reason for that.

Also, for clarity, rewrite a comment about the fallback and add a note
about it to postgres-fdw.sgml.

Follow-up to commit 6a8571568.

Reported-by: Fujii Masao <masao.fujii@gmail.com>
Author: Etsuro Fujita <etsuro.fujita@gmail.com>
Reviewed-by: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwHq1VuXwxeDU8N4dd9U4RFEW982qQ9C26mRQDs3nu_Naw%40mail.gmail.com
Backpatch-through: 19
2026-09-10 17:30:01 +09:00
Amit Langote
25649d6e79 Remove batching from RI fast-path checks
Commit b7b27eb41a added batching to the direct-index fast path for
foreign key checks introduced by 2da86c1ef9. Instead of probing the
referenced index once per row, it accumulated referencing rows and
checked them in groups, using SK_SEARCHARRAY for single-column foreign
keys.

The batching requires state to survive across trigger invocations and
to be flushed at the end of each trigger-firing cycle. Follow-up work
has had to define how that state interacts with nested trigger firing,
subtransactions, deferred constraints, and SET CONSTRAINTS.

Failure to handle one of those cases can leave a buffered check
unperformed, allowing a transaction to commit a permanent foreign key
violation without reporting an error. With PostgreSQL 19 close to
release, there is not enough time to gain confidence that all relevant
trigger and transaction states have been covered.

Remove the batching and its after-trigger callback infrastructure,
including the per-batch RI cache and associated subtransaction cleanup.
Restore the early exit in AfterTriggerFireDeferred(), since batch
callbacks can no longer queue additional deferred triggers after
afterTriggerInvokeEvents() returns.

Remove tests that exercise only the batching implementation and its
callback and cache lifetime machinery. Retain tests that continue to
exercise the underlying per-row fast path, including validation,
scan-key construction, cross-type rechecks, deferred checks, and
metadata invalidation.

Keep the underlying per-row fast path. It performs each check
synchronously and retains no pending checks across trigger invocations.
Also retain the fixes made to the per-row probe path, including support
for domain-typed referencing columns, restriction to btree referenced
indexes, concurrent index replacement, metadata invalidation, and
nullable referenced keys.

This removal applies only to REL_19_STABLE.

Discussion: https://postgr.es/m/CA+HiwqEDcCSDoYTtoXH4Ta_BpGN+revMZSLLj6GRz2_5ybwE1g@mail.gmail.com
2026-09-10 14:41:54 +09:00
Fujii Masao
e418e8eb92 Fix REPACK command reporting in pg_stat_progress_cluster
pg_stat_progress_cluster translates REPACK into VACUUM FULL when
pg_stat_progress_repack.repack_index_relid is zero, and into CLUSTER
otherwise.

Previously, repack_index_relid was set only when an index scan was used.
When REPACK used a sequential scan and sort to order the table by an index,
the field remained zero even though index ordering had been requested. As a
result, pg_stat_progress_cluster incorrectly reported the command as
VACUUM FULL instead of CLUSTER.

Fix this by setting repack_index_relid to the OID of the requested ordering
index when progress reporting starts, regardless of the scan method. This
allows pg_stat_progress_cluster to correctly report REPACK as CLUSTER when
index ordering is requested.

Also update the documentation to clarify the meaning of the index columns
and how REPACK is translated into CLUSTER or VACUUM FULL.

Suggested-by: Fujii Masao <masao.fujii@gmail.com>
Author: Chao Li <lic@highgo.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Discussion: https://postgr.es/m/CAN4CZFMzy2V_wvRCBW5K8=wVCk1-C7nq=8otXO=u+s_1KZHqyA@mail.gmail.com
Backpatch-through: 19
2026-09-10 11:55:13 +09:00
Álvaro Herrera
40d811540a Fix error message for concurrent repack on materialized views
Previously, running REPACK (CONCURRENTLY) on a materialized view failed
with a confusing "has no identity index" error.

REPACK (CONCURRENTLY) replays changes decoded from WAL, but a
materialized view produces none, since it cannot be modified by DML and
REFRESH rewrites it through a transient heap that is not logically
decoded.

Fix this by reporting a clear error for materialized views upfront,
alongside the existing checks for system catalogs and TOAST tables, and
document the limitation.

Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Kiran Kaki <itskkpg@gmail.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/CALj2ACXPvy4_LkQ0nHKgbZjAGK9fkDqRYUvXA3hgwxPm_X7Eng@mail.gmail.com
2026-09-09 12:58:00 +02:00
Masahiko Sawada
04bb150025 Restrict REPACK (CONCURRENTLY) on user catalog tables.
REPACK (CONCURRENTLY) is not an MVCC-safe operation; it doesn't
preserve the visibility information, which logical decoding needs
because it reads user catalog tables under a historic snapshot.

Disallow REPACK (CONCURRENTLY) on user catalog tables. Removing this
check requires making it MVCC-safe and logical rewrite mappings.

Backpatch to v19, where REPACK (CONCURRENTLY) was introduced.

Reported-by: Nathan Bossart <nathandbossart@gmail.com>
Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Antonin Houska <ah@cybertec.at>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Alvaro Herrera <alvherre@kurilemu.de>
Discussion: https://postgr.es/m/apBIFWzHYOaG0auN%40nathan
Backpatch-through: 19
2026-09-08 13:04:59 -07:00
Masahiko Sawada
fe7b607234 Restrict REPACK (CONCURRENTLY) to the heap access method.
REPACK (CONCURRENTLY) didn't check the table AM of the table being
repacked, so if the table AM doesn't support logical decoding, the
concurrent changes are never decoded and are silently lost from the
rewritten table.

Fix by erroring out for tables that use a non-heap access method.

Reported-by: Nathan Bossart <nathandbossart@gmail.com>
Author: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com>
Discussion: https://postgr.es/m/apBkixO4xAGFoiT3@nathan
Backpatch-through: 19
2026-09-08 11:49:14 -07:00
Álvaro Herrera
24dd8c369e Reject REPACK (ANALYZE) in a transaction block
The current implementation doesn't support it correctly, leading to
mysterious warnings and some worse problems.  Have the combination throw
an error.

This is intended as a temporary stopgap until we can implement it in a
future release, as it's a useful feature.

Author: Fujii Masao <masao.fujii@gmail.com>
Author: Antonin Houska <ah@cybertec.at>
Author: Osama Abdul Qader <osamaabdulqader.cs@gmail.com>
Reported-by: Nathan Bossart <nathandbossart@gmail.com>
Backpatch-through: 19
Discussion: https://postgr.es/m/apBCEl4hBHlq0axm@nathan
2026-09-08 14:06:06 +02:00
Peter Eisentraut
2b9e1aff4d Revert SQL Property Graph Queries (SQL/PGQ)
List of commits reverted:

  2f094e7ac6  SQL Property Graph Queries (SQL/PGQ)
  cd8844e7db  Make some tests more stable by adding more explicit ordering
  182cdf5aea  pg_dump: Add appropriate version check
  c9babbc881  Dump labels in reproducible order
  040a56be4b  Cleanup users and roles in graph_table_rls test
  5282bf535e  Fix some typos and make small stylistic improvements
  720f0f89d6  Reject consecutive element patterns of same kind
  288ae96872  Add a graph pattern variable only once
  c5b3253b8a  Property references are preferred over regular column references
  a0dd0702e4  Fix cross variable references in graph pattern causing segfault
  2ff289d039  Check for stack overflow when rewriting graph queries
  9082680c34  Fix typos and grammar in graph table rewrite code
  ac3bcc041c  Fix collation of expressions in GRAPH_TABLE COLUMNS clause
  9d2979dd68  pg_get_viewdef() and lateral references in COLUMNS of GRAPH_TABLE
  891a57c739  Do not define type for a property graph
  dc9e7c9ed9  Handle nodes that may appear in GraphPattern expression trees
  f6edd8ed70  Add ORDER BY to test query to stabilize test
  1190f858ea  doc: Small synopsis wording change for consistency
  d0eac3cafb  Make spelling consistent
  6827de95ee  Simplify code in objectaddress.c for some property graph objects
  5778fb3eaf  Fix typo in error message
  72498a8698  Handle element label and label property objects in object address functions
  4cb2a9863d  Fix LATERAL references in GRAPH_TABLE with multi-label pattern
  9d8cdcbe0c  Record dependencies on graph labels and properties
  2a7e95b659  Readable identity strings for property graph objects
  ac0ad6a7c9  Prevent dropping the last label from a property graph element
  36aae3d029  Fix handling of dropping a property not associated with the given label
  cc9aa7f3a9  Resolve unknown-type literals in GRAPH_TABLE COLUMNS
  d868736830  Make property graph object descriptions better translatable
  45d4c917ff  Fix properties orphaned by dropping a label
  33bfad0f3c  Remove apparent support for SECURITY LABEL ON PROPERTY GRAPH
  ccca2cd81b  Fix pg_dump ACL minimization for PROPERTY GRAPH.
  7883ea13ff  Fix replace_property_refs() ignoring the root of expression tree
  b820c623dd  Resolve unknown-type literals in property expressions
  01c544e1af  Prohibit locking clauses on GRAPH_TABLE
  8d2beee027  Restore the ability to use | and -> as prefix operators.
  d2ac26eb9b  Fix missing space before WHERE in GRAPH_TABLE deparse
  4054ec5b4f  Prohibit GRANT ... ON TABLE on a property graph
  77964322d6  doc: Add PROPERTY GRAPH to the access privilege tables
  c5e11de2f3  More tab-completion for DROP PROPERTY GRAPH
  8ce749f8f6  Disallow aggregates, window functions, and SRFs in GRAPH_TABLE COLUMNS
  22d0eebfef  Report duplicate property and label names with a proper error
  41a300ae3d  Make generate_queries_for_path_pattern_recurse() interruptible
  58af213874  Fix inferred property graph keys with INCLUDE columns
  63f8e9773a  Fix pg_event_trigger_ddl_commands for GRANT ON PROPERTY GRAPH
  07df2b2532  doc: reformat GRAPH_TABLE examples
  1c8c790ec1  Coerce GRAPH_TABLE pattern WHERE clauses to boolean

plus release notes entries and typedefs.list changes.

Discussion: https://www.postgresql.org/message-id/CAAKRu_bEtjWYWhYxSo0o_t3DaZYRQd5PkC0abA0g9Mp4%2BovH0w%40mail.gmail.com
2026-09-07 21:03:10 +02:00
Amit Kapila
9186ffd633 Reset conflict slot's xmin when a subscription (re)starts retention.
Since the retain_dead_tuples feature uses a single cluster-wide
replication slot across all subscriptions, adding a new subscription on a
database with an older active transaction can require
conflict_detection_slot.xmin to move backward to avoid missing dead tuples
needed for update_deleted conflict detection.

Previously, if a newly created subscription had an older active
transaction than the slot's current xmin, the slot update occurred during
worker apply, leading to an assertion failure.

Fix this by having the launcher track the set of databases with active
tuple-retaining subscriptions. When a database joins this set (either via
a new subscription or when retention restarts), the launcher resets the
slot's xmin to the cluster-wide safe decoding horizon before starting any
workers. Because this horizon accounts for all active transactions across
the entire cluster, it serves as a safe seed without requiring retroactive
backward movement by individual apply workers.

In passing, update the retain_dead_tuples documentation to clarify two
operational boundary cases:
(a) Conflict data continues to accumulate even when a subscription is
disabled or its apply worker is stopped.
(b) track_commit_timestamp must be enabled for conflict detection to
function properly.

Reported-by: Nisha Moond <nisha.moond412@gmail.com>
Author: Zhijie Hou <houzj.fnst@fujitsu.com>
Author: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Amit Kapila <amit.kapila16@gmail.com>
Reviewed-by: Nisha Moond <nisha.moond412@gmail.com>
Reviewed-by: shveta malik <shveta.malik@gmail.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Discussion: https://postgr.es/m/TY4PR01MB177182F547A62FC2666EC04EC94B72@TY4PR01MB17718.jpnprd01.prod.outlook.com
Backpatch-through: 19, where it was introduced
2026-09-07 14:34:15 +05:30
Etsuro Fujita
f4012672bb postgres_fdw: Fix issues with statistics import.
When analyzing a foreign table pointing to a partitioned or inherited
table on the remote server, this method just imported relpages and
reltuples for the parent table from the remote pg_class, causing a
discrepancy or an error in results compared to the sampling method.

* In the partitioning case, while the sampling method sets relpages=0,
  this method set relpages=-1.  (For reltuples, the results of both
  methods match.)
* In the inheritance case, while the sampling method sets
  reltuples=(# of rows in the parent and child tables), this method set
  reltuples=(# of rows in the parent table).  (For relpages, the results
  of both methods match.)

As relpages and reltuples are used for costing foreign paths, these
would lead to incorrect plans or plan changes depending on the method.
To fix, do the following:

* For the partitioning case, modify postgres_fdw to set relpages=0 to
  match the sampling method.
* For the inheritance case, we could also modify it to set the correct
  reltuples value by fetching reltuples for the child tables as well,
  but 1) the change isn't small, and 2) table inheritance hasn't been
  used that much these days, so fix by disabling this method.

While at it, adjust comments and docs slightly.

Oversight in commit 28972b6fc.

Author: Etsuro Fujita <etsuro.fujita@gmail.com>
Discussion: https://postgr.es/m/CAPmGK173b2Xvyoeq%3DY7L09H%2BajgMgxC2fYe%3D7CCunZz8tGTfFA%40mail.gmail.com
Backpatch-through: 19
2026-09-04 18:40:01 +09:00
Noah Misch
c586a5336a Fix nonstandard SQL command doc id= values introduced in the v19 cycle.
While some <refentry> instances of supported PostgreSQL versions use the
sql-alter-table style, sql-altertable is the dominant style.  Change
these before they're baked into the doc URLs of a supported version.

Backpatch-through: 19
2026-09-01 17:03:30 -07:00
Noah Misch
6dbc931a39 Fix user-facing English grammar introduced in the v19 cycle.
Backpatch-through: 19
2026-09-01 17:03:30 -07:00
Jacob Champion
ef67d599ef libpq: Stop greasing protocol connections
This reverts commit 4966bd3ed9, which
introduced the 19beta grease campaign, now that Beta 3 has been stamped.
(The reservation and documentation for the grease version code, done in
d8d7c5dc8f, remains.)

Discussion: https://postgr.es/m/CAOYmi%2Bkqt_gn-wvUjJG1j3MM4LDDsRMURSPz2eMxfABu0iGtpw%40mail.gmail.com
Backpatch-through: 19
2026-09-01 10:26:10 -07:00
Jeff Davis
1956251afa Revert "Force LC_COLLATE to C in postmaster."
Out of an abundance of caution.

This reverts commit 5e6e42e44f.

Requested-by: Daniel Verite <daniel@manitou-mail.org>
Requested-by: Noah Misch <noah@leadboat.com>
Discussion: https://postgr.es/m/20260826232534.13.noahmisch@microsoft.com
Backpatch-through: 19
2026-09-01 09:55:14 -07:00
Fujii Masao
a4da804193 doc: clarify aliasing of VALUES in FROM clauses
The VALUES reference page said that an AS clause was required when
VALUES is used in a FROM clause. This was imprecise because AS is
optional when specifying an alias.

In v14 and v15, a table alias is still required in this case, so state
that explicitly instead. In v16 and later, commit bcedd8f5fc made table
aliases for subqueries in FROM clauses optional, so state that the
table alias is optional there. In all branches, continue to recommend
explicit column aliases as good practice.

Backpatch to all supported versions.

Author: Ian Barwick <barwick@gmail.com>
Reviewed-by: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAB8KJ=jrvZdNLLhYSiCgbjLTz2LKEjYw+-HVQkaF+kgk61KtHA@mail.gmail.com
Backpatch-through: 14
2026-09-01 22:48:24 +09:00
Fujii Masao
07df2b2532 doc: reformat GRAPH_TABLE examples
The GRAPH_TABLE examples in ddl.sgml and queries.sgml were written
as single long lines, making their structure harder to read in the
generated documentation.

Reformat these examples so that the graph name, MATCH clause, and
COLUMNS clause appear on separate lines, making them easier to read.

Author: Koshino Taiki <koshino@sraoss.co.jp>
Reviewed-by: Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/OS9P286MB64860BD6CD6D4B4B0E1CEDE894A32@OS9P286MB6486.JPNP286.PROD.OUTLOOK.COM
Backpatch-through: 19
2026-09-01 12:55:24 +09:00