Re: [HACKERS] effective_cache_size cannot be changed by a reload

2014-03-20 Thread Fujii Masao
On Thu, Mar 20, 2014 at 2:34 AM, Jeff Janes jeff.ja...@gmail.com wrote:
 In 9.4dev, if the server is started with effective_cache_size = -1, then it
 cannot be changed away from that without a restart.  If you change the
 config file and do a reload or pg_reload_conf(), it ignores the change
 without comment in the logs.

 If you start the server with a value other than -1, then you can change the
 value by editing the file and doing a reload.  You can even change it to -1,
 and then change it back away from -1 again.

I think that's a bug. Patch attached.

 I don't know if bugs reports (without patches) against pre-release versions
 are supposed to go to hackers or to bugs.

Either works at least for me.

Regards,

-- 
Fujii Masao
*** a/src/backend/optimizer/path/costsize.c
--- b/src/backend/optimizer/path/costsize.c
***
*** 4145,4151  set_default_effective_cache_size(void)
  		effective_cache_size = 0;
  		/* and let check_effective_cache_size() compute the setting */
  		SetConfigOption(effective_cache_size, -1,
! 		PGC_POSTMASTER, PGC_S_OVERRIDE);
  	}
  	Assert(effective_cache_size  0);
  }
--- 4145,4151 
  		effective_cache_size = 0;
  		/* and let check_effective_cache_size() compute the setting */
  		SetConfigOption(effective_cache_size, -1,
! 		PGC_POSTMASTER, PGC_S_FILE);
  	}
  	Assert(effective_cache_size  0);
  }

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


Re: [HACKERS] effective_cache_size cannot be changed by a reload

2014-03-20 Thread Tom Lane
Fujii Masao masao.fu...@gmail.com writes:
 On Thu, Mar 20, 2014 at 2:34 AM, Jeff Janes jeff.ja...@gmail.com wrote:
 In 9.4dev, if the server is started with effective_cache_size = -1, then it
 cannot be changed away from that without a restart.

 I think that's a bug. Patch attached.

PGC_S_FILE is at least as bogus as the previous choice; for one thing,
such a source setting implies there should be a file and line number
recorded.

I think PGC_S_DYNAMIC_DEFAULT is the right thing, but I've not absorbed
much caffeine yet today.  Also, if that is the right thing, the section of
guc-file.l beginning at about line 284 needs to get taught about it; which
probably means that set_default_effective_cache_size needs a rethink so
that it can be applied and do something useful in that situation.

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


[HACKERS] effective_cache_size cannot be changed by a reload

2014-03-19 Thread Jeff Janes
In 9.4dev, if the server is started with effective_cache_size = -1, then it
cannot be changed away from that without a restart.  If you change the
config file and do a reload or pg_reload_conf(), it ignores the change
without comment in the logs.

If you start the server with a value other than -1, then you can change the
value by editing the file and doing a reload.  You can even change it to
-1, and then change it back away from -1 again.

It has been that way since at least 6b82f78ff95d7d4201d44359.  Before that
it was broken in other ways, so I don't know what the behavior would have
been.

I don't know if bugs reports (without patches) against pre-release versions
are supposed to go to hackers or to bugs.  If someone has a strong
preference, they might want to clarify this on the bug report form.

Cheers,

Jeff