pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: David Gilman <davidgilman1@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: "tuple concurrently updated" in pg_restore --jobs
Date: Fri, 10 Jul 2020 16:06:07 -0500
Message-ID: <20200710210607.GR26220@telsasoft.com> (raw)
In-Reply-To: <2116463.1594414480@sss.pgh.pa.us>
References: <20200706050129.GW4107@telsasoft.com>
	<2116463.1594414480@sss.pgh.pa.us>

On Fri, Jul 10, 2020 at 04:54:40PM -0400, Tom Lane wrote:
> Justin Pryzby <pryzby@telsasoft.com> writes:
> > I hit this issue intermittently (roughly half the time) while working with a
> > patch David submitted, and finally found a recipe to reproduce it on an
> > unpatched v12 instance.
> 
> > I was surprised to see pg_restore -j2 is restoring ACLs in pre-data in
> > parallel.
> 
> It's not pre-data.  But it's true that pg_restore figures it can restore
> ACLs in parallel during the ACL-restoring pass, on the theory that pg_dump
> will not emit two different ACL entries for the same object, so that we
> can do all the catalog updates in parallel without conflicts.
> 
> This works about 99% of the time, in fact.  It falls down in the --clean

Note that this fails for me (sometimes) even without --clean.

$ pg_restore pg_dump.out -j2 -d pryzbyj -v --section pre-data

pg_restore: entering main parallel loop
pg_restore: launching item 3395 ACL TABLE pg_proc
pg_restore: launching item 3396 ACL COLUMN pg_proc.proname
pg_restore: creating ACL "pg_catalog.TABLE pg_proc"
pg_restore: creating ACL "pg_catalog.COLUMN pg_proc.proname"
pg_restore: finished item 3395 ACL TABLE pg_proc
pg_restore: launching item 3397 ACL COLUMN pg_proc.pronamespace
pg_restore: creating ACL "pg_catalog.COLUMN pg_proc.pronamespace"
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 3396; 0 0 ACL COLUMN pg_proc.proname postgres
pg_restore: error: could not execute query: ERROR:  tuple concurrently updated
Command was: GRANT SELECT(proname) ON TABLE pg_catalog.pg_proc TO PUBLIC;


-- 
Justin





view thread (6+ messages)  latest in thread

Message-ID: <20200710210607.GR26220@telsasoft.com>
Permalink:  ../20200710210607.GR26220@telsasoft.com/
Also on:    postgresql.org/message-id/20200710210607.GR26220@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, tgl@sss.pgh.pa.us, davidgilman1@gmail.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: "tuple concurrently updated" in pg_restore --jobs
  In-Reply-To: <20200710210607.GR26220@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox