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

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, 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 14:24:12
Message-ID: 1307456529-sup-7240@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

Excerpts from Robert Haas's message of mar jun 07 08:16:01 -0400 2011:
> On Tue, Jun 7, 2011 at 2:57 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> > Seems like you're trying to fix the problem directly, which as you
> > say, has problems.
> >
> > At some point we resolve from a word mentioned in the FROM clause to a
> > relfilenode.
> >
> > Surely somewhere there we can notice its unlogged before we end up
> > down in the guts of smgr?
>
> Probably. I guess the question is whether we want this to fail in (a)
> the parser, (b) the planner, or (c) the executor. I'm not quite sure
> what is best, but if I had to guess I would have picked (c) in
> preference to (b) in preference to (a), and you seem to be proposing
> (a). Having parserOpenTable() or transformSelectStmt() or some such
> place barf doesn't feel right - it's not the job of those functions to
> decide whether the query can actually be executed at the moment, just
> whether it's well-formed.

Really? I thought it was the job of the parse analysis phase to figure
out if table and column names are valid or not, and such. If that's the
case, wouldn't it make sense to disallow usage of a table that doesn't
"exist" in a certain sense?

--
Álvaro Herrera <alvherre(at)commandprompt(dot)com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-06-07 14:33:05 Re: Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view
Previous Message Alex 2011-06-07 12:44:26 BUG #6054: Insert to table, which has fkey to table, which is parenttable for another table - error

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-06-07 14:37:30 Re: BUG #6041: Unlogged table was created bad in slave node
Previous Message Tom Lane 2011-06-07 14:20:13 Re: SIREAD lock versus ACCESS EXCLUSIVE lock