Re: BUG #6041: Unlogged table was created bad in slave node - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6041: Unlogged table was created bad in slave node
Date
Msg-id 20427.1307480706@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #6041: Unlogged table was created bad in slave node  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: BUG #6041: Unlogged table was created bad in slave node
List pgsql-bugs
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Jun 7, 2011 at 3:53 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It might be that it'd be best just to have both the planner and executor
>> throwing errors on unlogged tables, rather than rejiggering pieces of
>> the planner to sort-of not fail on an unlogged table.

> Mmm, that's not a bad thought either.  Although I think if we can be
> certain that the planner will error out, the executor checks aren't
> necessary.  It would disallow preparing a statement and then executing
> it after promotion, but that doesn't seem terribly important.  Any
> idea where to put the check?

Well, I'd recommend keeping the test in ExecOpenScanRelation, since it's
cheap insurance against the situation changing since the plan was made.
But for the planner, why not just put the same kind of test in
get_relation_info, just after it does heap_open?

            regards, tom lane

pgsql-bugs by date:

Previous
From: Robert Haas
Date:
Subject: Re: BUG #6041: Unlogged table was created bad in slave node
Next
From: Robert Haas
Date:
Subject: Re: BUG #6041: Unlogged table was created bad in slave node