On Thu, Aug 25, 2016 at 1:04 AM, Wolfgang Wilhelm <wolfgang20121...@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 -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers