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

From Fabrízio de Royes Mello
Subject Re: pg_dump bug for extension owned tables
Date
Msg-id CAFcNs+pF2-CgJvNzLYXmdnozGt=J-5kVDvJR+4k+H0h=3dYw0Q@mail.gmail.com
Whole thread Raw
In response to Re: pg_dump bug for extension owned tables  (Fabrízio de Royes Mello <fabriziomello@gmail.com>)
List pgsql-hackers

On Mon, Jul 13, 2020 at 11:52 AM Fabrízio de Royes Mello <fabriziomello@gmail.com> wrote:
>
>
> On Sat, Jul 11, 2020 at 8:07 PM Andrew Dunstan <andrew.dunstan@2ndquadrant.com> wrote:
> >
> >
> > On 6/26/20 2:10 PM, Fabrízio de Royes Mello wrote:
> > >
> > > On Fri, Jun 26, 2020 at 11:55 AM Fabrízio de Royes Mello
> > > <fabriziomello@gmail.com <mailto:fabriziomello@gmail.com>> wrote:
> > > >
> > > >
> > > > On Fri, Jun 26, 2020 at 11:24 AM Andrew Dunstan
> > > <andrew.dunstan@2ndquadrant.com
> > > <mailto:andrew.dunstan@2ndquadrant.com>> wrote:
> > > > >
> > > > >
> > > > > On 6/26/20 9:57 AM, Andrew Dunstan wrote:
> > > > > > 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.
> > > > > >
> > > > > >
> > > > >
> > > > > Should have mentioned this is in src/bin/pg_dump/pg_dump.c
> > > > >
> > > >
> > > > Having a look on it.
> > > >
> > >
> > > Seems when qualify the schemaname the the "tbinfo->interesting" field
> > > is not setted for extensions objects, so the getTableAttrs can't fill
> > > the attgenerated field properly.
> > >
> > > I'm not 100% sure it's the correct way but the attached patch works
> > > for me and all tests passed. Maybe we should add more TAP tests?
> > >
> > >
> >
> >
> > I just tried this patch out on master, with the test case I gave
> > upthread. It's not working, still getting a segfault.
> >
>
> Ohh really sorry about it... my bad... i completely forgot about it!!!
>
> Due to my rush I ended up adding the wrong patch version. Attached the correct version.
>
> Will add TAP tests to src/test/modules/test_pg_dump
>

Attached the patch including TAP tests.

Regards,

--
   Fabrízio de Royes Mello         Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Compatible defaults for LEAD/LAG
Next
From: Alvaro Herrera
Date:
Subject: Re: min_safe_lsn column in pg_replication_slots view