From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: avoid bloat from CREATE INDEX CONCURRENTLY |
Date: | 2017-02-28 13:30:43 |
Message-ID: | 1983.1488288643@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Simon Riggs <simon(at)2ndquadrant(dot)com> writes:
> On 28 February 2017 at 13:05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Um ... isn't there a transaction boundary there anyway?
> Yes, the patch releases the snapshot early, so it does not hold it
> once the build scan has completed. This allows the sort and build
> phases to occur without holding back the xmin.
Oh ... so Alvaro explained it badly. The reason this is specific to
btree is that it's the only AM with any significant post-scan building
time.
However, now that I read the patch: this is a horribly ugly hack.
I really don't like the API (if it even deserves the dignity of that
name) that you've added to snapmgr. I supposwe the zero documentation
for it fits in nicely with the fact that it's a badly-thought-out kluge.
I think it would be better to just move the responsibility for snapshot
popping in this sequence to the index AMs, full stop.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Pavan Deolasee | 2017-02-28 13:42:03 | Skip all-visible pages during second HeapScan of CIC |
Previous Message | Jan Michálek | 2017-02-28 13:23:56 | Re: Other formats in pset like markdown, rst, mediawiki |