Re: [PATCH] Stop ALTER SYSTEM from making bad assumptions
Gavin Flower <gavinflower@archidevsys.co.nz>
From: Gavin Flower <GavinFlower@archidevsys.co.nz>
To: pgsql-hackers@lists.postgresql.org
Date: 2019-06-16T22:56:41Z
Lists: pgsql-hackers
On 17/06/2019 05:58, Magnus Hagander wrote: > On Sun, Jun 16, 2019 at 7:43 PM Stephen Frost <sfrost@snowman.net > <mailto:sfrost@snowman.net>> wrote: > > > * Tom Lane (tgl@sss.pgh.pa.us <mailto:tgl@sss.pgh.pa.us>) wrote: > > Stephen Frost <sfrost@snowman.net <mailto:sfrost@snowman.net>> > writes: > > > > what we should do is clean them up (and possibly > > > throw a WARNING or similar at the user saying "something > modified your > > > postgresql.auto.conf in an unexpected way"). I'd suggest we > do that on > > > every ALTER SYSTEM call. > > > > +1 for having ALTER SYSTEM clean out duplicates. Not sure whether > > a WARNING would seem too in-your-face. > > I'd hope for a warning from basically every part of the system when it > detects, clearly, that a file was changed in a way that it shouldn't > have been. If we don't throw a warning, then we're implying that it's > acceptable, but then cleaning up the duplicates, which seems pretty > confusing. > > > +1. Silently "fixing" the file by cleaning up duplicates is going to > be even more confusing to uses who had seen them be there before. > > -- > Magnus Hagander > Me: https://www.hagander.net/ <http://www.hagander.net/> > Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/> I thinking fixing this silently should be at least a hanging offence. At one time I came a cross a language PL/1, that would silently 'correct' some mistakes, without indicating what it did. I thought this was extremely dangerous, that could lead to some very nasty and unexpected bugs! It is most important that people be aware of possibly conflicting changes, or that values they saw in postgresql.conf may have been changed. Hmm... this suggests that all the implied defaults should be explicitly set! Would that be too greater change to make? Cheers, Gavin
Commits
-
Doc: improve documentation about postgresql.auto.conf.
- e3ddb112f245 10.11 landed
- 7f77f2aec3d0 11.6 landed
- 57980bdf62f4 9.4.25 landed
- 45aaaa42fefa 13.0 landed
- 372d6a8918e0 12.0 landed
- 1ab92aaa97ce 9.5.20 landed
- 0969a7aa3240 9.6.16 landed
-
Fix ALTER SYSTEM to cope with duplicate entries in postgresql.auto.conf.
- f1bf619acdff 13.0 landed
- f8c9a08520ee 10.11 landed
- a4b0d955bd23 9.4.25 landed
- 75b2f011f642 12.0 landed
- 4784ad7a370e 9.6.16 landed
- 32d38f54a369 11.6 landed
- 29f9b1819a72 9.5.20 landed