Re: Proposal: Global Index - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Proposal: Global Index
Date
Msg-id 970988.1610390072@sss.pgh.pa.us
Whole thread Raw
In response to Re: Proposal: Global Index  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Mon, Jan 11, 2021 at 07:40:18PM +0800, 曾文旌 wrote:
>> This is indeed a typical scenario for a partitioned table.
>> there are two basic operations
>> 1) Monthly DETACH old child table
>> 2) Monthly ATTACH new child table
>>
>> For 1) The DETACH old child table can be finished immediately, global index can be kept valid after DETACH is
completed,and the cleanup of garbage data in global index can be deferred to VACUUM. 

> Yes, we can keep the index rows for the deleted partition and clean them
> up later, but what is the advantage of partitioning then?  Just heap
> deletion quickly?  Is that enough of a value?

More to the point, you still have a massive index cleanup operation to do.
Deferred or not, that's going to take a lot of cycles, and it will leave
you with a bloated global index.  I find it hard to believe that this
approach will seem like an improvement over doing partitioning the way
we do it now.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Key management with tests
Next
From: Robert Haas
Date:
Subject: Re: Proposal: Global Index