<feed xmlns='http://www.w3.org/2005/Atom'>
<title>postgresql.git/contrib/basic_archive, 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-07-15T07:43:03Z</updated>
<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 dereference in a couple of GUC check hooks</title>
<updated>2026-03-24T15:45:39Z</updated>
<author>
<name>Álvaro Herrera</name>
</author>
<published>2026-03-24T15:45:39Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=5f2350a043db08ab0ea48d22f51acfa5d9b374d9'/>
<id>urn:sha1:5f2350a043db08ab0ea48d22f51acfa5d9b374d9</id>
<content type='text'>
check_backtrace_functions() and check_archive_directory() were doing an
empty-string check this way:
    *newval[0] == '\0'
which, because of operator precedence, is interpreted as *(newval[0])
instead of (*newval)[0] -- but these variables are pointers to C-strings
and we want to check the first character therein, rather than check the
first pointer of the array, so that interpretation is wrong.  This would
be wrong for any index element other than 0, as evidenced by every other
dereference of the same variable in check_backtrace_functions, which use
parentheses.

Add parentheses to make the intended dereference explicit.

This is just cosmetic at this stage, so no backpatch, although it's been
"wrong" for a long time.

Author: Zhang Hu &lt;kongbaik228@gmail.com&gt;
Reviewed-by: Junwang Zhao &lt;zhjwpku@gmail.com&gt;
Reviewed-by: Chao Li &lt;lic@highgo.com&gt;
Discussion: https://postgr.es/m/CAB5m2QssN6UO+ckr6ZCcV0A71mKUB6WdiTw1nHo43v4DTW1Dfg@mail.gmail.com
</content>
</entry>
<entry>
<title>basic_archive: Allow archive directory to be missing at startup.</title>
<updated>2026-03-02T19:12:25Z</updated>
<author>
<name>Nathan Bossart</name>
</author>
<published>2026-03-02T19:12:25Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=cc774c543b23e91175642a65559aae456f17d89e'/>
<id>urn:sha1:cc774c543b23e91175642a65559aae456f17d89e</id>
<content type='text'>
Presently, the GUC check hook for basic_archive.archive_directory
checks that the specified directory exists.  Consequently, if the
directory does not exist at server startup, archiving will be stuck
indefinitely, even if it appears later.  To fix, remove this check
from the hook so that archiving will resume automatically once the
directory is present.  basic_archive must already be prepared to
deal with the directory disappearing at any time, so no additional
special handling is required.

Reported-by: Олег Самойлов &lt;splarv@ya.ru&gt;
Reviewed-by: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Reviewed-by: Fujii Masao &lt;masao.fujii@gmail.com&gt;
Reviewed-by: Sergei Kornilov &lt;sk@zsrv.org&gt;
Discussion: https://postgr.es/m/73271769675212%40mail.yandex.ru
Backpatch-through: 15
</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>Remove translation marker from libpq-be-fe-helpers.h.</title>
<updated>2025-07-22T13:08:36Z</updated>
<author>
<name>Fujii Masao</name>
</author>
<published>2025-07-22T13:08:36Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=a7ca73af662bc95e14058ac3f8fcf5d257f8bf79'/>
<id>urn:sha1:a7ca73af662bc95e14058ac3f8fcf5d257f8bf79</id>
<content type='text'>
Commit 112faf1378e introduced a translation marker in libpq-be-fe-helpers.h,
but this caused build failures on some platforms—such as the one reported
by buildfarm member indri—due to linker issues with dblink. This is the same
problem previously addressed in commit 213c959a294.

To fix the issue, this commit removes the translation marker from
libpq-be-fe-helpers.h, following the approach used in 213c959a294.
It also removes the associated gettext_noop() calls added in commit
112faf1378e, as they are no longer needed.

While reviewing this, a gettext_noop() call was also found in
contrib/basic_archive. Since contrib modules don't support translation,
this call has been removed as well.

Per buildfarm member indri.

Author: Fujii Masao &lt;masao.fujii@gmail.com&gt;
Reviewed-by: Álvaro Herrera &lt;alvherre@kurilemu.de&gt;
Discussion: https://postgr.es/m/0e6299d9-608a-4ffa-aeb1-40cb8a99000b@oss.nttdata.com
</content>
</entry>
<entry>
<title>Use PG_MODULE_MAGIC_EXT in our installable shared libraries.</title>
<updated>2025-03-26T15:11:02Z</updated>
<author>
<name>Tom Lane</name>
</author>
<published>2025-03-26T15:11:02Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=55527368bd07248e91e3d37a782bf66b76f06865'/>
<id>urn:sha1:55527368bd07248e91e3d37a782bf66b76f06865</id>
<content type='text'>
It seems potentially useful to label our shared libraries with version
information, now that a facility exists for retrieving that.  This
patch labels them with the PG_VERSION string.  There was some
discussion about using semantic versioning conventions, but that
doesn't seem terribly helpful for modules with no SQL-level presence;
and for those that do have SQL objects, we typically expect them
to support multiple revisions of the SQL definitions, so it'd still
not be very helpful.

I did not label any of src/test/modules/.  It seems unnecessary since
we don't install those, and besides there ought to be someplace that
still provides test coverage for the original PG_MODULE_MAGIC macro.

Author: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Discussion: https://postgr.es/m/dd4d1b59-d0fe-49d5-b28f-1e463b68fa32@gmail.com
</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>
<entry>
<title>Remove unused #include's from contrib, pl, test .c files</title>
<updated>2024-10-28T07:02:17Z</updated>
<author>
<name>Peter Eisentraut</name>
</author>
<published>2024-10-28T07:02:17Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=9be4e5d293b554d8a0800790c57fc707a3b5cf0f'/>
<id>urn:sha1:9be4e5d293b554d8a0800790c57fc707a3b5cf0f</id>
<content type='text'>
as determined by IWYU

Similar to commit dbbca2cf299, but for contrib, pl, and src/test/.

Reviewed-by: Alvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Discussion: https://www.postgresql.org/message-id/flat/0df1d5b1-8ca8-4f84-93be-121081bde049%40eisentraut.org
</content>
</entry>
<entry>
<title>Add built-in ERROR handling for archive callbacks.</title>
<updated>2024-04-03T03:28:11Z</updated>
<author>
<name>Nathan Bossart</name>
</author>
<published>2024-04-03T03:28:11Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=c627d944e6c2620fb3b28f2e4b27e19212f84045'/>
<id>urn:sha1:c627d944e6c2620fb3b28f2e4b27e19212f84045</id>
<content type='text'>
Presently, the archiver process restarts when an archive callback
ERRORs.  To avoid this, archive module authors can use sigsetjmp(),
manage a memory context, etc., but that requires a lot of extra
code that will likely look roughly the same between modules.  This
commit adds basic archive callback ERROR handling to pgarch.c so
that module authors won't ordinarily need to worry about this.
While this built-in handler attempts to clean up anything that an
archive module could conceivably have left behind, it is possible
that some modules are doing unexpected things that require
additional cleanup.  Module authors should be sure to do any extra
required cleanup in a PG_CATCH block within the archiving callback.

The archiving callback is now called in a short-lived memory
context that the archiver process resets between invocations.  If a
module requires longer-lived storage, it must maintain its own
memory context.

Thanks to these changes, the basic_archive module can be greatly
simplified.

Suggested-by: Andres Freund
Reviewed-by: Andres Freund, Yong Li
Discussion: https://postgr.es/m/20230217215624.GA3131134%40nathanxps13
</content>
</entry>
<entry>
<title>Add macro for customizing an archiving WARNING message.</title>
<updated>2024-03-04T21:41:42Z</updated>
<author>
<name>Nathan Bossart</name>
</author>
<published>2024-03-04T21:41:42Z</published>
<link rel='alternate' type='text/html' href='http://git.postgresql.org/cgit/postgresql.git/commit/?id=2c29e7fc95b24f5ccfec0d2db458d2130606f446'/>
<id>urn:sha1:2c29e7fc95b24f5ccfec0d2db458d2130606f446</id>
<content type='text'>
Presently, if an archive module's check_configured_cb callback
returns false, a generic WARNING message is emitted, which
unfortunately provides no actionable details about the reason why
the module is not configured.  This commit introduces a macro that
archive module authors can use to add a DETAIL line to this WARNING
message.

Co-authored-by: Tung Nguyen
Reviewed-by: Daniel Gustafsson, Álvaro Herrera
Discussion: https://postgr.es/m/4109578306242a7cd5661171647e11b2%40oss.nttdata.com
</content>
</entry>
</feed>
