Does "--no-unlogged-table-data" prevent table locking?

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Does "--no-unlogged-table-data" prevent table locking?
Date: 2013-12-02 23:50:57
Message-ID: 529D1CE1.30802@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2013-12-02 23:55:49 Re: Inserting boolean types as an alias?
Previous Message Nick 2013-12-02 23:46:17 Inserting boolean types as an alias?