Skip site navigation (1) Skip section navigation (2)

Re: Instability in TRUNCATE regression test

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Instability in TRUNCATE regression test
Date: 2006-06-28 17:04:16
Message-ID: 20060628170416.GD17673@surnet.cl (view raw or flat)
Thread:
Lists: pgsql-hackers
Tom Lane wrote:

> 1. Find a way to make the processing order consistent (eg by driving it
> off OID ordering).  Doesn't seem easy, but maybe I'm missing an idea.

Hmm, what about

1. get the complete list of tables to truncate, AccessShareLock'ed, get
their names
2. release locks
3. sort the list lexicographically (or by Oid, whatever)
4. acquire the stronger locks, in list order, taking care of not
aborting if a table is no longer there
5. truncate

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

In response to

Responses

pgsql-hackers by date

Next:From: Jim C. NasbyDate: 2006-06-28 17:10:53
Subject: Re: Fixed length datatypes. WAS [GENERAL] UUID's as primary keys
Previous:From: Thomas HallgrenDate: 2006-06-28 16:39:16
Subject: Fixed length datatypes. WAS [GENERAL] UUID's as primary keys

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group