pg_dump bug for extension owned tables - Mailing list pgsql-hackers

From Andrew Dunstan
Subject pg_dump bug for extension owned tables
Date
Msg-id 18048b44-3414-b983-8c7c-9165b177900d@2ndQuadrant.com
Whole thread Raw
Responses Re: pg_dump bug for extension owned tables  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
List pgsql-hackers
Found when working against release 12.


Given the following extension:


::::::::::::::
share/postgresql/extension/dummy--1.0.0.sql
::::::::::::::
-- complain if script is sourced in psql, rather than via CREATE EXTENSION
\echo Use "CREATE EXTENSION dummy" to load this file. \quit

CREATE TABLE @extschema@.dummytab (
       a int,
       b int,
       c int);
SELECT pg_catalog.pg_extension_config_dump('dummytab', '');


::::::::::::::
share/postgresql/extension/dummy.control
::::::::::::::
# dummy extension
comment = 'dummy'
default_version = '1.0.0'
relocatable = false


and this use of it:


bin/psql -c 'create schema dummy; create extension  dummy schema dummy;
insert into dummy.dummytab values(1,2,3);'


this command segfaults:


bin/pg_dump -a --column-inserts -n dummy


It appears that for extension owned tables tbinfo.attgenerated isn't
being properly populated, so line 2050 in REL_12_STABLE, which is line
2109 in git tip, is failing.


I'm looking for a fix, but if anyone has a quick fix that would be nice :-)


cheers


andrew


-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: should libpq also require TLSv1.2 by default?
Next
From: Andrew Dunstan
Date:
Subject: Re: pg_dump bug for extension owned tables