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

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Christian Ullrich <chris(at)chrullrich(dot)net>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GSoC2014] Patch ALTER TABLE ... SET LOGGED
Date: 2014-11-17 08:24:34
Message-ID: CAB7nPqTmT7Mr09oP_1KEKnvQp5hP_B8_O_L+nvvX5dCaUT2c+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 17, 2014 at 5:56 AM, Christian Ullrich <chris(at)chrullrich(dot)net> wrote:
> * Alvaro Herrera wrote:
>
>> Michael Paquier wrote:
>>
>>> Btw, perhaps this diff should be pushed as a different patch as this is a
>>> rather different thing:
>>> - if (heapRelation->rd_rel->relpersistence ==
>>> RELPERSISTENCE_UNLOGGED
>>> &&
>>> + if (indexRelation->rd_rel->relpersistence ==
>>> RELPERSISTENCE_UNLOGGED &&
>>> !smgrexists(indexRelation->rd_smgr, INIT_FORKNUM)
>>> As this is a correctness fix, it does not seem necessary to back-patch
>>> it:
>>> the parent relation always has the same persistence as its indexes.
>>
>>
>> There was an argument for doing it this way that only applies if this
>> patch went in, but I can't remember now what it was.
>>
>> Anyway I pushed the patch after some slight additional changes. Thanks!
>
>
> The buildfarm says -DCLOBBER_CACHE_ALWAYS does not like this patch.
The complaint comes from jaguarundi, like here:
http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jaguarundi&dt=2014-11-16%2015%3A33%3A23

Adding a new parameter to RelationSetNewRelFile
As Tom mentioned, adding a new parameter to set the persistence
through RelationSetNewRelfilenode works. Patch, actually tested with
CLOBBER_CACHE_ALWAYS, attached.
http://www.postgresql.org/message-id/27238.1416073917@sss.pgh.pa.us
Regards,
--
Michael

Attachment Content-Type Size
0001-Fix-CLOBBER_CACHE_ALWAYS-broken-by-85b506b.patch text/x-patch 5.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashutosh Bapat 2014-11-17 08:55:07 Re: inherit support for foreign tables
Previous Message Etsuro Fujita 2014-11-17 07:55:38 Re: inherit support for foreign tables