Re: pg_autovacuum vacuum cost variables patch - Mailing list pgsql-patches

From Michael Paesold
Subject Re: pg_autovacuum vacuum cost variables patch
Date
Msg-id 008901c4bb49$dc515160$ad01a8c0@zaphod
Whole thread Raw
In response to pg_autovacuum vacuum cost variables patch  ("Matthew T. O'Connor" <matthew@zeut.net>)
Responses Re: pg_autovacuum vacuum cost variables patch  ("Matthew T. O'Connor" <matthew@zeut.net>)
Re: pg_autovacuum vacuum cost variables patch  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Matthew T. O'Connor wrote:

> Two questions:
> 1) It is my understanding that these new GUC vars only effect vacuum.
> That is they do NOT have any effect on an analyze command right? (I ask
> since I'm only setting the vars before I issue a vacuum command)

No, vacuum also affects analyze alone (cvs tip here):
(2.5 seconds -> 50 seconds)

test=# SET vacuum_cost_delay TO 0;
SET
Time: 0.308 ms
test=# analyze;
ANALYZE
Time: 2591.259 ms
test=# SET vacuum_cost_delay TO 10;
SET
Time: 0.309 ms
test=# analyze;
ANALYZE
Time: 51737.896 ms

And it seems it affects analyze much more than vacuum, at least if there is
*nothing* to vacuum... (2 seconds -> 8 seconds)

test=# SET vacuum_cost_delay TO 0;
SET
Time: 0.261 ms
test=# VACUUM;
VACUUM
Time: 1973.137 ms
test=# SET vacuum_cost_delay TO 10;
SET
Time: 0.236 ms
test=# vacuum;
VACUUM
Time: 7966.085 ms

I suggest you also issue the SET commands for analyze also. ISTM that there
is also no distinction between VACUUM and VACUUM FULL, but I think
pg_autovacuum never does a vacuum full, so there is no problem with that.

Best Regards,
Michael Paesold


pgsql-patches by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [HACKERS] ARC Memory Usage analysis
Next
From: Simon Riggs
Date:
Subject: Re: [HACKERS] ARC Memory Usage analysis