Re: Improve behavior of concurrent ANALYZE/VACUUM

Nathan Bossart <bossartn@amazon.com>

From: "Bossart, Nathan" <bossartn@amazon.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@postgresql.org>, "horiguchi.kyotaro@lab.ntt.co.jp" <horiguchi.kyotaro@lab.ntt.co.jp>
Date: 2018-08-23T21:53:57Z
Lists: pgsql-hackers
On 8/23/18, 12:08 AM, "Michael Paquier" <michael@paquier.xyz> wrote:
> Normal regression tests are less costly than isolation tests, so let's
> use them as possible.  What you attached is covering only a portion of
> all the scenarios though, as it is as well interesting to see what
> happens if another user owns only the partitioned table, only one
> partition, and the partitioned as well as at least one partition.  I
> have extended your patch as attached.  It applies on top of HEAD.  Once
> applied with the other patch one can easily stop the difference in
> behavior, and this stresses the ownership checks in vacuum_rel() and
> analyze_rel() as well.  Perhaps we could begin by that?

This seems reasonable to me.  I think establishing the expected
behavior here is a good idea.

Nathan

Commits

  1. Improve VACUUM and ANALYZE by avoiding early lock queue

  2. Add more tests for VACUUM skips with partitioned tables

  3. Add regression tests for VACUUM and ANALYZE with relation skips