Bruce Momjian <br...@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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to