<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/postgresql.git/src/include/postmaster, branch master</title>
<subtitle>git.postgresql.org: git/postgresql.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/'/>
<entry>
<title>Fix wal_writer_flush_after initializer value.</title>
<updated>2023-05-14T23:19:54+00:00</updated>
<author>
<name>Thomas Munro</name>
<email>tmunro@postgresql.org</email>
</author>
<published>2023-05-14T22:45:19+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=63932a6d38e5dfa6df2a51a04b7314ec1e4d3de7'/>
<id>63932a6d38e5dfa6df2a51a04b7314ec1e4d3de7</id>
<content type='text'>
Commit a73952b7956 (new in 16) required default values in guc_table.c
and C variable initializers to match.  This one only matched when
XLOG_BLCKSZ == 8kB.  Fix by using the same expression in both places
with a new DEFAULT_XXX macro, as done for other GUCs.

Reviewed-by: Andres Freund &lt;andres@anarazel.de&gt;
Discussion: https://postgr.es/m/CA+hUKGLNmLV=VrT==5MqnbARgx2ifRSFtdd8ofdfrdSLL3yv5A@mail.gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit a73952b7956 (new in 16) required default values in guc_table.c
and C variable initializers to match.  This one only matched when
XLOG_BLCKSZ == 8kB.  Fix by using the same expression in both places
with a new DEFAULT_XXX macro, as done for other GUCs.

Reviewed-by: Andres Freund &lt;andres@anarazel.de&gt;
Discussion: https://postgr.es/m/CA+hUKGLNmLV=VrT==5MqnbARgx2ifRSFtdd8ofdfrdSLL3yv5A@mail.gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Separate vacuum cost variables from GUCs</title>
<updated>2023-04-06T22:54:53+00:00</updated>
<author>
<name>Daniel Gustafsson</name>
<email>dgustafsson@postgresql.org</email>
</author>
<published>2023-04-06T22:54:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=a85c60a945acfcb1aaac0c521e5eb5a2477d9695'/>
<id>a85c60a945acfcb1aaac0c521e5eb5a2477d9695</id>
<content type='text'>
Vacuum code run both by autovacuum workers and a backend doing
VACUUM/ANALYZE previously inspected VacuumCostLimit and VacuumCostDelay,
which are the global variables backing the GUCs vacuum_cost_limit and
vacuum_cost_delay.

Autovacuum workers needed to override these variables with their
own values, derived from autovacuum_vacuum_cost_limit and
autovacuum_vacuum_cost_delay and worker cost limit balancing logic.
This led to confusing code which, in some cases, both derived and
set a new value of VacuumCostLimit from VacuumCostLimit.

In preparation for refreshing these GUC values more often, introduce
new, independent global variables and add a function to update them
using the GUCs and existing logic.

Per suggestion by Kyotaro Horiguchi

Author: Melanie Plageman &lt;melanieplageman@gmail.com&gt;
Reviewed-by: Masahiko Sawada &lt;sawada.mshk@gmail.com&gt;
Reviewed-by: Daniel Gustafsson &lt;daniel@yesql.se&gt;
Reviewed-by: Kyotaro Horiguchi &lt;horikyota.ntt@gmail.com&gt;
Reviewed-by: Robert Haas &lt;robertmhaas@gmail.com&gt;
Discussion: https://www.postgresql.org/message-id/flat/CAAKRu_ZngzqnEODc7LmS1NH04Kt6Y9huSjz5pp7%2BDXhrjDA0gw%40mail.gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Vacuum code run both by autovacuum workers and a backend doing
VACUUM/ANALYZE previously inspected VacuumCostLimit and VacuumCostDelay,
which are the global variables backing the GUCs vacuum_cost_limit and
vacuum_cost_delay.

Autovacuum workers needed to override these variables with their
own values, derived from autovacuum_vacuum_cost_limit and
autovacuum_vacuum_cost_delay and worker cost limit balancing logic.
This led to confusing code which, in some cases, both derived and
set a new value of VacuumCostLimit from VacuumCostLimit.

In preparation for refreshing these GUC values more often, introduce
new, independent global variables and add a function to update them
using the GUCs and existing logic.

Per suggestion by Kyotaro Horiguchi

