Re: autovacuum multiworkers, patch 5

From: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
To: alvherre(at)commandprompt(dot)com, Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: autovacuum multiworkers, patch 5
Date: 2007-04-05 00:46:40
Message-ID: 20070405092436.7B40.ITAGAKI.TAKAHIRO@oss.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:

> Here is the autovacuum patch I am currently working with. This is
> basically the same as the previous patch; I have tweaked the database
> list management so that after a change in databases (say a new database
> is created or a database is dropped), the list is recomputed to account
> for the change, keeping the ordering of the previous list.

I'm interested in your multiworkers autovacuum proposal.

I'm researching the impact of multiworkers with autovacuum_vacuum_cost_limit.
Autovacuum will consume server resources up to autovacuum_max_workers times
as many as before. I think we might need to change the semantics of
autovacuum_vacuum_cost_limit when we have multiworkers.

BTW, I found an unwitting mistake in the foreach_worker() macro.
These two operations are same in C.
- worker + 1
- (WorkerInfo *) (((char *) worker) + sizeof(WorkerInfo))

#define foreach_worker(_i, _worker) \
_worker = (WorkerInfo *) (AutoVacuumShmem + \
offsetof(AutoVacuumShmemStruct, av_workers)); \
for (_i = 0; _i < autovacuum_max_workers; _i++, _worker += sizeof(WorkerInfo))

should be:

#define foreach_worker(_worker) \
for ((_worker) = AutoVacuumShmem->av_workers; \
(_worker) < AutoVacuumShmem->av_workers + autovacuum_max_workers; \
(_worker)++)

Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2007-04-05 00:56:14 Re: Bug in UTF8-Validation Code?
Previous Message Tatsuo Ishii 2007-04-05 00:34:25 Re: Bug in UTF8-Validation Code?

Browse pgsql-patches by date

  From Date Subject
Next Message Gregory Stark 2007-04-05 01:17:00 Re: Auto Partitioning
Previous Message Tatsuo Ishii 2007-04-05 00:35:33 Re: HOT WIP Patch - version 6.3