Re: [HACKERS] confusing checkpoint_flush_after / bgwriter_flush_after

2016-11-25 Thread Fabien COELHO
Maybe something like the following, or maybe it should include "bufmgr.h", not sure. As-is this patch seems like a maintenance time bomb; it really needs to use the #defines rather than have the values hard-wired in. However, just including bufmgr.h in frontend code doesn't work, so I moved t

Re: [HACKERS] confusing checkpoint_flush_after / bgwriter_flush_after

2016-11-25 Thread Tom Lane
Fabien COELHO writes: >>> What we do in some similar cases is put the burden on initdb to fill in >>> the correct value by modifying postgresql.conf.sample appropriately. >>> It seems like that could be done easily here too. And it'd be a >>> back-patchable fix. >> I haven't realized initdb can

Re: [HACKERS] confusing checkpoint_flush_after / bgwriter_flush_after

2016-11-25 Thread Fabien COELHO
What we do in some similar cases is put the burden on initdb to fill in the correct value by modifying postgresql.conf.sample appropriately. It seems like that could be done easily here too. And it'd be a back-patchable fix. I haven't realized initdb can do that. I agree that would be the bes

Re: [HACKERS] confusing checkpoint_flush_after / bgwriter_flush_after

2016-11-25 Thread Tomas Vondra
On 11/25/2016 06:10 PM, Tom Lane wrote: Fabien COELHO writes: #checkpoint_flush_after = 0 # 0 disables, # default is 256kB on linux, 0 otherwise I find this pretty confusing, because for all other GUCs in the file, the commented-out value is the default one. I

Re: [HACKERS] confusing checkpoint_flush_after / bgwriter_flush_after

2016-11-25 Thread Tom Lane
Fabien COELHO writes: >> #checkpoint_flush_after = 0 # 0 disables, >> # default is 256kB on linux, 0 otherwise >> I find this pretty confusing, because for all other GUCs in the file, the >> commented-out value is the default one. In this case that would mean "0",

Re: [HACKERS] confusing checkpoint_flush_after / bgwriter_flush_after

2016-11-25 Thread Tomas Vondra
On 11/25/2016 04:40 PM, Fabien COELHO wrote: Hello Tomas, While the 9.6 cat is out of the bag, I think we can fix this quite easily - use "-1" to specify the default value should be used, and use that in the sample file. This won't break any user configuration. Although I understand the issu

Re: [HACKERS] confusing checkpoint_flush_after / bgwriter_flush_after

2016-11-25 Thread Fabien COELHO
Hello Tomas, While the 9.6 cat is out of the bag, I think we can fix this quite easily - use "-1" to specify the default value should be used, and use that in the sample file. This won't break any user configuration. Although I understand the issue, I'm not sure about -1 as a special value to

Re: [HACKERS] confusing checkpoint_flush_after / bgwriter_flush_after

2016-11-25 Thread Tomas Vondra
On 11/25/2016 01:20 PM, Fabien COELHO wrote: Hello Tomas, #checkpoint_flush_after = 0 # 0 disables, # default is 256kB on linux, 0 otherwise I find this pretty confusing, because for all other GUCs in the file, the commented-out value is the default one. In th

Re: [HACKERS] confusing checkpoint_flush_after / bgwriter_flush_after

2016-11-25 Thread Fabien COELHO
Hello Tomas, #checkpoint_flush_after = 0 # 0 disables, # default is 256kB on linux, 0 otherwise I find this pretty confusing, because for all other GUCs in the file, the commented-out value is the default one. In this case that would mean "0", disabling the fl