Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED

From: Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)2ndquadrant(dot)com>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Thom Brown <thom(at)linux(dot)com>, Christoph Berg <cb(at)df7cb(dot)de>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>, Stephen Frost <sfrost(at)snowman(dot)net>
Subject: Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED
Date: 2014-08-22 03:17:11
Message-ID: CAFcNs+oLW6T4YCtXsGTpbUmTWVZtbUe=nL5TNwM7NMWpW15N6A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Aug 21, 2014 at 10:26 PM, Fabrízio de Royes Mello <
fabriziomello(at)gmail(dot)com> wrote:
>
>
> On Thu, Aug 21, 2014 at 8:04 PM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
wrote:
> > Andres Freund wrote:
> >
> > > Have you looked at the correctness of the patch itself? Last time I'd
> > > looked it has fundamental correctness issues. I'd outlined a possible
> > > solution, but I haven't looked since.
> >
> > Yeah, Fabrizio had it passing the relpersistence down to make_new_heap,
> > so the transient table is created with the right setting. AFAICS it's
> > good now. I'm a bit uneasy about the way it changes indexes: it just
> > updates pg_class for them just before invoking the reindex in
> > finish_heap_swap. I think it's correct as it stands though; at least,
> > the rewrite phase happens with the right setting, so that if there are
> > constraints being checked and these invoke index scans, such accesses
> > would not leave buffers with the wrong setting in shared_buffers.
> >
>
> Ok.
>
>
> > Another option would be to pass the new relpersistence down to
> > finish_heap_swap, but that would be hugely complicated AFAICS.
> >
>
> I think isn't so complicated to do it, but will this improve something ?
> Maybe I didn't understand it very well. IMHO it just complicate a
> simple thing.
>
>
>
> > Here's the updated patch.
> >
>
> Thanks Alvaro!
>

I forgot to mention... I did again a lot of tests using different
replication scenarios to make sure all is ok:
- slaves async
- slaves sync
- cascade slaves

Regards,

--
Fabrízio de Royes Mello
Consultoria/Coaching PostgreSQL
>> Timbira: http://www.timbira.com.br
>> Blog: http://fabriziomello.github.io
>> Linkedin: http://br.linkedin.com/in/fabriziomello
>> Twitter: http://twitter.com/fabriziomello
>> Github: http://github.com/fabriziomello

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2014-08-22 03:29:31 Re: Removing dependency to wsock32.lib when compiling code on WIndows
Previous Message Noah Misch 2014-08-22 02:51:37 Re: inherit support for foreign tables