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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, 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 21:05:06
Message-ID: 20427.1307480706@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, Jun 7, 2011 at 3:53 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2011-06-07 22:06:18 Re: BUG #6041: Unlogged table was created bad in slave node
Previous Message Robert Haas 2011-06-07 21:00:43 Re: BUG #6041: Unlogged table was created bad in slave node

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2011-06-07 21:43:39 Re: reducing the overhead of frequent table locks - now, with WIP patch
Previous Message Tom Lane 2011-06-07 21:01:05 Re: [Pgbuildfarm-members] CREATE FUNCTION hang on test machine polecat on HEAD