Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions - Mailing list pgsql-general

From Vadim Mikheev
Subject Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions
Date
Msg-id 38421D32.90A2E2CB@krs.ru
Whole thread Raw
In response to Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions  ("Mike Mascari" <mascarm@mascari.com>)
List pgsql-general
Mike Mascari wrote:
>
> Will that aid in fixing a problem such as this:
>
> session 1:
>
> CREATE TABLE example1(value int4);
> BEGIN;
>
> session 2:
>
> BEGIN;
> ALTER TABLE example1 RENAME TO example2;
>
> session 1:
>
> INSERT INTO example1 VALUES (1);
> END;
> NOTICE: Abort Transaction and not in in-progress state
> ERROR: Cannot write block 0 of example1 [test] blind
>
> session 2:
>
> END;
> NOTICE: Abort Transaction and not in in-progress state
> ERROR: Cannot write block 0 of example1 [test] blind

Seems that oid file names will fix this...
Currently, each shared buffer description structure has
database/table names for the purposes of "blind" writes
(when backend cache hasn't entry for relation and so
bufmgr can't use cache to get names from oids).
ALTER TABLE ... RENAME renames relation file(s) but doesn't
change relation name inside shbuffers...

> Mike (implicit commit) Mascari

-:)))

Vadim

pgsql-general by date:

Previous
From: Ken Gunderson
Date:
Subject: Re: [GENERAL] memory
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: [GENERAL] drop/rename table and transactions