Re: Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: Proposal for Allow postgresql.conf values to be changed via SQL [review])
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <bruce@momjian.us>
Cc: Andres Freund <andres@2ndquadrant.com>, Greg Stark <stark@mit.edu>,
Alvaro Herrera <alvherre@2ndquadrant.com>,
Fujii Masao <masao.fujii@gmail.com>, Robert Haas <robertmhaas@gmail.com>,
Amit Kapila <amit.kapila@huawei.com>,
Dimitri Fontaine <dimitri@2ndquadrant.fr>,
pgsql-hackers@postgresql.org, Josh Berkus <josh@agliodbs.com>
Date: 2013-08-05T17:16:10Z
Lists: pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes: > So my larger question is why a single-guc-per-file avoids corruption > while having all the gucs in a single file does not. If it's file-per-GUC, then when two sessions try to write different GUCs, there is no conflict. When they try to write the same GUC, the end result will be one value or the other (assuming use of atomic rename). Which seems fine. If it's single-file, and we don't lock, then when two sessions try to write different GUCs, one's update can be lost altogether, because whichever one renames second didn't see the first one's update. That doesn't seem acceptable. regards, tom lane