<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/postgresql.git/src/bin/pg_rewind, branch master</title>
<subtitle>git.postgresql.org: git/postgresql.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/'/>
<entry>
<title>Fix overridden callbacks in pg_rewind.</title>
<updated>2023-05-02T11:15:29+00:00</updated>
<author>
<name>Daniel Gustafsson</name>
<email>dgustafsson@postgresql.org</email>
</author>
<published>2023-05-02T11:15:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=08237056f84e3a9ed75e8a698428c669f4d35db4'/>
<id>08237056f84e3a9ed75e8a698428c669f4d35db4</id>
<content type='text'>
The &lt;source&gt;_traverse_files functions take a callback for processing
files, but both the local and libpq source implementations called the
function directly without using the callback argument. While there is
no bug right now as the function called is the same as the callback,
fix by calling the callback to reduce the risk of subtle bugs in the
future.

Author: Junwang Zhao &lt;zhjwpku@gmail.com&gt;
Reviewed-by: Richard Guo &lt;guofenglinux@gmail.com&gt;
Discussion: https://postgr.es/m/CAEG8a3Jdwgh+PZr2zh1=t8apA4Yz8tKq+uubPqoCt14nvWKHEw@mail.gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The &lt;source&gt;_traverse_files functions take a callback for processing
files, but both the local and libpq source implementations called the
function directly without using the callback argument. While there is
no bug right now as the function called is the same as the callback,
fix by calling the callback to reduce the risk of subtle bugs in the
future.

Author: Junwang Zhao &lt;zhjwpku@gmail.com&gt;
Reviewed-by: Richard Guo &lt;guofenglinux@gmail.com&gt;
Discussion: https://postgr.es/m/CAEG8a3Jdwgh+PZr2zh1=t8apA4Yz8tKq+uubPqoCt14nvWKHEw@mail.gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix typos in comments</title>
<updated>2023-05-02T03:23:08+00:00</updated>
<author>
<name>Michael Paquier</name>
<email>michael@paquier.xyz</email>
</author>
<published>2023-05-02T03:23:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=8961cb9a0315fa23458587b3df547ca8d8e00f85'/>
<id>8961cb9a0315fa23458587b3df547ca8d8e00f85</id>
<content type='text'>
The changes done in this commit impact comments with no direct
user-visible changes, with fixes for incorrect function, variable or
structure names.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/e8c38840-596a-83d6-bd8d-cebc51111572@gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The changes done in this commit impact comments with no direct
user-visible changes, with fixes for incorrect function, variable or
structure names.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/e8c38840-596a-83d6-bd8d-cebc51111572@gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing source files to nls.mk</title>
<updated>2023-04-14T07:56:04+00:00</updated>
<author>
<name>Peter Eisentraut</name>
<email>peter@eisentraut.org</email>
</author>
<published>2023-04-14T07:56:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=99322d6eee6445665c1fb131ec6130924b7673b6'/>
<id>99322d6eee6445665c1fb131ec6130924b7673b6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce PG_IO_ALIGN_SIZE and align all I/O buffers.</title>
<updated>2023-04-08T04:34:50+00:00</updated>
<author>
<name>Thomas Munro</name>
<email>tmunro@postgresql.org</email>
</author>
<published>2023-04-07T22:38:09+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=faeedbcefd40bfdf314e048c425b6d9208896d90'/>
<id>faeedbcefd40bfdf314e048c425b6d9208896d90</id>
<content type='text'>
In order to have the option to use O_DIRECT/FILE_FLAG_NO_BUFFERING in a
later commit, we need the addresses of user space buffers to be well
aligned.  The exact requirements vary by OS and file system (typically
sectors and/or memory pages).  The address alignment size is set to
4096, which is enough for currently known systems: it matches modern
sectors and common memory page size.  There is no standard governing
O_DIRECT's requirements so we might eventually have to reconsider this
with more information from the field or future systems.

Aligning I/O buffers on memory pages is also known to improve regular
buffered I/O performance.

Three classes of I/O buffers for regular data pages are adjusted:
(1) Heap buffers are now allocated with the new palloc_aligned() or
MemoryContextAllocAligned() functions introduced by commit 439f6175.
(2) Stack buffers now use a new struct PGIOAlignedBlock to respect
PG_IO_ALIGN_SIZE, if possible with this compiler.  (3) The buffer
pool is also aligned in shared memory.

WAL buffers were already aligned on XLOG_BLCKSZ.  It's possible for
XLOG_BLCKSZ to be configured smaller than PG_IO_ALIGNED_SIZE and thus
for O_DIRECT WAL writes to fail to be well aligned, but that's a
pre-existing condition and will be addressed by a later commit.

BufFiles are not yet addressed (there's no current plan to use O_DIRECT
for those, but they could potentially get some incidental speedup even
in plain buffered I/O operations through better alignment).

