Commit graph

18291 commits

Author SHA1 Message Date
Tom Lane
2963ddeef2 Doc: remove stale entry for removed aclitem[] ~ aclitem operator.
Commit 2f70fdb06 removed the deprecated containment operator
~(aclitem[],aclitem) from the catalogs, but missed removing its entry
from the documentation.  (Arguably the blame should fall on c62dd80cd,
which added this entry in contravention of the longstanding policy
that we don't document deprecated aliases in the first place.)

Author: Shinya Kato <shinya11.kato@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAOzEurQSyR5psWukyhUz1LtxyO55C2Vfp0Fmt8w2jGKxhszQmQ@mail.gmail.com
Backpatch-through: 14
2026-06-14 11:01:48 -04:00
Fujii Masao
67bd944c0e doc: fix reference for finding replication slots to drop
Commit a70bce43fb added instructions on how to recover if PostgreSQL
refuses to issue new transaction IDs because of imminent wraparound,
but when describing how to find replication slots that should be dropped,
it referred to pg_stat_replication where it should have referenced
pg_replication_slots.

In passing, decorate references to views with <structname> tags.

Backpatch to all supported versions.

Reported-By: Sanjaya Waruna <sanjaya.waruna@gmail.com>
Author: Laurenz Albe <laurenz.albe@cybertec.at>
Reviewed-by: Robert Treat <rob@xzilla.net>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/176767268098.1084085.10345048667224193115@wrigleys.postgresql.org
Backpatch-through: 14
2026-06-12 11:08:33 +09:00
Nathan Bossart
1541d91d1c doc: Expand on proper use of refint.
The security team has received a couple of reports about potential
SQL injection via refint's trigger arguments.  We discussed this
while preparing CVE-2026-6637 and concluded that forcibly quoting
these arguments is more likely to break working code than to
prevent exploits.  Unlike data values, the table/column names come
from trigger arguments, and there is little reason for a trigger
author to put hostile inputs into those arguments.  So, let's
document it accordingly.

Reported-by: Nikolay Samokhvalov <nik@postgres.ai>
Reported-by: Alex Young <alex000young@gmail.com>
Reported-by: Satyanarayana Narlapuram <satyanarlapuram@gmail.com>
Suggested-by: Noah Misch <noah@leadboat.com>
Reviewed-by: Noah Misch <noah@leadboat.com>
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com>
Reviewed-by: Christoph Berg <myon@debian.org>
Reviewed-by: Satyanarayana Narlapuram <satyanarlapuram@gmail.com>
Discussion: https://postgr.es/m/ahXP7z7nsfGPOZ3T%40nathan
Backpatch-through: 14
2026-06-08 10:33:52 -05:00
Daniel Gustafsson
f58623faa8 doc: Fix spelling for CHECKPOINT reference page
Fixing incorrect spelling and breaking up a long sentence.

Author: Daniel Gustafsson <daniel@yesql.se>
Reported-by: Thom Brown <thom@linux.com>
Discussion: https://postgr.es/m/CAA-aLv5pZNZbdhPG2Wu0fzyKCjn9TTzN9QZ=JONPyqZQKhBV=g@mail.gmail.com
2026-06-08 11:03:54 +02:00
Fujii Masao
4484165b07 ecpg: Reject multiple header items in GET/SET DESCRIPTOR
Previously, ecpg accepted multiple descriptor header items in GET DESCRIPTOR
and SET DESCRIPTOR, but generated broken C code when they were used.
Although the grammar allowed this syntax, the implementation did not actually
support it.

This commit tightens the ecpg grammar so the header form of GET/SET DESCRIPTOR
accepts only a single header item, matching the implementation and preventing
generation of broken C code.

Also update the documentation synopsis accordingly.

Backpatch to all supported versions.

Author: Masashi Kamura <kamura.masashi@fujitsu.com>
Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Reviewed-by: Lakshmi G <lakshmigcdac@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/OS9PR01MB13174AD7D1829D0644B6BB90E9447A@OS9PR01MB13174.jpnprd01.prod.outlook.com
Backpatch-through: 14
2026-06-08 17:09:46 +09:00
Amit Kapila
da51d9154d Doc: Add missing SGML markup in alter_publication.sgml.
Author: Peter Smith <smithpb2250@gmail.com>
Discussion: https://postgr.es/m/CAHut+Pu7Zxm3oU7OyK3FVXRuDO+V6143adGUC6nnSrhqizYqQQ@mail.gmail.com
2026-06-08 11:26:25 +05:30
Bruce Momjian
eb77a52199 doc PG 19 relnotes: improve awkward or confusing wording
Reported-by: Álvaro Herrera

Discussion: https://postgr.es/m/aiQPgZtALNqj4npv@alvherre.pgsql
2026-06-07 23:27:28 -04:00
Daniel Gustafsson
4cb2e2fe0a doc: Clarify OAuth validator authn_id logging
Document that OAuth validators can return an authenticated identity
in the authn_id member.  The server records the identity value before
checking if the connection is authorized, so it may appear in
connection-authentication logs (even if the connection later fails
authorization).

Also remove outdated wording saying that all result parameters are
ignored when a validator returns false since validators may provide
error_detail.

Patch by Chao Li with some additional wordsmithing by me.

Author: Chao Li <lic@highgo.com>
Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com>
Reported-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/0281836A-F5FF-41A5-9EE1-656C1FAAC6B2@gmail.com
2026-06-06 00:18:30 +02:00
Daniel Gustafsson
55136e378c doc: Use groups instead of curves in TLS documentation
With TLS 1.3 the concept of curves was renamed to groups.  Update
our wording to use groups instead of curves to make it clear what
the underlying GUC can support.

This was extracted from a slightly larger patch which also renamed
variables to match the new terminology.  Given that we are in beta
this portion was however left as a future excercise.

Author: Evan Si <evsi@amazon.com>
Reviewed-by: Ewan Young <kdbase.hack@gmail.com>
Discussion: https://postgr.es/m/23C40DD6-1C47-46FC-A746-8A1D8530AD3E@amazon.com
Backpatch-through: 18
2026-06-05 22:16:42 +02:00
Bruce Momjian
4ebae546ac doc PG 19 relnotes: update to current, merge items 2026-06-05 14:05:01 -04:00
Bruce Momjian
b45137f315 doc PG 19 relnotes: add more markup, move some items to sysviews
Also remove duplicate psql tab completion authors.

Reported-by: duplicates reported by Yugo Nagata
2026-06-05 11:38:54 -04:00
Daniel Gustafsson
4ae3e98c02 doc: Mention online checksum enabling in pg_checksums docs
The documentation for bin/pg_checksums refered to online processing only
in passing, this extends the documentation to list online checksums as as
alternative as well as providing a link to the new Data Checksums section.

Author: Daniel Gustafsson <daniel@yesql.se>
Reviewed-by: Bruce Momjian <bruce@momjian.us>
Reported-by: Bruce Momjian <bruce@momjian.us>
Discussion: https://postgr.es/m/aiHKJWa1k28fFTqf@momjian.us
2026-06-05 00:12:33 +02:00
Bruce Momjian
7598b5383b doc PG 19 relnotes: various fixes reported via email 2026-06-04 12:26:58 -04:00
Bruce Momjian
378668d50b doc PG 19 relnotes: merge pg_upgrade LO metadata items
Also fix commit message cut/paste mistake, and add "tar" markup.
2026-06-03 14:21:05 -04:00
Bruce Momjian
41ddb9c33e doc PG 19 relnotes: reordering, rewording, added markup 2026-06-03 13:48:21 -04:00
Bruce Momjian
78ec4b69a0 doc PG 19 relnotes: add links for functions and stucts 2026-05-31 23:19:18 -04:00
Bruce Momjian
4ff6150988 doc PG 19 relnotes: first phase of markup additions 2026-05-31 22:54:03 -04:00
Bruce Momjian
3934321834 doc: add missing xreflabel to debug_print_raw_parse 2026-05-31 16:17:49 -04:00
Bruce Momjian
21298c2cd0 doc relnote markup: allow period in <command> regex for ellipses 2026-05-30 17:49:26 -04:00
Bruce Momjian
3e744cc745 doc PG 19 relnotes: adjust pg_read_all_data & pg_write_all_data
These were previously marked as functions, not roles, and were in the
wrong section.

Reported-by: 彭冲 <chong.peng@enmotech.com>

Discussion: https://postgr.es/m/tencent_5468291122A490C6578D9467@qq.com
2026-05-30 14:55:32 -04:00
Jacob Champion
08127c641c doc: Correct the timeline for OAuth's shutdown_cb
During original feature development, the OAuth validator shutdown
callback was invoked via before_shmem_exit(). That was changed to use a
reset callback before commit, but I forgot to update the documentation
for validator developers.

Correct this and backport to 18, where OAuth was introduced. The
callback is invoked whenever the server is "finished" with token
validation. (We make no stronger guarantees here, in the hopes that this
API might successfully navigate future multifactor authentication
support and/or changes to the server threading model.)

Reported-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CAN4CZFOuMb_gnLvCwRdMybg_k8WRNJTjcij%2BPoQkuQHDUzxGWg%40mail.gmail.com
Backpatch-through: 18
2026-05-29 14:40:20 -07:00
Bruce Momjian
9a41b34a28 doc: add comma to UPDATE docs, for consistency
Reported-by: X-MAN

Author: X-MAN

Discussion: https://postgr.es/m/tencent_90A64D807DE3586650CF3426C28BB599D30A@qq.com
2026-05-26 20:18:00 -04:00
Bruce Momjian
8656ba7f71 doc PG 19 relnotes: more fixes
Reported-by: Thom Brown

Author: Thom Brown

Discussion: https://postgr.es/m/CAA-aLv7B7M9s5fZgCoWzXqer5RJ9jqG_k0h8t5QHFW=Qbxa=Eg@mail.gmail.com
2026-05-26 17:49:31 -04:00
Bruce Momjian
1d751b4b6b doc PG 19 relnotes: various corrections
Reported-by: Thom Brown

Author: Thom Brown

Discussion: https://postgr.es/m/CAA-aLv7w1wwucet76yAW0yq3-LrN5wL81uRrnpT3Tyxh7dmyTw@mail.gmail.com
2026-05-26 16:31:58 -04:00
Bruce Momjian
cfedd45133 doc PG 19 relnotes: adjust item to mention pg_replication_slots
Reported-by: Chong Peng

Author: Chong Peng

Discussion: https://postgr.es/m/CC2712F9-8457-4733-AA9D-7D7C9843B590@gmail.com
2026-05-26 10:59:30 -04:00
Fujii Masao
5f5165e2fe dblink: Give user mapping precedence for use_scram_passthrough
Commit 97f6fc10ff changed postgres_fdw so that user-mapping settings
override foreign server settings for use_scram_passthrough. This commit
applies the same behavior to dblink.

Backpatch to v18, where use_scram_passthrough was introduced.

Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwEJ8rZjmbOvCicyr4vbuLio082bNTde0WNoSWaWr9wVcg@mail.gmail.com
Backpatch-through: 18
2026-05-26 00:51:18 +09:00
Fujii Masao
97f6fc10ff postgres_fdw: Give user mapping precedence for use_scram_passthrough
Previously, when use_scram_passthrough was specified on both a foreign server
and a user mapping, the server-level setting took precedence over the
user-mapping setting. This was inconsistent with the usual semantics of
postgres_fdw options, where foreign server options provide shared defaults
and user mapping options override them on a per-user basis.

This commit updates postgres_fdw so that the user-mapping setting takes
precedence when use_scram_passthrough is specified in both places. This
matches the behavior of other connection options such as sslcert and sslkey.

Backpatch to v18, where use_scram_passthrough was introduced. In v18,
this only affects limited configurations that specify conflicting values
at both the foreign server and user-mapping levels. In such cases, users
would naturally expect the user-mapping setting to override the server-level
setting, so changing the behavior should be minimally disruptive.
Also keeping v18 as the only branch with different semantics for
use_scram_passthrough would be unnecessarily confusing, so backpatch
this fix to v18.

Author: Matheus Alcantara <matheusssilv97@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwEJ8rZjmbOvCicyr4vbuLio082bNTde0WNoSWaWr9wVcg@mail.gmail.com
Backpatch-through: 18
2026-05-26 00:46:31 +09:00
Daniel Gustafsson
377cc45194 doc: Clarify CHECKPOINT handling of unlogged buffers
The CHECKPOINT reference page still described checkpoints as flushing
all data files, which could be misleading as it depends on the value
of FLUSH_UNLOGGED option.  Update the description to make it clearer
that only data files of permanent relations are flushed by default.

Author: Chao Li <lic@highgo.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/4855807D-F1CA-44E6-9B58-406691832848@gmail.com
2026-05-25 12:15:29 +02:00
Álvaro Herrera
01a80f0621
Revert "Allow logical replication snapshots to be database-specific"
This reverts commit 0d3dba38c7, which was determined to have
fundamental flaws.  This restricts REPACK (CONCURRENTLY) so that only
one process can run it concurrently on different tables and even on
different databases; we'll lift that restriction in another way during
the next development cycle.

Reported-by: Amit Kapila <amit.kapila16@gmail.com>
Discussion: https://postgr.es/m/CAA4eK1Jg21ODQ7fS2fvN5W_S5kDRhAP5inj3XMRQaa=s-GbYhw@mail.gmail.com
2026-05-23 21:33:19 -07:00
Fujii Masao
263d1e6dfe pg_recvlogical: Honor source cluster file permissions for output files
Commit c37b3d08ca attempted to preserve group permissions on pg_recvlogical
output files when group access was enabled on the source cluster. However,
the output files were still created with a fixed S_IRUSR | S_IWUSR mode,
preventing group-read permissions from being applied.

This commit fixes the issue by creating output files with pg_file_create_mode
instead of a hard-coded mode. This allows pg_recvlogical to correctly preserve
group permissions from the source cluster.

Backpatch to all supported branches.

Author: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: Srinath Reddy Sadipiralla <srinath2133@gmail.com>
Discussion: https://postgr.es/m/CAHGQGwHhpizYzMo3nFP4GkNMueSNMY3QfC-gBN1VTXtuiANDvw@mail.gmail.com
Backpatch-through: 14
2026-05-20 15:54:13 +09:00
Alexander Korotkov
83df16f1fa Clarify SPLIT PARTITION bound requirements in docs
The documentation said that the bounds of new partitions should not
overlap and that their combined bounds should equal the bounds of the
split partition.  That is misleading when a new DEFAULT partition is
specified, because the explicit partitions may cover only part of the
split partition while the DEFAULT partition covers the rest.

Clarify that new non-DEFAULT partition bounds must not overlap with
other new or existing partitions and must be contained within the bounds
of the split partition.  Also state that the combined bounds must exactly
match the split partition only when no new DEFAULT partition is specified.

While here, improve nearby wording about hash-partitioned target tables
and splitting a DEFAULT partition with the same partition name.

Author: Chao Li <lic@highgo.com>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
Discussion: https://postgr.es/m/C18878AB-DEB2-4A61-9995-A035DD644B81@gmail.com
2026-05-19 13:54:55 +03:00
Michael Paquier
4111b91ab3 doc: Fix example of pg_restore_extended_stats()
Oversight in ba97bf9cb7, probably due to an incorrect rebase.

Author: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/8A72720A-55AC-4D41-B9DF-5610307600E6@gmail.com
2026-05-17 07:36:04 +09:00
Andres Freund
5ba34f6dc8 pg_test_timing: Show additional TSC clock source debug info
In some cases its necessary to understand whether TSC frequency data was
sourced from CPUID, and which of the registers. Show this debug info at
the end of pg_test_timing, and rework TSC functions to support that.

This would have helped debug the buildfarm report fixed in 7fc36c5db5
and is likely going to aid in any TSC-related issues reported during the
beta period or later.

Additionally, emit a warning if TSC frequency from calibration differs
by more than 10% from the TSC frequency in use, and suggest the use
of timing_clock_source = 'system'.

In passing, add an explicit early return in the output function if the
loop count is zero. This can't happen in practice, but coverity complained
because we unconditionally call output for the fast TSC measurement.

Author: Lukas Fittl <lukas@fittl.com>
Suggested-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Haibo Yan <tristan.yim@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> (coverity fix only)
Discussion: https://postgr.es/m/CAP53Pkw3Gzb+KTF5pu_o7tzbfZ7+qm2m6uDWuGtTJjZpV9yNpg@mail.gmail.com
2026-05-16 11:51:34 -04:00
Bruce Momjian
41b60bf172 doc PG 19 relnotes: remove "Add fake LSN support to hash index"
Also add missing commit link to json_array() item.

Reported-by: Peter Geoghegan

Discussion: https://postgr.es/m/CAH2-Wzm1UAuv9ih6_ATbwbmrmusKPoJ2qSo3HBF-JaUEkVYUPg@mail.gmail.com
2026-05-15 13:26:50 -04:00
Bruce Momjian
6b48f5d1a7 doc PG 19 relnotes: update to current 2026-05-14 16:37:47 -04:00
Tom Lane
2122281672 Use "grep -E" not "egrep".
"egrep" has never been in POSIX; the standard way to access this
functionality is "grep -E".  Recent versions of GNU grep have
started to warn about this, so stop using "egrep".

This could be back-patched, but I see little need to do so
because the affected places are not code that runs during
normal builds.  (Perhaps src/backend/port/aix/mkldexport.sh
is an exception, but let's wait to see if any AIX users
complain before touching that.)

Author: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/473272.1778685870@sss.pgh.pa.us
2026-05-13 12:07:19 -04:00
Bruce Momjian
cac0f24eb5 doc PG 19 relnotes: add two optimizer hooks
Reported-by: Jian He

Discussion: https://postgr.es/m/CACJufxE8Ew_DCXtd1VZSC=pNPHqZRa4RJkbCr7z6ZPJJ3o3hGQ@mail.gmail.com
2026-05-12 16:16:33 -04:00
Bruce Momjian
06fccab4c6 doc PG 19 relnotes: remove "Optionally" for CPU optimizations
Reported-by: John Naylor

Discussion: https://postgr.es/m/CANWCAZZWfdoMcemSaTMon+e6aCkSABN3+sco0aStC90cFPVE4A@mail.gmail.com
2026-05-12 15:13:46 -04:00
Bruce Momjian
8974a7c433 doc PG 19 relnotes: adjustments/removal of items
Reported-by: John Naylor

Discussion: https://postgr.es/m/CANWCAZZWfdoMcemSaTMon+e6aCkSABN3+sco0aStC90cFPVE4A@mail.gmail.com
2026-05-11 17:43:15 -04:00
Nathan Bossart
bd48114937 Mark PQfn() unsafe and fix overrun in frontend LO interface.
When result_is_int is set to 0, PQfn() cannot validate that the
result fits in result_buf, so it will write data beyond the end of
the buffer when the server returns more data than requested.  Since
this function is insecurable and obsolete, add a warning to the top
of the pertinent documentation advising against its use.

The only in-tree caller of PQfn() is the frontend large object
interface.  To fix that, add a buf_size parameter to
pqFunctionCall3() that is used to protect against overruns, and use
it in a private version of PQfn() that also accepts a buf_size
parameter.

Reported-by: Yu Kunpeng <yu443940816@live.com>
Reported-by: Martin Heistermann <martin.heistermann@unibe.ch>
Author: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Noah Misch <noah@leadboat.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Etsuro Fujita <etsuro.fujita@gmail.com>
Security: CVE-2026-6477
Backpatch-through: 14
2026-05-11 05:13:47 -07:00
Bruce Momjian
12ca57bf34 doc PG 19 relnotes: add UTF-8 case folding performance item
Reported-by: Andreas Karlsson

Discussion: https://postgr.es/m/9dae1593-4441-4a20-a1ab-ce5018db9878@proxel.se
2026-05-07 20:53:41 -04:00
Bruce Momjian
2d773a9f00 doc PG 19 relnotes: correct two items
Reported-by: jian he

Discussion: https://postgr.es/m/CACJufxG_ZTCTtFMxKiVji-s10jHt99krfH+Kn+Ww2prF=X6g6Q@mail.gmail.com
2026-05-07 20:21:16 -04:00
Bruce Momjian
4c0f1e4910 doc PG 19 relnotes: add missing commits and details
Reported-by: Xuneng Zhou

Discussion: https://postgr.es/m/CABPTF7VxrFB_4Qoo2=PyrczGyq8CqOpQ5D5yye3DyxDC=so_0Q@mail.gmail.com
2026-05-07 18:02:21 -04:00
Peter Eisentraut
43dc21f76f Document deprecated --wal-directory option for pg_verifybackup
Commit b3cf461b3c renamed --wal-directory to --wal-path but retained
the former as a silent alias.  Per project policy, all options,
including deprecated ones, should be documented to assist users
transitioning between versions.

This patch restores --wal-directory to the documentation and --help
output.

Author: Amul Sul <sulamul@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/E1w3fZp-000gje-31%40gemulon.postgresql.org
2026-05-06 10:45:42 +02:00
Peter Eisentraut
d0ed9ad8b0 doc: Clean up title case use 2026-05-05 11:24:16 +02:00
Peter Eisentraut
1190f858ea doc: Small synopsis wording change for consistency 2026-05-05 09:27:32 +02:00
Peter Eisentraut
abff4492d0 Fix options listing of pg_restore --no-globals
The new pg_restore option --no-globals (commit 3c19983cc0) appeared
out of order in the documentation and help output.  Fix that.
2026-05-04 12:00:22 +02:00
Peter Eisentraut
2fcc8aaeb2 doc: Fix up spacing around verbatim DocBook elements 2026-05-04 09:45:40 +02:00
Alexander Korotkov
21d290161b Document that WAIT FOR LSN is timeline-blind
WAIT FOR LSN compares only the numeric LSN and has no notion of which
timeline a WAL record belongs to.  There are many possible scenarios when
timeline-switching can break read-your-writes consistency.  The proper
analysis and timeline support is possible in the next major release.  Yet
just document the current behaviour.

Reported-by: Xuneng Zhou <xunengzhou@gmail.com>
Author: Alexander Korotkov <aekorotkov@gmail.com>
2026-05-03 16:22:02 +03:00
Alexander Korotkov
cba67b5b87 Use replay position as floor for WAIT FOR LSN standby_(write|flush)
GetCurrentLSNForWaitType() for standby_write and standby_flush modes
returned only the walreceiver position, which may lag behind WAL
already present on the standby from a base backup, archive restore,
or prior streaming.  This could cause unnecessary blocking if the
target LSN falls between the walreceiver's tracked position and the
replay position.

Fix by returning the maximum of the walreceiver position and the
replay position.  WAL up to the replay point is physically on disk
regardless of its origin, so there is no reason to wait for the
walreceiver to re-receive it.

This complements 29e7dbf5e4, which seeded writtenUpto to
receiveStart in RequestXLogStreaming() to fix the most common
hang scenario.  The getter-level floor handles the remaining edge
cases: targets between receiveStart and the replay position, and
standbys running with archive recovery only (no walreceiver).

Reported-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/1957514.1775526774%40sss.pgh.pa.us
Author: Xuneng Zhou <xunengzhou@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com>
2026-05-03 16:22:02 +03:00