On Sun, Oct 20, 2013 at 7:21 AM, Magnus Hagander <mag...@hagander.net> wrote:
>> It seemed neater to me to create a new flag, so that in principle any
>> vacuum() code path can request autovacuum_work_mem, rather than having
>> lazyvacuum.c code call IsAutoVacuumWorkerProcess() for the same
>> purpose. To date, that's only been done within vacuumlazy.c for things
>> like logging.
> Hmm. I'm not entirely sure I agree that that makes it neater :)
> We could also look at autovacuum_vacuum_cost_limit etc above, but
> those just override what the non-autovac parameters do. But since the
> parameter is called maintenance_work_mem in that case, I think that
> would make it harder to read.
> But I'd suggest just a:
> int vac_work_mem = (IsAutoVacuumWorkerProcess() && autovacuum_work_mem
> != -1) ? autovacuum_work_mem : maintenance_work_mem;
> and not sending around a boolean flag through a bunch of places when
> it really means just the same thing,
+1 for that change.
The Enterprise PostgreSQL Company
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: