Bug #796: Problem after upgrading to v. 723

Поиск
Список
Период
Сортировка
От pgsql-bugs@postgresql.org
Тема Bug #796: Problem after upgrading to v. 723
Дата
Msg-id 20021012142350.283FA475D70@postgresql.org
обсуждение исходный текст
Ответы Re: Bug #796: Problem after upgrading to v. 723
Список pgsql-bugs
Michael Brusser (michael@syncinc.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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Creating server-side functions: one simple error
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Bug #796: Problem after upgrading to v. 723