Re: Dependencies for partitioned indexes are still a mess

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Dependencies for partitioned indexes are still a mess
Date: 2020-08-12 22:38:53
Message-ID: 20200812223853.d45ddez273cqaf4u@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2020-08-12 18:29:16 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > I've attached the diff between first.sql and second.sql. Here's the
> > highlights:
>
> As I recall, the differences in b_star etc are expected, because
> pg_dump reorders that table's columns to match its inheritance parent,
> which they don't to start with because of ALTER TABLE operations.

Ugh. Obviously applications shouldn't use INSERT or SELECT without a
target list, but that still seems somewhat nasty.

I guess we could script it so that we don't compare the "original" with
a restored database, but instead compare the restored version with one
restored from that. But that seems likely to hide bugs.

Given that pg_dump already re-orders the columns for DDL, could we make
it apply that re-ordering not just during the CREATE TABLE, but also
when dumping the table contents?

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-08-12 22:48:28 Re: Dependencies for partitioned indexes are still a mess
Previous Message Andres Freund 2020-08-12 22:34:09 run pgindent on a regular basis / scripted manner