Skip site navigation (1) Skip section navigation (2)

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 19:53:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugspgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> I found a few other holes in my previous patch as well.  I think this
> plugs them all, but it's hard to be sure there aren't any other calls
> to RelationGetNumberOfBlocks() that could bomb out.

[ squint... ]  Do we need those additional tests in plancat.c?  I
haven't paid attention to whether we support unlogged indexes on logged
tables, but if we do, protecting the RelationGetNumberOfBlocks() call is
the least of your worries.  You ought to be fixing things so the planner
won't consider the index valid at all (cf. the indisvalid test at line
165).  Similarly, the change in estimate_rel_size seems to be at an
awfully low level, akin to locking the barn door after the horses are
out.  What code path are you thinking will reach there on an unlogged

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.

			regards, tom lane

In response to


pgsql-hackers by date

Next:From: Robert CreagerDate: 2011-06-07 19:54:04
Subject: Re: [Pgbuildfarm-members] CREATE FUNCTION hang on test machine polecat on HEAD
Previous:From: Greg StarkDate: 2011-06-07 19:49:23
Subject: Re: contrib/citext versus collations

pgsql-bugs by date

Next:From: Greg StarkDate: 2011-06-07 20:01:07
Subject: Re: Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view
Previous:From: Robert HaasDate: 2011-06-07 19:24:53
Subject: Re: BUG #6041: Unlogged table was created bad in slave node

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group