Skip to content

Commit 227ea84

Browse files
author
Commitfest Bot
committed
[CF 5319] v5 - Changing shared_buffers without restart
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5319 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/my4hukmejato53ef465ev7lk3sqiqvneh7436rz64wmtc7rbfj@hmuxsf2ngov2 Author(s): Dmitry Dolgov
2 parents 2c0d8b9 + bd061ef commit 227ea84

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1830
-326
lines changed

src/backend/access/transam/xlog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2321,7 +2321,7 @@ CalculateCheckpointSegments(void)
23212321
}
23222322

23232323
void
2324-
assign_max_wal_size(int newval, void *extra)
2324+
assign_max_wal_size(int newval, void *extra, bool *pending)
23252325
{
23262326
max_wal_size_mb = newval;
23272327
CalculateCheckpointSegments();

src/backend/commands/variable.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,7 @@ check_cluster_name(char **newval, void **extra, GucSource source)
11431143
* GUC assign_hook for maintenance_io_concurrency
11441144
*/
11451145
void
1146-
assign_maintenance_io_concurrency(int newval, void *extra)
1146+
assign_maintenance_io_concurrency(int newval, void *extra, bool *pending)
11471147
{
11481148
/*
11491149
* Reconfigure recovery prefetching, because a setting it depends on
@@ -1161,12 +1161,12 @@ assign_maintenance_io_concurrency(int newval, void *extra)
11611161
* they may be assigned in either order.
11621162
*/
11631163
void
1164-
assign_io_max_combine_limit(int newval, void *extra)
1164+
assign_io_max_combine_limit(int newval, void *extra, bool *pending)
11651165
{
11661166
io_combine_limit = Min(newval, io_combine_limit_guc);
11671167
}
11681168
void
1169-
assign_io_combine_limit(int newval, void *extra)
1169+
assign_io_combine_limit(int newval, void *extra, bool *pending)
11701170
{
11711171
io_combine_limit = Min(io_max_combine_limit, newval);
11721172
}

src/backend/libpq/pqcomm.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,7 +1952,7 @@ pq_settcpusertimeout(int timeout, Port *port)
19521952
* GUC assign_hook for tcp_keepalives_idle
19531953
*/
19541954
void
1955-
assign_tcp_keepalives_idle(int newval, void *extra)
1955+
assign_tcp_keepalives_idle(int newval, void *extra, bool *pending)
19561956
{
19571957
/*
19581958
* The kernel API provides no way to test a value without setting it; and
@@ -1985,7 +1985,7 @@ show_tcp_keepalives_idle(void)
19851985
* GUC assign_hook for tcp_keepalives_interval
19861986
*/
19871987
void
1988-
assign_tcp_keepalives_interval(int newval, void *extra)
1988+
assign_tcp_keepalives_interval(int newval, void *extra, bool *pending)
19891989
{
19901990
/* See comments in assign_tcp_keepalives_idle */
19911991
(void) pq_setkeepalivesinterval(newval, MyProcPort);
@@ -2008,7 +2008,7 @@ show_tcp_keepalives_interval(void)
20082008
* GUC assign_hook for tcp_keepalives_count
20092009
*/
20102010
void
2011-
assign_tcp_keepalives_count(int newval, void *extra)
2011+
assign_tcp_keepalives_count(int newval, void *extra, bool *pending)
20122012
{
20132013
/* See comments in assign_tcp_keepalives_idle */
20142014
(void) pq_setkeepalivescount(newval, MyProcPort);
@@ -2031,7 +2031,7 @@ show_tcp_keepalives_count(void)
20312031
* GUC assign_hook for tcp_user_timeout
20322032
*/
20332033
void
2034-
assign_tcp_user_timeout(int newval, void *extra)
2034+
assign_tcp_user_timeout(int newval, void *extra, bool *pending)
20352035
{
20362036
/* See comments in assign_tcp_keepalives_idle */
20372037
(void) pq_settcpusertimeout(newval, MyProcPort);

src/backend/port/posix_sema.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ PGSemaphoreShmemSize(int maxSemas)
193193
* we don't have to expose the counters to other processes.)
194194
*/
195195
void
196-
PGReserveSemaphores(int maxSemas)
196+
PGReserveSemaphores(int maxSemas, int shmem_segment)
197197
{
198198
struct stat statbuf;
199199

@@ -220,7 +220,7 @@ PGReserveSemaphores(int maxSemas)
220220
* ShmemAlloc() won't be ready yet.
221221
*/
222222
sharedSemas = (PGSemaphore)
223-
ShmemAllocUnlocked(PGSemaphoreShmemSize(maxSemas));
223+
ShmemAllocUnlockedInSegment(PGSemaphoreShmemSize(maxSemas), shmem_segment);
224224
#endif
225225

226226
numSems = 0;

src/backend/port/sysv_sema.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ PGSemaphoreShmemSize(int maxSemas)
307307
* have clobbered.)
308308
*/
309309
void
310-
PGReserveSemaphores(int maxSemas)
310+
PGReserveSemaphores(int maxSemas, int shmem_segment)
311311
{
312312
struct stat statbuf;
313313

@@ -328,7 +328,7 @@ PGReserveSemaphores(int maxSemas)
328328
* ShmemAlloc() won't be ready yet.
329329
*/
330330
sharedSemas = (PGSemaphore)
331-
ShmemAllocUnlocked(PGSemaphoreShmemSize(maxSemas));
331+
ShmemAllocUnlockedInSegment(PGSemaphoreShmemSize(maxSemas), shmem_segment);
332332
numSharedSemas = 0;
333333
maxSharedSemas = maxSemas;
334334

0 commit comments

Comments
 (0)