<feed xmlns='http://www.w3.org/2005/Atom'>
<title>postgresql.git/src/bin/pg_basebackup/pg_receivewal.c, 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-08T06:49:30Z</updated>
<entry>
<title>Fix -Wshadow=local warnings</title>
<updated>2026-09-08T06:49:30Z</updated>
<author>
<name>Peter Eisentraut</name>
</author>
<published>2026-09-08T05:42:59Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=f9fc9a78a36517122c0325fd31db5ba6066d82ea'/>
<id>urn:sha1:f9fc9a78a36517122c0325fd31db5ba6066d82ea</id>
<content type='text'>
This fixes issues with the same variable name being used in the same
function for two different variables.  (In some cases, one of the uses
is a function argument.)  The fix is in most cases to rename one or
both of them.  The individual choice depends on conventions in the
surrounding code.  Often, making both variable names more specific is
the best choice.  In a few cases, the fix is to move one of the
variables to a lower scope, so that it no longer conflicts with the
other.

Since these are all local-variable conflicts, the changes in different
files in this patch are independent of each other.

These issues correspond to the gcc warning option -Wshadow=local,
which is not currently used but could be activated after this.

Reviewed-by: Peter Geoghegan &lt;pg@bowt.ie&gt;
Reviewed-by: Chao Li &lt;li.evan.chao@gmail.com&gt;
Discussion: https://www.postgresql.org/message-id/flat/84b6f128-91f5-480e-8a9e-7d0e8f538cea%40eisentraut.org
</content>
</entry>
<entry>
<title>Add common LSN parser for user-supplied locations</title>
<updated>2026-08-12T08:03:46Z</updated>
<author>
<name>Fujii Masao</name>
</author>
<published>2026-08-12T08:03:46Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=d6bf0ab1704c62f94875d25dd71c4baa1feac5be'/>
<id>urn:sha1:d6bf0ab1704c62f94875d25dd71c4baa1feac5be</id>
<content type='text'>
pg_waldump (--start/--end), pg_recvlogical (--startpos/--endpos), and
pg_receivewal (--endpos) parsed user-supplied WAL locations with
sscanf("%X/%08X").  That accepts several forms rejected by pg_lsn input
and can proceed with a different location than the user specified:
overlong components, trailing characters, leading whitespace, signs, and
0x prefixes.

Add pg_parse_lsn() to src/common and use it for those command-line
options.  The helper accepts the pg_lsn text syntax only: one to eight
hexadecimal digits, a slash, one to eight hexadecimal digits, and no
trailing characters.  Each frontend tool keeps its existing error
message.

Use the same helper from pg_lsn_in_safe(), leaving only backend-specific
soft error reporting there.  This keeps frontend command-line validation
and backend pg_lsn input tied to one parser.

Bug: #19598
Reported-by: Michael Malis &lt;malis@pgrust.com&gt;
Author: Zexin Li &lt;lizi.openmind@gmail.com&gt;
Reviewed-by: Ayush Tiwari &lt;ayushtiwari.slg01@gmail.com&gt;
Reviewed-by: Fujii Masao &lt;masao.fujii@gmail.com&gt;
Discussion: https://postgr.es/m/19598-aa67c8f4331611b4@postgresql.org
</content>
</entry>
<entry>
<title>Clean up read() return type</title>
<updated>2026-07-15T07:43:03Z</updated>
<author>
<name>Peter Eisentraut</name>
</author>
<published>2026-07-15T07:43:03Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=ca326e903df4b2efcc7b9090abc4d1a9c27c3088'/>
<id>urn:sha1:ca326e903df4b2efcc7b9090abc4d1a9c27c3088</id>
<content type='text'>
and analogously for pg_pread() and FileRead()

Be sure to store the return value in a variable of type ssize_t, not
int.

Also make the error messages for short reads consistent.  They should
always be like "read %zd of %zu".  Appearance of other placeholders
indicates the types are probably wrong (although in some cases some
casts are added to make macros have the right type and keep the
strings consistent, and it some cases it's left as "%zu of %zu", which
is close enough).

In several cases, the input length is derived from struct stat
st_size, which has type off_t, which is neither size_t nor ssize_t.
To keep the type handling clearer, this introduces intermediate
variables in these cases.

In SendTimeLineHistory() in walsender.c, we need to adjust the logic a
bit to over underflow wrap if we end up reading more from the file
than expected.  This is believed to be a theoretical problem only.
Alternatively, we could treat this as an error.  Note that the
previous code would have processed the extra data but only up to a
full block, which seems wrong in any case.

Reviewed-by: Heikki Linnakangas &lt;hlinnaka@iki.fi&gt;
Discussion: https://www.postgresql.org/message-id/flat/f9aab072-0078-49e4-ab93-3b08086a4406@eisentraut.org
</content>
</entry>
<entry>
<title>Fix variety of typos and grammar mistakes</title>
<updated>2026-02-24T04:26:37Z</updated>
<author>
<name>Michael Paquier</name>
</author>
<published>2026-02-24T04:26:37Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=462fe0ff6215ae222fc866af621e4b86462289b1'/>
<id>urn:sha1:462fe0ff6215ae222fc866af621e4b86462289b1</id>
<content type='text'>
This commit includes a batch of fixes for various minor typos and
grammar mistakes, that have been proposed to the hackers mailing list
since the beginning of January.

