Re: increasing the default WAL segment size
Robert Haas <robertmhaas@gmail.com>
On Thu, Aug 25, 2016 at 1:04 AM, Wolfgang Wilhelm <wolfgang20121964@yahoo.de> wrote: > What would happen if there's a database on a server with initdb (or > whatever) parameter -with-wal-size=64MB and later someone decides to make it > the master in a replicated system and has a slave without that parameter? > Would the slave work with the "different" wal size of the master? How could > be guaranteed that in such a scenario the replication either works correctly > or failes with a meaningful error message? You make reference to an "initdb (or whatever) parameter" but actually there is a big difference between the "initdb" case and the "whatever" case. If the parameter is fixed at initdb time, then the master and the slave will definitely agree: the slave had to be created by copying the master, and that means the control file that contains the size was also copied. Neither can have been changed afterwards. That's what an initdb-time parameter means. On the other hand, if the parameter is, say, a GUC, then you would have exactly the kinds of problems that you are talking about here. I am not keen to solve any of those problems, which is why I am not proposing to go any further than an initdb-time parameter. > But in general I thing a more flexible WAL size is a good idea. > To answer Andres: You have found one of the (few?) users to adjust initdb > parameters. Good to know, thanks. In further defense of the idea that making this more configurable isn't nuts, it's worth noting that the history here is: * When Vadim originally added XLogSegSize in 30659d43eb73272e20f2eb1d785a07ba3b553ed8 (September 1999), it was a constant. * In c3c09be34b6b0d7892f1087a23fc6eb93f3c4f04 (February 2004), this became configurable via pg_config_manual.h. * In cf9f6c8d8e9df28f3fbe1850ca7f042b2c01252e (May 2008), Tom made this configurable via configure. So there's a well-established history of making this gradually easier for users to change. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Make WAL segment size configurable at initdb time.
- fc49e24fa69a 11.0 landed
-
Perform only one ReadControlFile() during startup.
- 8356753c212a 11.0 landed
-
Introduce BYTES unit for GUCs.
- 6e7baa322773 11.0 landed
-
Remove useless duplicate inclusions of system header files.
- 9e3755ecb2d0 10.0 cited
-
Refactor other replication commands to use DestRemoteSimple.
- bbd8550bce14 10.0 landed
-
Add a SHOW command to the replication command language.
- d1ecd539477f 10.0 landed
-
Add a new DestReceiver for printing tuples without catalog access.
- a84069d93504 10.0 landed
-
Support fls().
- 4f658dc851a7 9.2.0 cited
-
Extend yesterday's patch making BLCKSZ and RELSEG_SIZE configurable to also
- cf9f6c8d8e9d 8.4.0 cited
-
Commit the reasonably uncontroversial parts of J.R. Nield's PITR patch, to
- c3c09be34b6b 8.0.0 cited
-
XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.
- 47937403676d 7.1.1 cited
-
Transaction log manager core code.
- 30659d43eb73 7.1.1 cited