Re: BUG #6041: Unlogged table was created bad in slave node

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, Emanuel <postgres(dot)arg(at)gmail(dot)com>, pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #6041: Unlogged table was created bad in slave node
Date: 2011-06-07 02:29:02
Message-ID: BANLkTinuA4fFnGtPYVrFvW0GssXYkOUGiQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Fri, Jun 3, 2011 at 1:01 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)com> wrote:
> Excerpts from Robert Haas's message of vie jun 03 12:44:45 -0400 2011:
>> On Wed, Jun 1, 2011 at 2:28 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
>> > (4) It strikes me that it might be possible to address this problem a
>> > bit more cleanly by allowing mdnblocks() and smgrnblocks() and
>> > RelationGetNumberOfBlocksInFork() to take a boolean argument
>> > indicating whether or not an error should be thrown if the underlying
>> > physical file happens not to exist.  When no error is to be signaled,
>> > we simply return 0 when the main fork doesn't exist, rather than
>> > throwing an error.
>>
>> If we don't want to gum this with the above-mentioned cruft, the other
>> obvious alternative here is to do nothing, and live with the
>> non-beauty of the resulting error message.
>
> Option 4 seems reasonable to me ... can you get rid of the dupe
> smgrnblocks call simultaneously?

What dup smgrnblocks call?

Patch along these lines attached.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Attachment Content-Type Size
reject-unlogged-during-recovery-v2.patch application/octet-stream 12.4 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-06-07 04:11:46 Re: BUG #6051: wCTE query fail with wrong error text on a table with rules
Previous Message David Fetter 2011-06-06 16:41:01 Re: BUG #6051: wCTE query fail with wrong error text on a table with rules

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Creager 2011-06-07 03:16:33 Re: [Pgbuildfarm-members] CREATE FUNCTION hang on test machine polecat on HEAD
Previous Message Gurjeet Singh 2011-06-07 02:11:20 Re: Review: psql include file using relative path