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: 20021012142350.283FA475D70@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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,
Michael.

Sample Code
TEST CASE:
------------------------------
BEGIN;
CREATE SEQUENCE s_ASeq;
SELECT nextval('s_ASeq') ;
DROP SEQUENCE s_ASeq ;
/* some sql statement might be here */
COMMIT;
------------------------------

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

Responses

Browse pgsql-bugs by date

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