Patrick Hatcher <pathat(at)comcast(dot)net> writes:
> Curious: Why would a DELETE FROM tablename work while a pg_dump is
> occurring but a TRUNCATE tablename will stay in a lock state until the
> pg_dump is complete?
TRUNCATE requires an exclusive lock on the table.
This is pretty much a no-free-lunch situation: if you want the pg_dump
to be able to dump all the rows that existed when it started, you can
hardly expect to be able to physically remove those rows meanwhile.
regards, tom lane
In response to
pgsql-general by date
|Next:||From: Ernest Kim||Date: 2004-12-21 17:51:05|
|Subject: Re: BTree max row size?|
|Previous:||From: Marc G. Fournier||Date: 2004-12-21 15:48:28|
|Subject: Re: RES: RES: NewsForge Poll: Favorite open source database|