<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/postgresql.git/src/include/storage, branch master</title>
<subtitle>git.postgresql.org: git/postgresql.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/'/>
<entry>
<title>Add writeback to pg_stat_io</title>
<updated>2023-05-17T18:18:35+00:00</updated>
<author>
<name>Andres Freund</name>
<email>andres@anarazel.de</email>
</author>
<published>2023-05-17T18:18:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=093e5c57d506783a95dd8feddd9a3f2651e1aeba'/>
<id>093e5c57d506783a95dd8feddd9a3f2651e1aeba</id>
<content type='text'>
28e626bde00 added the concept of IOOps but neglected to include writeback
operations. ac8d53dae5 added time spent doing these I/O operations. Without
counting writeback, checkpointer write time in the log often differed
substantially from that in pg_stat_io. To fix this, add IOOp IOOP_WRITEBACK
and track writeback in pg_stat_io.

Bumps catversion.

Author: Melanie Plageman &lt;melanieplageman@gmail.com&gt;
Reviewed-by: Kyotaro Horiguchi &lt;horikyota.ntt@gmail.com&gt;
Reported-by: Andres Freund &lt;andres@anarazel.de&gt;
Discussion: https://postgr.es/m/20230419172326.dhgyo4wrrhulovt6%40awork3.anarazel.de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
28e626bde00 added the concept of IOOps but neglected to include writeback
operations. ac8d53dae5 added time spent doing these I/O operations. Without
counting writeback, checkpointer write time in the log often differed
substantially from that in pg_stat_io. To fix this, add IOOp IOOP_WRITEBACK
and track writeback in pg_stat_io.

Bumps catversion.

Author: Melanie Plageman &lt;melanieplageman@gmail.com&gt;
Reviewed-by: Kyotaro Horiguchi &lt;horikyota.ntt@gmail.com&gt;
Reported-by: Andres Freund &lt;andres@anarazel.de&gt;
Discussion: https://postgr.es/m/20230419172326.dhgyo4wrrhulovt6%40awork3.anarazel.de
</pre>
</div>
</content>
</entry>
<entry>
<title>Update parameter name context to wb_context</title>
<updated>2023-05-17T18:18:30+00:00</updated>
<author>
<name>Andres Freund</name>
<email>andres@anarazel.de</email>
</author>
<published>2023-05-17T18:17:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=52676dc2e016df5cd842a4f6073b25ee8e681b9f'/>
<id>52676dc2e016df5cd842a4f6073b25ee8e681b9f</id>
<content type='text'>
For clarity of review, renaming the function parameter "context" in
ScheduleBufferTagForWriteback() and IssuePendingWritebacks() to
"wb_context" is a separate commit. The next commit adds an "io_context"
parameter and "wb_context" makes it more clear which is which.

Author: Melanie Plageman &lt;melanieplageman@gmail.com&gt;
Discussion: https://postgr.es/m/CAAKRu_acc6iL4M3hvOTeztf_ZPpsB3Pqio5aVHgZ5q=Pi3BZKg@mail.gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For clarity of review, renaming the function parameter "context" in
ScheduleBufferTagForWriteback() and IssuePendingWritebacks() to
"wb_context" is a separate commit. The next commit adds an "io_context"
parameter and "wb_context" makes it more clear which is which.

Author: Melanie Plageman &lt;melanieplageman@gmail.com&gt;
Discussion: https://postgr.es/m/CAAKRu_acc6iL4M3hvOTeztf_ZPpsB3Pqio5aVHgZ5q=Pi3BZKg@mail.gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove bogus #include added by d4e71df6d75.</title>
<updated>2023-04-25T22:43:53+00:00</updated>
<author>
<name>Thomas Munro</name>
<email>tmunro@postgresql.org</email>
</author>
<published>2023-04-25T22:39:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=828e93a6f2dbf4bc7a24bc3ce166c34879eeb8b1'/>
<id>828e93a6f2dbf4bc7a24bc3ce166c34879eeb8b1</id>
<content type='text'>
The recently added inclusion of guc.h in smgr.h is not necessary and
introduces more server-related stuff. Removing the directive helps
avoid potential issues with including sgmr.h in frontends.

Author: Kyotaro Horiguchi &lt;horikyota.ntt@gmail.com&gt;
Discussion: https://postgr.es/m/20230425.115748.2130383825066921512.horikyota.ntt%40gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The recently added inclusion of guc.h in smgr.h is not necessary and
introduces more server-related stuff. Removing the directive helps
avoid potential issues with including sgmr.h in frontends.

