Re: Broken defenses against dropping a partitioning column
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: pgsql-hackers@lists.postgresql.org,
Manuel Rigger <rigger.manuel@gmail.com>
Date: 2019-07-19T18:14:03Z
Lists: pgsql-hackers
Attachments
- add-dependencies-for-partitioning-columns-1.patch (text/x-diff) patch
I wrote: > So I think we're probably stuck with the approach of adding new internal > dependencies. If we go that route, then our options for the released > branches are (1) do nothing, or (2) back-patch the code that adds such > dependencies, but without a catversion bump. That would mean that only > tables created after the next minor releases would have protection against > this problem. That's not ideal but maybe it's okay, considering that we > haven't seen actual field reports of trouble of this kind. Here's a proposed patch for that. It's mostly pretty straightforward, except I had to add some recursion defenses in findDependentObjects that weren't there before. But those seem like a good idea anyway to prevent infinite recursion in case of bogus entries in pg_depend. I also took the liberty of improving some related error messages that I thought were unnecessarily vague and not up to project standards. Per above, I'm envisioning applying this to HEAD and v12 with a catversion bump, and to v11 and v10 with no catversion bump. regards, tom lane
Commits
-
Make pg_upgrade's test.sh less chatty.
- 8d21512dc34f 11.5 landed
- 7ac7bf50cc9a 10.10 landed
- 75348a733225 9.6.15 landed
- 69c3d519112f 9.5.19 landed
- 19f9a5aed9a7 9.4.24 landed
-
Install dependencies to prevent dropping partition key columns.
- a0555ddab9b6 13.0 landed
- 79e573fa4986 12.0 landed
- 6cdefc82ba9d 11.5 landed
- 0e1deaa4c424 10.10 landed