Similar batches are planned on a bi-monthly basis depending on the
amount received, with the next one for the end of April.
</content>
</entry>
<entry>
<title>Update copyright for 2026</title>
<updated>2026-01-01T18:24:10Z</updated>
<author>
<name>Bruce Momjian</name>
</author>
<published>2026-01-01T18:24:10Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=451c43974f8e199097d97624a4952ad0973cea61'/>
<id>urn:sha1:451c43974f8e199097d97624a4952ad0973cea61</id>
<content type='text'>
Backpatch-through: 14
</content>
</entry>
<entry>
<title>Use XLogRecPtrIsValid() in various places</title>
<updated>2025-11-06T19:33:57Z</updated>
<author>
<name>Álvaro Herrera</name>
</author>
<published>2025-11-06T19:33:57Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=a2b02293bc65dbb2401cb19c724f52c6ee0f2faf'/>
<id>urn:sha1:a2b02293bc65dbb2401cb19c724f52c6ee0f2faf</id>
<content type='text'>
Now that commit 06edbed47862 has introduced XLogRecPtrIsValid(), we can
use that instead of:

- XLogRecPtrIsInvalid()
- direct comparisons with InvalidXLogRecPtr
- direct comparisons with literal 0

This makes the code more consistent.

Author: Bertrand Drouvot &lt;bertranddrouvot.pg@gmail.com&gt;
Discussion: https://postgr.es/m/aQB7EvGqrbZXrMlg@ip-10-97-1-34.eu-west-3.compute.internal
</content>
</entry>
<entry>
<title>Standardize LSN formatting by zero padding</title>
<updated>2025-07-07T11:57:43Z</updated>
<author>
<name>Álvaro Herrera</name>
</author>
<published>2025-07-07T11:57:43Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=2633dae2e4876a9b7cb90ba025e930a553e5107f'/>
<id>urn:sha1:2633dae2e4876a9b7cb90ba025e930a553e5107f</id>
<content type='text'>
This commit standardizes the output format for LSNs to ensure consistent
representation across various tools and messages.  Previously, LSNs were
inconsistently printed as `%X/%X` in some contexts, while others used
zero-padding.  This often led to confusion when comparing.

To address this, the LSN format is now uniformly set to `%X/%08X`,
ensuring the lower 32-bit part is always zero-padded to eight
hexadecimal digits.

Author: Japin Li &lt;japinli@hotmail.com&gt;
Reviewed-by: Masahiko Sawada &lt;sawada.mshk@gmail.com&gt;
Reviewed-by: Álvaro Herrera &lt;alvherre@kurilemu.de&gt;
Discussion: https://postgr.es/m/ME0P300MB0445CA53CA0E4B8C1879AF84B641A@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM
</content>
</entry>
<entry>
<title>pg_recvlogical: Add --failover option.</title>
<updated>2025-04-04T17:39:57Z</updated>
<author>
<name>Masahiko Sawada</name>
</author>
<published>2025-04-04T17:39:57Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=cf2655a9029aff63dd567dbbdcdee15ec969905d'/>
<id>urn:sha1:cf2655a9029aff63dd567dbbdcdee15ec969905d</id>
<content type='text'>
This new option instructs pg_recvlogical to create the logical
replication slot with the failover option enabled. It can be used in
conjunction with the --create-slot option.

Author: Hayato Kuroda &lt;kuroda.hayato@fujitsu.com&gt;
Reviewed-by: Michael Banck &lt;mbanck@gmx.net&gt;
Reviewed-by: Masahiko Sawada &lt;sawada.mshk@gmail.com&gt;
Discussion: https://postgr.es/m/OSCPR01MB14966C54097FC83AF19F3516BF5AC2@OSCPR01MB14966.jpnprd01.prod.outlook.com
</content>
</entry>
<entry>
<title>Remove various unnecessary (char *) casts</title>
<updated>2025-02-20T18:49:27Z</updated>
<author>
<name>Peter Eisentraut</name>
</author>
<published>2025-02-20T18:49:27Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=3e4d868615408370fe6c2977c32f45a47c372b00'/>
<id>urn:sha1:3e4d868615408370fe6c2977c32f45a47c372b00</id>
<content type='text'>
Remove a number of (char *) casts that are unnecessary.  Or in some
cases, rewrite the code to make the purpose of the cast clearer.

Reviewed-by: Dagfinn Ilmari Mannsåker &lt;ilmari@ilmari.org&gt;
Discussion: https://www.postgresql.org/message-id/flat/fd1fcedb-3492-4fc8-9e3e-74b97f2db6c7%40eisentraut.org
</content>
</entry>
<entry>
<title>Update copyright for 2025</title>
<updated>2025-01-01T16:21:55Z</updated>
<author>
<name>Bruce Momjian</name>
</author>
<published>2025-01-01T16:21:55Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=50e6eb731d98ab6d0e625a0b87fb327b172bbebd'/>
<id>urn:sha1:50e6eb731d98ab6d0e625a0b87fb327b172bbebd</id>
<content type='text'>
Backpatch-through: 13
</content>
</entry>
</feed>
