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:13:13
Message-ID: 20200812221313.zfqsfcpt2tmkv4la@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2020-07-15 15:52:03 -0400, Tom Lane wrote:
> I've been experimenting with trying to dump-and-restore the
> regression database, which is a test case that for some reason
> we don't cover in the buildfarm (pg_upgrade is not the same thing).

Yea, we really should have that. IIRC I was trying to add that, and
tests that compare dumps from primary / standby, and failed due to some
differences that were hard to fix.

A quick test with pg_dumpall shows some odd differences after:
1) create new cluster
2) installcheck-parallel
3) drop table gtest30_1, gtest1_1;
4) pg_dumpall > first.sql
5) recreate cluster
6) psql < first.sql > first.sql.log
7) pg_dumpall > second.sql

I've attached the diff between first.sql and second.sql. Here's the
highlights:

@@ -15392,9 +15392,9 @@
--

CREATE TABLE public.test_type_diff2_c1 (
+ int_two smallint,
int_four bigint,
- int_eight bigint,
- int_two smallint
+ int_eight bigint
)
INHERITS (public.test_type_diff2);
...

@@ -39194,10 +39194,10 @@
-- Data for Name: b_star; Type: TABLE DATA; Schema: public; Owner: andres
--

-COPY public.b_star (class, aa, bb, a) FROM stdin;
-b 3 mumble \N
+COPY public.b_star (class, aa, a, bb) FROM stdin;
+b 3 \N mumble
b 4 \N \N
-b \N bumble \N
+b \N \N bumble
b \N \N \N
\.

@@ -323780,7 +323780,7 @@
-- Data for Name: renamecolumnanother; Type: TABLE DATA; Schema: public; Owner: andres
--

-COPY public.renamecolumnanother (d, a, c, w) FROM stdin;
+COPY public.renamecolumnanother (d, w, a, c) FROM stdin;
\.

The primary / standby differences are caused by sequence logging. I
wonder if there's some good way to hide those, or to force them to be
the same between primary / standby, without hiding bugs.

Greetings,

Andres Freund

Attachment Content-Type Size
test_dump_restore.diff text/x-diff 5.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2020-08-12 22:21:32 Re: Parallel query hangs after a smart shutdown is issued
Previous Message Alvaro Herrera 2020-08-12 21:49:18 Re: Dependencies for partitioned indexes are still a mess