Re: [HACKERS] vacuum process size - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] vacuum process size
Date
Msg-id 2107.935507128@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] vacuum process size  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Responses Re: [HACKERS] vacuum process size
Re: [HACKERS] vacuum process size
List pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> I have tested your idea and found even more improved memory usage
> (86MB vs. 43MB). Standard vacuum consumes as much as 478MB memory with
> deleting 5000000 tuples that would not be acceptable for most
> configurations. I think we should fix this as soon as possible.  If
> there's no objection, I will commit included patches to the stable
> tree (seems Tom has more aggressive idea, so I'll leave the current
> tree as it is).

No, please make the change in current as well.  I was thinking about
tweaking aset.c to be smarter about releasing large chunks, but in any
case having the doubling behavior at the request point will be a big
improvement.

I do not like your patch as given, however.  By using a static variable
you are assuming that there is only one active VPageList at a time.
It looks to me like there are at least two --- and there is no reason
to think they'd be the same size.

You need to add a num_pages field to the VPageList struct, not use
a static.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Sorting costs (was Caution: tonight's commits force initdb)
Next
From: Theo Kramer
Date:
Subject: Re: AW: [HACKERS] Caution: tonight's commits force initdb