From: | Justin Pryzby <pryzby(at)telsasoft(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, postgresql(at)taljaren(dot)se, pgsql-bugs(at)lists(dot)postgresql(dot)org, Peter Geoghegan <pg(at)bowt(dot)ie> |
Subject: | Re: BUG #17717: Regression in vacuumdb (15 is slower than 10/11 and possible memory issue) |
Date: | 2022-12-29 01:29:10 |
Message-ID: | 20221229012910.GG1153@telsasoft.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Sun, Dec 18, 2022 at 11:21:47AM +0900, Michael Paquier wrote:
> On Thu, Dec 15, 2022 at 01:56:30PM -0500, Tom Lane wrote:
> > * To fix vacuumdb properly, it might be enough to get it to
> > batch VACUUMs, say by naming up to 1000 tables per command
> > instead of just one. I'm not sure how that would interact
> > with its parallelization logic, though. It's not really
> > solving the O(N^2) issue either, just pushing it further out.
>
> I have been thinking about this part, and using a hardcoded rule for
> the batches would be tricky. The list of relations returned by the
> scan of pg_class are ordered by relpages, so depending on the
> distribution of the sizes (few tables with a large size and a lot of
> table with small sizes, exponential distribution of table sizes), we
> may finish with more downsides than upsides in some cases, even if we
> use a linear rule based on the number of relations, or even if we
> distribute the relations across the slots in a round robin fashion for
> example.
I've always found it weird that it uses "ORDER BY relpages".
I'd prefer if it could ORDER BY age(relfrozenxid) or
GREATEST(age(relfrozenxid), age(relminmxid)), at least if you specify
one of the --min-*age parms. Or something less hardcoded and
unconfigurable.
--
Justin
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-12-29 02:17:54 | Re: BUG #17717: Regression in vacuumdb (15 is slower than 10/11 and possible memory issue) |
Previous Message | Justin Pryzby | 2022-12-29 01:23:54 | Re: BUG #17717: Regression in vacuumdb (15 is slower than 10/11 and possible memory issue) |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2022-12-29 01:44:47 | Re: windows/meson cfbot warnings |
Previous Message | Justin Pryzby | 2022-12-29 01:23:54 | Re: BUG #17717: Regression in vacuumdb (15 is slower than 10/11 and possible memory issue) |