Author: Kyotaro Horiguchi &lt;horikyota.ntt@gmail.com&gt;
Discussion: https://postgr.es/m/20230425.115748.2130383825066921512.horikyota.ntt%40gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove vacuum_defer_cleanup_age</title>
<updated>2023-04-24T19:21:02+00:00</updated>
<author>
<name>Andres Freund</name>
<email>andres@anarazel.de</email>
</author>
<published>2023-04-24T19:20:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=1118cd37eb61e6a2428f457a8b2026a7bb3f801a'/>
<id>1118cd37eb61e6a2428f457a8b2026a7bb3f801a</id>
<content type='text'>
vacuum_defer_cleanup_age was introduced before hot_standby_feedback and
replication slots existed. It is hard to use reasonably - commonly it will
either be set too low (not preventing recovery conflicts, while still causing
some bloat), or too high (causing a lot of bloat). The alternatives do not
have that issue.

That on its own might not be sufficient reason to remove
vacuum_defer_cleanup_age, but it also complicates computation of xid
horizons. See e.g. the bug fixed in be504a3e974. It also is untested.

This commit removes TransactionIdRetreatSafely(), as there are no users
anymore. There might be potential future users, hence noting that here.

Reviewed-by: Daniel Gustafsson &lt;daniel@yesql.se&gt;
Reviewed-by: Justin Pryzby &lt;pryzby@telsasoft.com&gt;
Reviewed-by: Alvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Discussion: https://postgr.es/m/20230317230930.nhsgk3qfk7f4axls@awork3.anarazel.de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
vacuum_defer_cleanup_age was introduced before hot_standby_feedback and
replication slots existed. It is hard to use reasonably - commonly it will
either be set too low (not preventing recovery conflicts, while still causing
some bloat), or too high (causing a lot of bloat). The alternatives do not
have that issue.

That on its own might not be sufficient reason to remove
vacuum_defer_cleanup_age, but it also complicates computation of xid
horizons. See e.g. the bug fixed in be504a3e974. It also is untested.

This commit removes TransactionIdRetreatSafely(), as there are no users
anymore. There might be potential future users, hence noting that here.

Reviewed-by: Daniel Gustafsson &lt;daniel@yesql.se&gt;
Reviewed-by: Justin Pryzby &lt;pryzby@telsasoft.com&gt;
Reviewed-by: Alvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Discussion: https://postgr.es/m/20230317230930.nhsgk3qfk7f4axls@awork3.anarazel.de
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix some typos and some incorrectly duplicated words</title>
<updated>2023-04-18T02:03:49+00:00</updated>
<author>
<name>David Rowley</name>
<email>drowley@postgresql.org</email>
</author>
<published>2023-04-18T02:03:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=eef231e8161eb8031a928fe48134ef25ab81fe5e'/>
<id>eef231e8161eb8031a928fe48134ef25ab81fe5e</id>
<content type='text'>
Author: Justin Pryzby
Reviewed-by: David Rowley
Discussion: https://postgr.es/m/ZD3D1QxoccnN8A1V@telsasoft.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Author: Justin Pryzby
Reviewed-by: David Rowley
Discussion: https://postgr.es/m/ZD3D1QxoccnN8A1V@telsasoft.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Harmonize some more function parameter names.</title>
<updated>2023-04-13T17:15:20+00:00</updated>
<author>
<name>Peter Geoghegan</name>
<email>pg@bowt.ie</email>
</author>
<published>2023-04-13T17:15:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=d6f0f95a6bb7fa43731c6db83226a3c574041659'/>
<id>d6f0f95a6bb7fa43731c6db83226a3c574041659</id>
<content type='text'>
Make sure that function declarations use names that exactly match the
corresponding names from function definitions in a few places.  These
inconsistencies were all introduced relatively recently, after the code
base had parameter name mismatches fixed in bulk (see commits starting
with commits 4274dc22 and 035ce1fe).

pg_bsd_indent still has a couple of similar inconsistencies, which I
(pgeoghegan) have left untouched for now.

Like all earlier commits that cleaned up function parameter names, this
commit was written with help from clang-tidy.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure that function declarations use names that exactly match the
corresponding names from function definitions in a few places.  These
inconsistencies were all introduced relatively recently, after the code
base had parameter name mismatches fixed in bulk (see commits starting
with commits 4274dc22 and 035ce1fe).

pg_bsd_indent still has a couple of similar inconsistencies, which I
(pgeoghegan) have left untouched for now.

Like all earlier commits that cleaned up function parameter names, this
commit was written with help from clang-tidy.
</pre>
</div>
</content>
</entry>
<entry>
<title>Handle logical slot conflicts on standby</title>
<updated>2023-04-08T07:05:44+00:00</updated>
<author>
<name>Andres Freund</name>
<email>andres@anarazel.de</email>
</author>
<published>2023-04-08T06:11:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=26669757b6a7665c1069e77e6472bd8550193ca6'/>
<id>26669757b6a7665c1069e77e6472bd8550193ca6</id>
<content type='text'>
During WAL replay on the standby, when a conflict with a logical slot is
identified, invalidate such slots. There are two sources of conflicts:
1) Using the information added in 6af1793954e, logical slots are invalidated if
   required rows are removed