Author: Melanie Plageman &lt;melanieplageman@gmail.com&gt;
Reviewed-by: Masahiko Sawada &lt;sawada.mshk@gmail.com&gt;
Reviewed-by: Daniel Gustafsson &lt;daniel@yesql.se&gt;
Reviewed-by: Kyotaro Horiguchi &lt;horikyota.ntt@gmail.com&gt;
Reviewed-by: Robert Haas &lt;robertmhaas@gmail.com&gt;
Discussion: https://www.postgresql.org/message-id/flat/CAAKRu_ZngzqnEODc7LmS1NH04Kt6Y9huSjz5pp7%2BDXhrjDA0gw%40mail.gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Redesign archive modules</title>
<updated>2023-02-17T05:26:42+00:00</updated>
<author>
<name>Michael Paquier</name>
<email>michael@paquier.xyz</email>
</author>
<published>2023-02-17T05:26:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=35739b87dcfef9fc0186aca659f262746fecd778'/>
<id>35739b87dcfef9fc0186aca659f262746fecd778</id>
<content type='text'>
A new callback named startup_cb, called shortly after a module is
loaded, is added.  This makes possible the initialization of any
additional state data required by a module.  This initial state data can
be saved in a ArchiveModuleState, that is now passed down to all the
callbacks that can be defined in a module.  With this design, it is
possible to have a per-module state, aimed at opening the door to the
support of more than one archive module.

The initialization of the callbacks is changed so as
_PG_archive_module_init() does not anymore give in input a
ArchiveModuleCallbacks that a module has to fill in with callback
definitions.  Instead, a module now needs to return a const
ArchiveModuleCallbacks.

All the structure and callback definitions of archive modules are moved
into their own header, named archive_module.h, from pgarch.h.
Command-based archiving follows the same line, with a new set of files
named shell_archive.{c,h}.

There are a few more items that are under discussion to improve the
design of archive modules, like the fact that basic_archive calls
sigsetjmp() by itself to define its own error handling flow.  These will
be adjusted later, the changes done here cover already a good portion
of what has been discussed.

Any modules created for v15 will need to be adjusted to this new
design.

Author: Nathan Bossart
Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/20230130194810.6fztfgbn32e7qarj@awork3.anarazel.de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A new callback named startup_cb, called shortly after a module is
loaded, is added.  This makes possible the initialization of any
additional state data required by a module.  This initial state data can
be saved in a ArchiveModuleState, that is now passed down to all the
callbacks that can be defined in a module.  With this design, it is
possible to have a per-module state, aimed at opening the door to the
support of more than one archive module.

The initialization of the callbacks is changed so as
_PG_archive_module_init() does not anymore give in input a
ArchiveModuleCallbacks that a module has to fill in with callback
definitions.  Instead, a module now needs to return a const
ArchiveModuleCallbacks.

All the structure and callback definitions of archive modules are moved
into their own header, named archive_module.h, from pgarch.h.
Command-based archiving follows the same line, with a new set of files
named shell_archive.{c,h}.

There are a few more items that are under discussion to improve the
design of archive modules, like the fact that basic_archive calls
sigsetjmp() by itself to define its own error handling flow.  These will
be adjusted later, the changes done here cover already a good portion
of what has been discussed.

Any modules created for v15 will need to be adjusted to this new
design.

Author: Nathan Bossart
Reviewed-by: Andres Freund
Discussion: https://postgr.es/m/20230130194810.6fztfgbn32e7qarj@awork3.anarazel.de
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable STARTUP_PROGRESS_TIMEOUT in standby mode.</title>
<updated>2023-02-06T15:51:08+00:00</updated>
<author>
<name>Robert Haas</name>
<email>rhaas@postgresql.org</email>
</author>
<published>2023-02-06T15:51:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=8a2f783cc489e4e1820163c1c439125aad4d7a92'/>
<id>8a2f783cc489e4e1820163c1c439125aad4d7a92</id>
<content type='text'>
In standby mode, we don't actually report progress of recovery,
but up until now, startup_progress_timeout_handler() nevertheless
got called every log_startup_progress_interval seconds. That's
an unnecessary expense, so avoid it.

Report by Thomas Munro. Patch by Bharath Rupireddy, reviewed by
Simon Riggs, Thomas Munro, and me. Back-patch to v15, where
the problem was introduced.

Discussion: https://www.postgresql.org/message-id/CA%2BhUKGKCHSffAj8zZJKJvNX7ygnQFxVD6wm1d-2j3fVw%2BMafPQ%40mail.gmail.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In standby mode, we don't actually report progress of recovery,
but up until now, startup_progress_timeout_handler() nevertheless
got called every log_startup_progress_interval seconds. That's
an unnecessary expense, so avoid it.

