pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Zhihong Yu <zyu@yugabyte.com>
Cc: pgsql-hackers@lists.postgresql.org, Yuzuko <yuzukohosoya@gmail.com>
Subject: Re: pgsql: autovacuum: handle analyze for partitioned tables
Date: Fri, 9 Apr 2021 18:16:59 -0400
Message-ID: <20210409221659.GA28298@alvherre.pgsql> (raw)
In-Reply-To: <20210409214508.GV6592@telsasoft.com>

On 2021-Apr-09, Justin Pryzby wrote:

> One data point: we do DETACH/ATTACH tables during normal operation, before
> type-promoting ALTERs, to avoid worst-case disk use, and to avoid locking the
> table for a long time.  It'd be undesirable (but maybe of no great consequence)
> to trigger an ALTER when we DETACH them, since we'll re-ATTACH it shortly
> afterwards.

You mean to trigger an ANALYZE, not to trigger an ALTER, right?

I think I agree with Tomas: we should do it by default, and offer some
way to turn that off.  I suppose a new reloptions, solely for
partitioned tables, would be the way to do it.

> However, I think DROP should be handled ?

DROP of a partition? ... I would think it should do the same as DETACH,
right?  Inform that however many rows the partition had, are now changed
in ancestors.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W
"Aprender sin pensar es inútil; pensar sin aprender, peligroso" (Confucio)





view thread (33+ messages)  latest in thread

Message-ID: <20210409221659.GA28298@alvherre.pgsql>
Permalink:  ../20210409221659.GA28298@alvherre.pgsql/
Also on:    postgresql.org/message-id/20210409221659.GA28298@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, pryzby@telsasoft.com, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, zyu@yugabyte.com, yuzukohosoya@gmail.com
  Subject: Re: pgsql: autovacuum: handle analyze for partitioned tables
  In-Reply-To: <20210409221659.GA28298@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox