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

Bug #796: Problem after upgrading to v. 723

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #796: Problem after upgrading to v. 723
Date: 2002-10-12 14:23:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Michael Brusser (michael(at)syncinc(dot)com) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
Problem after upgrading to v. 723 

Long Description
After upgrading from v. 721 to 723 some of regression tests failed.
(We're running on Solaris)
Looking into problem, it appears that sometimes transaction
(we use serializable) gets aborted when we drop the sequence.

Test case below reflects my understanding of the problem.
In reality we have much more code between those lines in my test
sample - we create and drop table that utilizes this sequence,
we insert, update and delete data. But that does not look relevant
to the problem.

The sample code should fail if run from psql session - interactively
or using either "\i" or "-f" option.

I would appreciate if you reply to me directly with at least a hint of what's going on.
Thank you much,

Sample Code
   SELECT nextval('s_ASeq') ;
   /* some sql statement might be here */

1) Problem occurs when attempt is made to drop the sequence:
   ERROR:  RelationForgetRelation: relation <rel_no> is still open

2) If there is an SQL statement following after that - 
   it will understandably fail with this message:
   NOTICE:  current transaction is aborted, queries ignored 
            until end of transaction block.

3) If "SELECT nextval" is never called - everything works.

4) If this code is run NOT within a transaction - 
   everything's almost good, I see only a notice:
   NOTICE:  s_aseq.nextval: sequence was re-created 
   This notice is generated when "SELECT nextval" is called.
  -Why Postgres needs to re-create the seq. table?

No file was uploaded with this report


pgsql-bugs by date

Next:From: Tom LaneDate: 2002-10-12 16:22:10
Subject: Re: Bug #796: Problem after upgrading to v. 723
Previous:From: Peter EisentrautDate: 2002-10-11 22:42:47
Subject: Re: Creating server-side functions: one simple error

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