Re: Improve behavior of concurrent ANALYZE/VACUUM - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Improve behavior of concurrent ANALYZE/VACUUM
Date
Msg-id 20180824021527.GF30782@paquier.xyz
Whole thread Raw
In response to Re: Improve behavior of concurrent ANALYZE/VACUUM  ("Bossart, Nathan" <bossartn@amazon.com>)
Responses Re: Improve behavior of concurrent ANALYZE/VACUUM
List pgsql-hackers
On Thu, Aug 23, 2018 at 09:53:57PM +0000, Bossart, Nathan wrote:
> This seems reasonable to me.  I think establishing the expected
> behavior here is a good idea.

Thanks, I have pushed the new test series, and reused it to check the
new version of the main patch, which is attached.  I have added a commit
message and I have indented the thing.

After pondering about it, I have also reworked the portion for
partitioned tables so as the list of partitions processed is unchanged
on HEAD, and we keep a consistent behavior compared to past versions.
If VACUUM processing for partitioned tables was something new in 11, I
think that we could have considered it, but changing silently something
that people may rely on for more than one year now is not very
appealing.

I can personally imagine data models with multiple layers of partitions
where the top-most parent has the most restricted access, and then
things get more permitted the more down you get.  For example let's
imagine a table listing a population, which is split by cities.  The
top-most partitioned table references the whole country, which say only
the president has access to.  Then there are partitions which can be
accessed only by the majors of each city.  In this case, even if a mayor
does a VACUUM FULL of its leaf partition then a full read would be
blocked even for the president.

The reverse is technically possible, aka the top-most parent is not
really restrictive, and leafs get more and more restricted, but
logically that does not make much sense as the top-most parent would be
just useless for any kind of operations so as a full table scan.

Still, in the first case, say that each city major uses the same
application layer which vacuums the top-most parent, then we'd break
something that worked in 10 and 11.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Removing useless DISTINCT clauses
Next
From: Michael Paquier
Date:
Subject: Re: Hint to set owner for tablespace directory