pg_dump fails on temp tables

From: Artem Tomyuk <admin(at)leboutique(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: pg_dump fails on temp tables
Date: 2016-04-04 08:58:26
Message-ID: CANYYVqK-oscsN8iM=xJ=QhQVYqn_rzDoPmaGEDzok-p_Avy7sQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi.

I am trying to do multi-threaded backup with

pg_dump -Z 9 -j 8 -F c -F d -T "doc*" -U postgres -d foo

but from time to time it fails with error

pg_dump: [parallel archiver] could not obtain lock on relation "public.tt1"
This usually means that someone requested an ACCESS EXCLUSIVE lock on the
table after the pg_dump parent process had gotten the initial ACCESS SHARE
lock on the table.

How I can avoid this, just adding -T "tt*"?

Why pg_dump trying to dump temp tables? As i know temp tables are created
and visible only in one session?

Thanks.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2016-04-04 13:52:37 Re: pg_dump fails on temp tables
Previous Message Artem Tomyuk 2016-04-01 09:32:57 Dockerized PostgreSQL