2) wal_level on the primary server is reduced to below logical

Uses the infrastructure introduced in the prior commit. FIXME: add commit
reference.

Change InvalidatePossiblyObsoleteSlot() to use a recovery conflict to
interrupt use of a slot, if called in the startup process. The new recovery
conflict is added to pg_stat_database_conflicts, as confl_active_logicalslot.

See 6af1793954e for an overall design of logical decoding on a standby.

Bumps catversion for the addition of the pg_stat_database_conflicts column.
Bumps PGSTAT_FILE_FORMAT_ID for the same reason.

Author: "Drouvot, Bertrand" &lt;bertranddrouvot.pg@gmail.com&gt;
Author: Andres Freund &lt;andres@anarazel.de&gt;
Author: Amit Khandekar &lt;amitdkhan.pg@gmail.com&gt; (in an older version)
Reviewed-by: "Drouvot, Bertrand" &lt;bertranddrouvot.pg@gmail.com&gt;
Reviewed-by: Andres Freund &lt;andres@anarazel.de&gt;
Reviewed-by: Robert Haas &lt;robertmhaas@gmail.com&gt;
Reviewed-by: Fabrízio de Royes Mello &lt;fabriziomello@gmail.com&gt;
Reviewed-by: Bharath Rupireddy &lt;bharath.rupireddyforpostgres@gmail.com&gt;
Reviewed-by: Amit Kapila &lt;amit.kapila16@gmail.com&gt;
Reviewed-by: Alvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Discussion: https://postgr.es/m/20230407075009.igg7be27ha2htkbt@awork3.anarazel.de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
During WAL replay on the standby, when a conflict with a logical slot is
identified, invalidate such slots. There are two sources of conflicts:
1) Using the information added in 6af1793954e, logical slots are invalidated if
   required rows are removed
2) wal_level on the primary server is reduced to below logical

Uses the infrastructure introduced in the prior commit. FIXME: add commit
reference.

Change InvalidatePossiblyObsoleteSlot() to use a recovery conflict to
interrupt use of a slot, if called in the startup process. The new recovery
conflict is added to pg_stat_database_conflicts, as confl_active_logicalslot.

See 6af1793954e for an overall design of logical decoding on a standby.

Bumps catversion for the addition of the pg_stat_database_conflicts column.
Bumps PGSTAT_FILE_FORMAT_ID for the same reason.

Author: "Drouvot, Bertrand" &lt;bertranddrouvot.pg@gmail.com&gt;
Author: Andres Freund &lt;andres@anarazel.de&gt;
Author: Amit Khandekar &lt;amitdkhan.pg@gmail.com&gt; (in an older version)
Reviewed-by: "Drouvot, Bertrand" &lt;bertranddrouvot.pg@gmail.com&gt;
Reviewed-by: Andres Freund &lt;andres@anarazel.de&gt;
Reviewed-by: Robert Haas &lt;robertmhaas@gmail.com&gt;
Reviewed-by: Fabrízio de Royes Mello &lt;fabriziomello@gmail.com&gt;
Reviewed-by: Bharath Rupireddy &lt;bharath.rupireddyforpostgres@gmail.com&gt;
Reviewed-by: Amit Kapila &lt;amit.kapila16@gmail.com&gt;
Reviewed-by: Alvaro Herrera &lt;alvherre@alvh.no-ip.org&gt;
Discussion: https://postgr.es/m/20230407075009.igg7be27ha2htkbt@awork3.anarazel.de
</pre>
</div>
</content>
</entry>
<entry>
<title>Add io_direct setting (developer-only).</title>
<updated>2023-04-08T04:35:07+00:00</updated>
<author>
<name>Thomas Munro</name>
<email>tmunro@postgresql.org</email>
</author>
<published>2023-04-07T23:04:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=d4e71df6d757fd21c363164a3a4d3b5681462662'/>
<id>d4e71df6d757fd21c363164a3a4d3b5681462662</id>
<content type='text'>
Provide a way to ask the kernel to use O_DIRECT (or local equivalent)
where available for data and WAL files, to avoid or minimize kernel
caching.  This hurts performance currently and is not intended for end
users yet.  Later proposed work would introduce our own I/O clustering,
read-ahead, etc to replace the facilities the kernel disables with this
option.

