Re: error on drop table - Mailing list pgsql-general

From Bruce Momjian
Subject Re: error on drop table
Date
Msg-id 200111290553.fAT5rH207820@candle.pha.pa.us
Whole thread Raw
In response to Re: error on drop table  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
> regression=# DROP TABLE tqt;
> NOTICE:  FlushRelationBuffers(tqt, 0): block 0 is referenced (private 2, global 1)
> ERROR:  heap_drop_with_catalog: FlushRelationBuffers returned -2
> regression=#
>
> The error message is evidently arising because the cursor's seqscan
> still has a pin on the scan's current page.
>
> Ideally we should refuse to execute the DROP because of the open cursor.
> Offhand I don't see an easy way to do that, however.  Bruce, would you
> put something about it in TODO?

Seems it fails with temp and regular tables.  Added to TODO:

        o Prevent DROP of table being referenced by our own open cursor

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: ident authorization (was backup: pg_dumpall and full backups in general)
Next
From: Stuart Grimshaw
Date:
Subject: Installing Libraries on remote pc