If we can't align stack objects suitably using the compiler extensions
we know about, we disable the use of O_DIRECT by setting PG_O_DIRECT to
0.  This avoids the need to consider systems that have O_DIRECT but
can't align stack objects the way we want; such systems could in theory
be supported with more work but we don't currently know of any such
machines, so it's easier to pretend there is no O_DIRECT support
instead.  That's an existing and tested class of system.

Add assertions that all buffers passed into smgrread(), smgrwrite() and
smgrextend() are correctly aligned, unless PG_O_DIRECT is 0 (= stack
alignment tricks may be unavailable) or the block size has been set too
small to allow arrays of buffers to be all aligned.

Author: Thomas Munro &lt;thomas.munro@gmail.com&gt;
Author: Andres Freund &lt;andres@anarazel.de&gt;
Reviewed-by: Justin Pryzby &lt;pryzby@telsasoft.com&gt;
Discussion: https://postgr.es/m/CA+hUKGK1X532hYqJ_MzFWt0n1zt8trz980D79WbjwnT-yYLZpg@mail.gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to have the option to use O_DIRECT/FILE_FLAG_NO_BUFFERING in a
later commit, we need the addresses of user space buffers to be well
aligned.  The exact requirements vary by OS and file system (typically
sectors and/or memory pages).  The address alignment size is set to
4096, which is enough for currently known systems: it matches modern
sectors and common memory page size.  There is no standard governing
O_DIRECT's requirements so we might eventually have to reconsider this
with more information from the field or future systems.

Aligning I/O buffers on memory pages is also known to improve regular
buffered I/O performance.

Three classes of I/O buffers for regular data pages are adjusted:
(1) Heap buffers are now allocated with the new palloc_aligned() or
MemoryContextAllocAligned() functions introduced by commit 439f6175.
(2) Stack buffers now use a new struct PGIOAlignedBlock to respect
PG_IO_ALIGN_SIZE, if possible with this compiler.  (3) The buffer
pool is also aligned in shared memory.

WAL buffers were already aligned on XLOG_BLCKSZ.  It's possible for
XLOG_BLCKSZ to be configured smaller than PG_IO_ALIGNED_SIZE and thus
for O_DIRECT WAL writes to fail to be well aligned, but that's a
pre-existing condition and will be addressed by a later commit.

BufFiles are not yet addressed (there's no current plan to use O_DIRECT
for those, but they could potentially get some incidental speedup even
in plain buffered I/O operations through better alignment).

If we can't align stack objects suitably using the compiler extensions
we know about, we disable the use of O_DIRECT by setting PG_O_DIRECT to
0.  This avoids the need to consider systems that have O_DIRECT but
can't align stack objects the way we want; such systems could in theory
be supported with more work but we don't currently know of any such
machines, so it's easier to pretend there is no O_DIRECT support
instead.  That's an existing and tested class of system.

Add assertions that all buffers passed into smgrread(), smgrwrite() and
smgrextend() are correctly aligned, unless PG_O_DIRECT is 0 (= stack
alignment tricks may be unavailable) or the block size has been set too
small to allow arrays of buffers to be all aligned.

Author: Thomas Munro &lt;thomas.munro@gmail.com&gt;
Author: Andres Freund &lt;andres@anarazel.de&gt;
Reviewed-by: Justin Pryzby &lt;pryzby@telsasoft.com&gt;
Discussion: https://postgr.es/m/CA+hUKGK1X532hYqJ_MzFWt0n1zt8trz980D79WbjwnT-yYLZpg@mail.gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>meson: add install-{quiet, world} targets</title>
<updated>2023-03-24T04:20:18+00:00</updated>
<author>
<name>Andres Freund</name>
<email>andres@anarazel.de</email>
</author>
<published>2023-03-24T04:20:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=e522049f23998e64fd0b88cd66de8e8f42100bf1'/>
<id>e522049f23998e64fd0b88cd66de8e8f42100bf1</id>
<content type='text'>
To define our own install target, we need dependencies on the i18n targets,
which we did not collect so far.

Discussion: https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c564a@enterprisedb.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To define our own install target, we need dependencies on the i18n targets,
which we did not collect so far.

Discussion: https://postgr.es/m/3fc3bb9b-f7f8-d442-35c1-ec82280c564a@enterprisedb.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Break up long GETTEXT_FILES lists</title>
<updated>2023-03-08T14:05:43+00:00</updated>
<author>
<name>Peter Eisentraut</name>
<email>peter@eisentraut.org</email>
</author>
<published>2023-03-08T14:05:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=2a71ad64cb27a86afa2a86bde70df3522aee7bae'/>
<id>2a71ad64cb27a86afa2a86bde70df3522aee7bae</id>
<content type='text'>
One file per line seems best.  We already did this in some cases.
This adopts the same format everywhere (except in some cases where the
list reasonably fits on one line).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One file per line seems best.  We already did this in some cases.
This adopts the same format everywhere (except in some cases where the
list reasonably fits on one line).
</pre>
</div>
</content>
</entry>
<entry>
<title>pg_rewind: Fix determining TLI when server was just promoted.</title>
<updated>2023-02-23T13:22:53+00:00</updated>
<author>
<name>Heikki Linnakangas</name>
<email>heikki.linnakangas@iki.fi</email>
</author>
<published>2023-02-23T13:22:53+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=009eeee746825090ec7194321a3db4b298d6571e'/>
<id>009eeee746825090ec7194321a3db4b298d6571e</id>
<content type='text'>
If the source server was just promoted, and it hasn't written the
checkpoint record yet, pg_rewind considered the server to be still on
the old timeline. Because of that, it would claim incorrectly that no
rewind is required. Fix that by looking at minRecoveryPointTLI in the
control file in addition to the ThisTimeLineID on the checkpoint.

