Re: ERROR: missing chunk number 0 for toast value

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jim Nasby <jim(at)nasby(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, Rushabh Lathia <rushabh(dot)lathia(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Rushabh Lathia <rushabh(dot)lathia(at)enterprisedb(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: ERROR: missing chunk number 0 for toast value
Date: 2014-01-07 01:53:24
Message-ID: CA+TgmoYQpf8+YzMXSZVK=oqpVvEfbYJnhaaYx=T_an4Pe_25+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 6, 2014 at 8:02 PM, Jim Nasby <jim(at)nasby(dot)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

In response to

Browse pgsql-hackers by date

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