BUG #8257: Multi-Core Restore fails when containing index comments - Mailing list pgsql-bugs

From lalbin@fhcrc.org
Subject BUG #8257: Multi-Core Restore fails when containing index comments
Date
Msg-id E1UrzMa-0007Ns-KX@wrigleys.postgresql.org
Whole thread Raw
Responses Re: BUG #8257: Multi-Core Restore fails when containing index comments
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      8257
Logged by:          Lloyd Albin
Email address:      lalbin@fhcrc.org
PostgreSQL version: 9.2.4
Operating system:   SUSE Linux (64-bit)
Description:

I have found the restore will fail when using pg_restore's -j option, with
more than one core, on a dump that contains a COMMENT INDEX.


I have tried this using both Postgres 9.0.12 & 9.2.4


I have created a test case that shows the problem.


Create a database called test_db.


CREATE DATABASE test_db
  WITH OWNER = postgres
    ENCODING = 'UTF8'
    TEMPLATE = template0;


Run this next section to add the table, index, and index comment to the
test_db database.


CREATE TABLE public.tbl_test (
  pkey TEXT NOT NULL,
  CONSTRAINT tbl_test_pkey PRIMARY KEY(pkey)
);


COMMENT ON INDEX public.tbl_test_pkey
IS 'Index Comment';


Once this test database is created, create a backup of the database.


pg_dump -Fc test_db > test_db.dump


Drop the test database and now lets restore it.


pg_restore -C -j 3 -d postgres -Fc test_db.dump


pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2525; 0 0 COMMENT INDEX
tbl_test_pkey postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  relation
"tbl_test_pkey" does not exist
    Command was: COMMENT ON INDEX tbl_test_pkey IS 'Index Comment';






pg_restore: [archiver] worker process failed: exit code 1


If you use -j 1 or skip the -j option the restore will restore without any
errors.


Lloyd Albin
Statistical Center for HIV/AIDS Research and Prevention (SCHARP)
Vaccine and Infectious Disease Division (VIDD)
Fred Hutchinson Cancer Research Center (FHCRC)

pgsql-bugs by date:

Previous
From: Ashesh Vashi
Date:
Subject: Re: BUG #8256: query screen on pgAdmin is show blank
Next
From: Kristopher Kane
Date:
Subject: BUG #8238: duplicate of bug #6372 on panffs