Report by Thomas Munro. Patch by Bharath Rupireddy, reviewed by
Simon Riggs, Thomas Munro, and me. Back-patch to v15, where
the problem was introduced.

Discussion: https://www.postgresql.org/message-id/CA%2BhUKGKCHSffAj8zZJKJvNX7ygnQFxVD6wm1d-2j3fVw%2BMafPQ%40mail.gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Add new GUC reserved_connections.</title>
<updated>2023-01-20T20:39:13+00:00</updated>
<author>
<name>Robert Haas</name>
<email>rhaas@postgresql.org</email>
</author>
<published>2023-01-20T20:36:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=6e2775e4d4e47775f0d933e4a93c148024a3bc63'/>
<id>6e2775e4d4e47775f0d933e4a93c148024a3bc63</id>
<content type='text'>
This provides a way to reserve connection slots for non-superusers.
The slots reserved via the new GUC are available only to users who
have the new predefined role pg_use_reserved_connections.
superuser_reserved_connections remains as a final reserve in case
reserved_connections has been exhausted.

Patch by Nathan Bossart. Reviewed by Tushar Ahuja and by me.

Discussion: http://postgr.es/m/20230119194601.GA4105788@nathanxps13
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This provides a way to reserve connection slots for non-superusers.
The slots reserved via the new GUC are available only to users who
have the new predefined role pg_use_reserved_connections.
superuser_reserved_connections remains as a final reserve in case
reserved_connections has been exhausted.

Patch by Nathan Bossart. Reviewed by Tushar Ahuja and by me.

Discussion: http://postgr.es/m/20230119194601.GA4105788@nathanxps13
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename ReservedBackends variable to SuperuserReservedConnections.</title>
<updated>2023-01-20T20:32:08+00:00</updated>
<author>
<name>Robert Haas</name>
<email>rhaas@postgresql.org</email>
</author>
<published>2023-01-20T20:32:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=fe00fec1f5d78a5cfe46ac72dc284ed4cc477be1'/>
<id>fe00fec1f5d78a5cfe46ac72dc284ed4cc477be1</id>
<content type='text'>
This is in preparation for adding a new reserved_connections GUC,
but aligning the GUC name with the variable name is also a good
idea on general principle.

Patch by Nathan Bossart. Reviewed by Tushar Ahuja and by me.

Discussion: http://postgr.es/m/20230119194601.GA4105788@nathanxps13
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is in preparation for adding a new reserved_connections GUC,
but aligning the GUC name with the variable name is also a good
idea on general principle.

Patch by Nathan Bossart. Reviewed by Tushar Ahuja and by me.

Discussion: http://postgr.es/m/20230119194601.GA4105788@nathanxps13
</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://91.123.203.49/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>Provide options for postmaster to kill child processes with SIGABRT.</title>
<updated>2022-11-21T16:59:29+00:00</updated>
<author>
<name>Tom Lane</name>
<email>tgl@sss.pgh.pa.us</email>
</author>
<published>2022-11-21T16:59:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=51b5834cd53f0bd068729043b55f7da3ca6bb15f'/>
<id>51b5834cd53f0bd068729043b55f7da3ca6bb15f</id>
<content type='text'>
The postmaster normally sends SIGQUIT to force-terminate its
child processes after a child crash or immediate-stop request.
If that doesn't result in child exit within a few seconds,
we follow it up with SIGKILL.  This patch provides GUC flags
that allow either of these signals to be replaced with SIGABRT.
On typically-configured Unix systems, that will result in a
core dump being produced for each such child.  This can be
useful for debugging problems, although it's not something you'd
want to have on in production due to the risk of disk space
bloat from lots of core files.

