Re: ERROR: missing chunk number 0 for toast value - Mailing list pgsql-hackers

From Robert Haas
Subject Re: ERROR: missing chunk number 0 for toast value
Date
Msg-id CA+TgmoYQpf8+YzMXSZVK=oqpVvEfbYJnhaaYx=T_an4Pe_25+Q@mail.gmail.com
Whole thread Raw
In response to Re: ERROR: missing chunk number 0 for toast value  (Jim Nasby <jim@nasby.net>)
List pgsql-hackers
On Mon, Jan 6, 2014 at 8:02 PM, Jim Nasby <jim@nasby.net> wrote:
> If concurrent TRUNCATE isn't safe outside of this case then why do we allow
> it? IE: why doesn't TRUNCATE exclusive lock the relation?

It *does*.

The problem is that the *other* transaction that's reading the
relation can still retain a TOAST pointer after it no longer holds the
lock.  That's uncool.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: truncating pg_multixact/members
Next
From: Tom Lane
Date:
Subject: Fixing bug #8228 ("set-valued function called in context that cannot accept a set")