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

Re: Latest version of Hot Standby patch: unexpected error querying standby

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Latest version of Hot Standby patch: unexpected error querying standby
Date: 2009-01-04 14:59:36
Message-ID: 4960CED8.1020507@enterprisedb.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Heikki Linnakangas wrote:
> I can reproduce that too with CVS HEAD, so it's clearly a bug. I 
> probably introduced it with the recent smgr changes; I'll try to hunt it 
> down.

Now that was an embarrassingly simple bug:

--- a/src/backend/catalog/storage.c
+++ b/src/backend/catalog/storage.c
@@ -106,7 +106,7 @@ RelationCreateStorage(RelFileNode rnode, bool istemp)
  	srel = smgropen(rnode);
  	smgrcreate(srel, MAIN_FORKNUM, false);

-	if (istemp)
+	if (!istemp)
  	{
  		/*
  		 * Make an XLOG entry showing the file creation.  If we abort, the file

Fixed, as well as the same bug in RelationTruncate. Thanks for report, 
I'll keep this brown paper bag on for a few days...

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

In response to

Responses

pgsql-hackers by date

Next:From: Stephen FrostDate: 2009-01-04 16:18:34
Subject: Re: New patch for Column-level privileges
Previous:From: Heikki LinnakangasDate: 2009-01-04 14:38:08
Subject: Re: Latest version of Hot Standby patch: unexpected error querying standby

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