This has been a known issue since forever, and we had worked around it
in the regression tests by issuing a checkpoint after each promotion,
before running pg_rewind. But that was always quite hacky, so better
to fix this properly. This doesn't add any new tests for this, but
removes the previously-added workarounds from the existing tests, so
that they should occasionally hit this codepath again.

This is arguably a bug fix, but don't backpatch because we haven't
really treated it as a bug so far. Also, the patch didn't apply
cleanly to v13 and below. I'm sure sure it could be made to work on
v13, but doesn't seem worth the risk and effort.

Reviewed-by: Kyotaro Horiguchi, Ibrar Ahmed, Aleksander Alekseev
Discussion: https://www.postgresql.org/message-id/9f568c97-87fe-a716-bd39-65299b8a60f4%40iki.fi
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the source server was just promoted, and it hasn't written the
checkpoint record yet, pg_rewind considered the server to be still on
the old timeline. Because of that, it would claim incorrectly that no
rewind is required. Fix that by looking at minRecoveryPointTLI in the
control file in addition to the ThisTimeLineID on the checkpoint.

This has been a known issue since forever, and we had worked around it
in the regression tests by issuing a checkpoint after each promotion,
before running pg_rewind. But that was always quite hacky, so better
to fix this properly. This doesn't add any new tests for this, but
removes the previously-added workarounds from the existing tests, so
that they should occasionally hit this codepath again.

This is arguably a bug fix, but don't backpatch because we haven't
really treated it as a bug so far. Also, the patch didn't apply
cleanly to v13 and below. I'm sure sure it could be made to work on
v13, but doesn't seem worth the risk and effort.

Reviewed-by: Kyotaro Horiguchi, Ibrar Ahmed, Aleksander Alekseev
Discussion: https://www.postgresql.org/message-id/9f568c97-87fe-a716-bd39-65299b8a60f4%40iki.fi
</pre>
</div>
</content>
</entry>
<entry>
<title>Add wait_for_replay_catchup wrapper to Cluster.pm</title>
<updated>2023-02-13T10:52:19+00:00</updated>
<author>
<name>Alvaro Herrera</name>
<email>alvherre@alvh.no-ip.org</email>
</author>
<published>2023-02-13T10:52:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=a1acdacada4aaeb233d819f519d16a9eb85a6eef'/>
<id>a1acdacada4aaeb233d819f519d16a9eb85a6eef</id>
<content type='text'>
This simplifies a few lines of Perl test code a bit.

Author: Bertrand Drouvot
Discussion: https://postgr.es/m/846724b5-0723-f4c2-8b13-75301ec7509e@gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This simplifies a few lines of Perl test code a bit.

Author: Bertrand Drouvot
Discussion: https://postgr.es/m/846724b5-0723-f4c2-8b13-75301ec7509e@gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright for 2023</title>
<updated>2023-01-02T20:00:37+00:00</updated>
<author>
<name>Bruce Momjian</name>
<email>bruce@momjian.us</email>
</author>
<published>2023-01-02T20:00:37+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=c8e1ba736b2b9e8c98d37a5b77c4ed31baf94147'/>
<id>c8e1ba736b2b9e8c98d37a5b77c4ed31baf94147</id>
<content type='text'>
Backpatch-through: 11
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Backpatch-through: 11
</pre>
</div>
</content>
</entry>
<entry>
<title>Add copyright notices to meson files</title>
<updated>2022-12-20T12:54:39+00:00</updated>
<author>
<name>Andrew Dunstan</name>
<email>andrew@dunslane.net</email>
</author>
<published>2022-12-20T12:54:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/postgresql.git/commit/?id=8284cf5f746f84303eda34d213e89c8439a83a42'/>
<id>8284cf5f746f84303eda34d213e89c8439a83a42</id>
<content type='text'>
Discussion: https://postgr.es/m/222b43a5-2fb3-2c1b-9cd0-375d376c8246@dunslane.net
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Discussion: https://postgr.es/m/222b43a5-2fb3-2c1b-9cd0-375d376c8246@dunslane.net
</pre>
</div>
</content>
</entry>
</feed>
