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