Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED - Mailing list pgsql-hackers

From Fabrízio de Royes Mello
Subject Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED
Date
Msg-id CAFcNs+qfzwGf7-Lf32Gd7+b0Y55qiNNT+2cM8gdMOmF44-izAQ@mail.gmail.com
Whole thread Raw
In response to Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED
List pgsql-hackers
<div dir="ltr"><br />On Thu, Aug 21, 2014 at 8:04 PM, Alvaro Herrera <<a
href="mailto:alvherre@2ndquadrant.com">alvherre@2ndquadrant.com</a>>wrote:<br />> Andres Freund wrote:<br
/>><br/>> > Have you looked at the correctness of the patch itself? Last time I'd<br /> > > looked it
hasfundamental correctness issues. I'd outlined a possible<br />> > solution, but I haven't looked since.<br
/>><br/>> Yeah, Fabrizio had it passing the relpersistence down to make_new_heap,<br /> > so the transient
tableis created with the right setting.  AFAICS it's<br />> good now.  I'm a bit uneasy about the way it changes
indexes:it just<br />> updates pg_class for them just before invoking the reindex in<br /> > finish_heap_swap.  I
thinkit's correct as it stands though; at least,<br />> the rewrite phase happens with the right setting, so that if
thereare<br />> constraints being checked and these invoke index scans, such accesses<br /> > would not leave
bufferswith the wrong setting in shared_buffers.<br />><br /><br />Ok.<br /><br />> Another option would be to
passthe new relpersistence down to<br />> finish_heap_swap, but that would be hugely complicated AFAICS.<br />
><br/><br />I think isn't so complicated to do it, but will this improve something ? <br />Maybe I didn't understand
itvery well. IMHO it just complicate a<br />simple thing.<br /><br /><br />> Here's the updated patch.<br /> ><br
/><br/>Thanks Alvaro!<br /><br />Regards,<br /><br />--<br />Fabrízio de Royes Mello<br />Consultoria/Coaching
PostgreSQL<br/>>> Timbira: <a href="http://www.timbira.com.br">http://www.timbira.com.br</a><br />>> Blog:
<ahref="http://fabriziomello.github.io">http://fabriziomello.github.io</a><br /> >> Linkedin: <a
href="http://br.linkedin.com/in/fabriziomello">http://br.linkedin.com/in/fabriziomello</a><br/>>> Twitter: <a
href="http://twitter.com/fabriziomello">http://twitter.com/fabriziomello</a><br/>>> Github: <a
href="http://github.com/fabriziomello">http://github.com/fabriziomello</a></div>

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: pgcrypto: PGP signatures
Next
From: Andrew Gierth
Date:
Subject: Re: WIP Patch for GROUPING SETS phase 1