aboutsummaryrefslogtreecommitdiff
path: root/src/include/access/xlog_internal.h
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2013-07-04 11:24:24 -0400
committerRobert Haas <rhaas@postgresql.org>2013-07-04 11:24:24 -0400
commit6bc8ef0b7f1f1df3998745a66e1790e27424aa0c (patch)
tree69fc9655772dc63e07c96e0c0e4777af7d2068b6 /src/include/access/xlog_internal.h
parent5cbe935c9d6046f5600ff2e083b4bae6ee1f4aa2 (diff)
downloadpostgresql-6bc8ef0b7f1f1df3998745a66e1790e27424aa0c.tar.gz
postgresql-6bc8ef0b7f1f1df3998745a66e1790e27424aa0c.zip
Add new GUC, max_worker_processes, limiting number of bgworkers.
In 9.3, there's no particular limit on the number of bgworkers; instead, we just count up the number that are actually registered, and use that to set MaxBackends. However, that approach causes problems for Hot Standby, which needs both MaxBackends and the size of the lock table to be the same on the standby as on the master, yet it may not be desirable to run the same bgworkers in both places. 9.3 handles that by failing to notice the problem, which will probably work fine in nearly all cases anyway, but is not theoretically sound. A further problem with simply counting the number of registered workers is that new workers can't be registered without a postmaster restart. This is inconvenient for administrators, since bouncing the postmaster causes an interruption of service. Moreover, there are a number of applications for background processes where, by necessity, the background process must be started on the fly (e.g. parallel query). While this patch doesn't actually make it possible to register new background workers after startup time, it's a necessary prerequisite. Patch by me. Review by Michael Paquier.
Diffstat (limited to 'src/include/access/xlog_internal.h')
-rw-r--r--src/include/access/xlog_internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index ee12d1a110a..c3e173106fc 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -55,7 +55,7 @@ typedef struct BkpBlock
/*
* Each page of XLOG file has a header like this:
*/
-#define XLOG_PAGE_MAGIC 0xD075 /* can be used as WAL version indicator */
+#define XLOG_PAGE_MAGIC 0xD076 /* can be used as WAL version indicator */
typedef struct XLogPageHeaderData
{
@@ -205,6 +205,7 @@ typedef XLogLongPageHeaderData *XLogLongPageHeader;
typedef struct xl_parameter_change
{
int MaxConnections;
+ int max_worker_processes;
int max_prepared_xacts;
int max_locks_per_xact;
int wal_level;