Re: Rework the way multixact truncations work - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Rework the way multixact truncations work
Date
Msg-id 20150626174835.GP3289@postgresql.org
Whole thread Raw
In response to Rework the way multixact truncations work  (Andres Freund <andres@anarazel.de>)
Responses Re: Rework the way multixact truncations work  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund wrote:

>     Rework the way multixact truncations work.

I spent some time this morning reviewing this patch and had some
comments that I relayed over IM to Andres.  The vast majority is
cosmetic, but there are two larger things:

1. I think this part of PerformMembersTruncation() is very confusing:
    /* verify whether the current segment is to be deleted */    if (segment != startsegment && segment != endsegment)
     SlruDeleteSegment(MultiXactMemberCtl, segment);
 

I think this works correctly in that it preserves both endpoint files,
but the files in between are removed ... which is a confusing interface,
IMO.  I think this merits a longer explanation.


2. We set PGXACT->delayChkpt while the truncation is executed.  This
seems reasonable, and there's a good reason for it, but all the other
users of this facility only do small operations with this thing grabbed,
while the multixact truncation could take a long time because a large
number of files might be deleted.  Maybe it's not a problem to have
checkpoints be delayed by several seconds, or who knows maybe even a
minute in a busy system.  (We will have checkpointer sleeping in 10ms
intervals until the truncation is complete).

Maybe this is fine, not sure.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: Support for N synchronous standby servers - take 2
Next
From: Alvaro Herrera
Date:
Subject: Re: 9.5 release notes