Does "--no-unlogged-table-data" prevent table locking? - Mailing list pgsql-general

From Steve Crawford
Subject Does "--no-unlogged-table-data" prevent table locking?
Date
Msg-id 529D1CE1.30802@pinpointresearch.com
Whole thread Raw
List pgsql-general
If a database has an unlogged table and that table is truncated during
while a database dump with the "--no-unlogged-table-data" option is
running, will the table be locked against a truncate or will the
truncate succeed? The documentation is unclear on this detail.

Background:

We have a regular Bash script that essentially does the following:

1. Some preprocessing
2. psql: ...empty a table, populate the table, do some processing on the
table...
3. More non PG steps in Bash
4. psql ...some remaining processing on the table and export the results...
5. Cleanup

We are now colliding with a nightly dump which is delaying this script.
Note that since there is a break between the two calls to psql, we
cannot use a temporary table but an unlogged table is perfectly safe for
our purposes.

Cheers,
Steve



pgsql-general by date:

Previous
From: Nick
Date:
Subject: Inserting boolean types as an alias?
Next
From: Adrian Klaver
Date:
Subject: Re: Inserting boolean types as an alias?