Robert Haas <robertmhaas@gmail.com> writes:
> But that's not the problem. The problem is that ALTER SYSTEM modifies
> the first match instead of the last one, when it's a well-established
> principle that when reading from a PostgreSQL configuration file, the
> system adopts the value from the last match, not the first one. I
> admit that if somebody had thought to document what ALTER SYSTEM was
> doing, that person would probably have also realized that they had
> made a mistake in the code, and then they would have fixed the bug,
> and that would be great.
Well, actually, the existing code is perfectly clear about this:
/* Search the list for an existing match (we assume there's only one) */
That assumption is fine *if* you grant that only ALTER SYSTEM itself
is authorized to write that file. I think the real argument here
centers around who else is authorized to write the file, and when
and how.
In view of the point you made upthread that we explicitly made
pg.auto.conf a plain text file so that one could recover from
mistakes by hand-editing it, I think it's pretty silly to adopt
a position that external mods are disallowed.
regards, tom lane