The only user-visible change, if the developer-only GUC is not used, is
that this commit also removes the obscure logic that would activate
O_DIRECT for the WAL when wal_sync_method=open_[data]sync and
wal_level=minimal (which also requires max_wal_senders=0).  Those are
non-default and unlikely settings, and this behavior wasn't (correctly)
documented.  The same effect can be achieved with io_direct=wal.

Author: Thomas Munro &lt;thomas.munro@gmail.com&gt;
Author: Andres Freund &lt;andres@anarazel.de&gt;
Author: Bharath Rupireddy &lt;bharath.rupireddyforpostgres@gmail.com&gt;
Reviewed-by: Justin Pryzby &lt;pryzby@telsasoft.com&gt;
Reviewed-by: Bharath Rupireddy &lt;bharath.rupireddyforpostgres@gmail.com&gt;
Discussion: https://postgr.es/m/CA%2BhUKGK1X532hYqJ_MzFWt0n1zt8trz980D79WbjwnT-yYLZpg%40mail.gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a way to ask the kernel to use O_DIRECT (or local equivalent)
where available for data and WAL files, to avoid or minimize kernel
caching.  This hurts performance currently and is not intended for end
users yet.  Later proposed work would introduce our own I/O clustering,
read-ahead, etc to replace the facilities the kernel disables with this
option.

The only user-visible change, if the developer-only GUC is not used, is
that this commit also removes the obscure logic that would activate
O_DIRECT for the WAL when wal_sync_method=open_[data]sync and
wal_level=minimal (which also requires max_wal_senders=0).  Those are
non-default and unlikely settings, and this behavior wasn't (correctly)
documented.  The same effect can be achieved with io_direct=wal.

Author: Thomas Munro &lt;thomas.munro@gmail.com&gt;
Author: Andres Freund &lt;andres@anarazel.de&gt;
Author: Bharath Rupireddy &lt;bharath.rupireddyforpostgres@gmail.com&gt;
Reviewed-by: Justin Pryzby &lt;pryzby@telsasoft.com&gt;
Reviewed-by: Bharath Rupireddy &lt;bharath.rupireddyforpostgres@gmail.com&gt;
Discussion: https://postgr.es/m/CA%2BhUKGK1X532hYqJ_MzFWt0n1zt8trz980D79WbjwnT-yYLZpg%40mail.gmail.com
</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://git.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>Add VACUUM/ANALYZE BUFFER_USAGE_LIMIT option</title>
<updated>2023-04-06T23:40:31+00:00</updated>
<author>
<name>David Rowley</name>
<email>drowley@postgresql.org</email>
</author>
<published>2023-04-06T23:40:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/postgresql.git/commit/?id=1cbbee03385763b066ae3961fc61f2cd01a0d0d7'/>
<id>1cbbee03385763b066ae3961fc61f2cd01a0d0d7</id>
<content type='text'>
Add new options to the VACUUM and ANALYZE commands called
BUFFER_USAGE_LIMIT to allow users more control over how large to make the
buffer access strategy that is used to limit the usage of buffers in
shared buffers.  Larger rings can allow VACUUM to run more quickly but
have the drawback of VACUUM possibly evicting more buffers from shared
buffers that might be useful for other queries running on the database.

Here we also add a new GUC named vacuum_buffer_usage_limit which controls
how large to make the access strategy when it's not specified in the
VACUUM/ANALYZE command.  This defaults to 256KB, which is the same size as
the access strategy was prior to this change.  This setting also
controls how large to make the buffer access strategy for autovacuum.

Per idea by Andres Freund.

Author: Melanie Plageman
Reviewed-by: David Rowley
Reviewed-by: Andres Freund
Reviewed-by: Justin Pryzby
Reviewed-by: Bharath Rupireddy
Discussion: https://postgr.es/m/20230111182720.ejifsclfwymw2reb@awork3.anarazel.de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add new options to the VACUUM and ANALYZE commands called
BUFFER_USAGE_LIMIT to allow users more control over how large to make the
buffer access strategy that is used to limit the usage of buffers in
shared buffers.  Larger rings can allow VACUUM to run more quickly but
have the drawback of VACUUM possibly evicting more buffers from shared
buffers that might be useful for other queries running on the database.

Here we also add a new GUC named vacuum_buffer_usage_limit which controls
how large to make the access strategy when it's not specified in the
VACUUM/ANALYZE command.  This defaults to 256KB, which is the same size as
the access strategy was prior to this change.  This setting also
controls how large to make the buffer access strategy for autovacuum.

Per idea by Andres Freund.

Author: Melanie Plageman
Reviewed-by: David Rowley
Reviewed-by: Andres Freund
Reviewed-by: Justin Pryzby
Reviewed-by: Bharath Rupireddy
Discussion: https://postgr.es/m/20230111182720.ejifsclfwymw2reb@awork3.anarazel.de
</pre>
</div>
</content>
</entry>
</feed>
