Re: Is it worth to optimize VACUUM/ANALYZE by combining duplicate rel instances into single rel instance?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Is it worth to optimize VACUUM/ANALYZE by combining duplicate rel instances into single rel instance?
Date: 2021-04-10 14:33:10
Message-ID: 2297467.1618065190@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> writes:
> I'm reading the code for vacuum/analyze and it looks like currently we
> call vacuum_rel/analyze_rel for each relation specified. Which means
> that if a relation is specified more than once, then we simply
> vacuum/analyze it that many times. Do we gain any advantage by
> vacuuming/analyzing a relation back-to-back within a single command? I
> strongly feel no. I'm thinking we could do a simple optimization here,

This really is not something to expend cycles and code complexity on.
If the user wrote the same table more than once, that's their choice.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2021-04-10 14:52:10 Re: Truncate in synchronous logical replication failed
Previous Message vignesh C 2021-04-10 13:21:32 Re: Replication slot stats misgivings