From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: add PROCESS_MAIN to VACUUM |
Date: | 2023-03-02 05:38:49 |
Message-ID: | CAD21AoBh7rukWV0D84Z7WmH6NTGwyNmRCmLcXkog0oP3DNDp_g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Mar 2, 2023 at 2:26 PM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
>
> On Thu, Mar 02, 2023 at 02:21:08PM +0900, Michael Paquier wrote:
> > On Thu, Mar 02, 2023 at 12:58:32PM +0900, Masahiko Sawada wrote:
> >> Cutting the toast relation name to 'pg_toast' is a bit confusing to me
> >> as we have the pg_toast schema. How about using the following query
> >> instead to improve the readability?
> >>
> >> SELECT
> >> CASE WHEN c.relname IS NULL THEN
> >> s.relname
> >> ELSE
> >> 'toast for ' || c.relname
> >> END as relname,
> >> s.vacuum_count
> >> FROM pg_stat_all_tables s
> >> LEFT JOIN pg_class c ON s.relid = c.reltoastrelid
> >> WHERE c.relname = 'vactst' OR s.relname = 'vactst'
> >
> > Another tweak that I have learnt to like is to apply a filter with
> > regexp_replace(), see 090_reindexdb.pl:
> > regexp_replace(b.indname::text, '(pg_toast.pg_toast_)\\d+(_index)', '\\1<oid>\\2')
> >
> > If you make that part of the view definition, the result is the same,
> > so that's up to which solution one prefers.
>
> Here's a new version of the patch that uses Sawada-san's suggestion.
> Thanks for taking a look.
Thank you for updating the patch. The patch looks good to me.
Regards,
--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2023-03-02 05:53:02 | Re: add PROCESS_MAIN to VACUUM |
Previous Message | Nathan Bossart | 2023-03-02 05:26:42 | Re: add PROCESS_MAIN to VACUUM |