The old postmaster -T switch, which sent SIGSTOP in place of
SIGQUIT, is changed to be the same as send_abort_for_crash.
As far as I can tell from the code comments, the intent of
that switch was just to block things for long enough to force
core dumps manually, which seems like an unnecessary extra step.
(Maybe at the time, there was no way to get most kernels to
produce core files with per-PID names, requiring manual core
file renaming after each one.  But now it's surely the hard way.)

I also took the opportunity to remove the old postmaster -n
(skip shmem reinit) switch, which hasn't actually done anything
in decades, though the documentation still claimed it did.

Discussion: https://postgr.es/m/2251016.1668797294@sss.pgh.pa.us
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The postmaster normally sends SIGQUIT to force-terminate its
child processes after a child crash or immediate-stop request.
If that doesn't result in child exit within a few seconds,
we follow it up with SIGKILL.  This patch provides GUC flags
that allow either of these signals to be replaced with SIGABRT.
On typically-configured Unix systems, that will result in a
core dump being produced for each such child.  This can be
useful for debugging problems, although it's not something you'd
want to have on in production due to the risk of disk space
bloat from lots of core files.

The old postmaster -T switch, which sent SIGSTOP in place of
SIGQUIT, is changed to be the same as send_abort_for_crash.
As far as I can tell from the code comments, the intent of
that switch was just to block things for long enough to force
core dumps manually, which seems like an unnecessary extra step.
(Maybe at the time, there was no way to get most kernels to
produce core files with per-PID names, requiring manual core
file renaming after each one.  But now it's surely the hard way.)

I also took the opportunity to remove the old postmaster -n
(skip shmem reinit) switch, which hasn't actually done anything
in decades, though the documentation still claimed it did.

Discussion: https://postgr.es/m/2251016.1668797294@sss.pgh.pa.us
</pre>
</div>
</content>
</entry>
<entry>
<title>Harmonize more parameter names in bulk.</title>
<updated>2022-09-20T20:09:30+00:00</updated>
<author>
<name>Peter Geoghegan</name>
<email>pg@bowt.ie</email>
</author>
<published>2022-09-20T20:09:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=a601366a460f68472bf70c4d94c57baa0a3ed1b2'/>
<id>a601366a460f68472bf70c4d94c57baa0a3ed1b2</id>
<content type='text'>
Make sure that function declarations use names that exactly match the
corresponding names from function definitions in optimizer, parser,
utility, libpq, and "commands" code, as well as in remaining library
code.  Do the same for all code related to frontend programs (with the
exception of pg_dump/pg_dumpall related code).

Like other recent commits that cleaned up function parameter names, this
commit was written with help from clang-tidy.  Later commits will handle
ecpg and pg_dump/pg_dumpall.

Author: Peter Geoghegan &lt;pg@bowt.ie&gt;
Reviewed-By: David Rowley &lt;dgrowleyml@gmail.com&gt;
Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
</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 optimizer, parser,
utility, libpq, and "commands" code, as well as in remaining library
code.  Do the same for all code related to frontend programs (with the
exception of pg_dump/pg_dumpall related code).

Like other recent commits that cleaned up function parameter names, this
commit was written with help from clang-tidy.  Later commits will handle
ecpg and pg_dump/pg_dumpall.

Author: Peter Geoghegan &lt;pg@bowt.ie&gt;
Reviewed-By: David Rowley &lt;dgrowleyml@gmail.com&gt;
Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com
</pre>
</div>
</content>
</entry>
<entry>
<title>Add central declarations for dlsym()ed symbols</title>
<updated>2022-07-18T00:23:42+00:00</updated>
<author>
<name>Andres Freund</name>
<email>andres@anarazel.de</email>
</author>
<published>2022-07-18T00:23:42+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/postgresql.git/commit/?id=f2b73c8d75d583adcdd3562adca335d31f430ac5'/>
<id>f2b73c8d75d583adcdd3562adca335d31f430ac5</id>
<content type='text'>
This is in preparation for defaulting to -fvisibility=hidden in extensions,
instead of exporting all symbols. For that symbols intended to be exported
need to be tagged with PGDLLEXPORT. Most extensions only need to do so for
_PG_init() and functions defined with PG_FUNCTION_INFO_V1. Adding central
declarations avoids each extension having to add PGDLLEXPORT. Any existing
declarations in extensions will continue to work if fmgr.h is included before
them, otherwise compilation for Windows will fail.

Author: Andres Freund &lt;andres@anarazel.de&gt;
Reviewed-By: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Discussion: https://postgr.es/m/20211101020311.av6hphdl6xbjbuif@alap3.anarazel.de
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is in preparation for defaulting to -fvisibility=hidden in extensions,
instead of exporting all symbols. For that symbols intended to be exported
need to be tagged with PGDLLEXPORT. Most extensions only need to do so for
_PG_init() and functions defined with PG_FUNCTION_INFO_V1. Adding central
declarations avoids each extension having to add PGDLLEXPORT. Any existing
declarations in extensions will continue to work if fmgr.h is included before
them, otherwise compilation for Windows will fail.

Author: Andres Freund &lt;andres@anarazel.de&gt;
Reviewed-By: Tom Lane &lt;tgl@sss.pgh.pa.us&gt;
Discussion: https://postgr.es/m/20211101020311.av6hphdl6xbjbuif@alap3.anarazel.de
</pre>
</div>
</content>
</entry>
</feed>
