From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Rework the way multixact truncations work |
Date: | 2015-06-26 17:48:35 |
Message-ID: | 20150626174835.GP3289@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2015-06-26 18:01:39 | Re: 9.5 release notes |
Previous Message | Josh Berkus | 2015-06-26 17:12:22 | Re: Support for N synchronous standby servers - take 2 |