forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit16e0464
committed
Fix dumping of matviews with indirect dependencies on primary keys.
Commit62215de turns out to have been not quite on-the-mark.When we are forced to postpone dumping of a materialized view intothe dump's post-data section (because it depends on a unique indexthat isn't created till that section), we may also have to postponedumping other matviews that depend on said matview. The previous fixdidn't reliably work for such cases: it'd break the dependency loopsproperly, producing a workable object ordering, but it didn'tnecessarily mark all the matviews as "postponed_def". This led toharmless bleating about "archive items not in correct section order",as reported by Tom Cassidy in bug #15602. Less harmlessly,selective-restore options such as --section might misbehave due tothe matview dump objects not being properly labeled.The right way to fix it is to consider that each pre-data dependencywe break amounts to moving the no-longer-dependent object intopost-data, and hence we should mark that object if it's a matview.Back-patch to all supported versions, since the issue's been theresince matviews were introduced.Discussion:https://postgr.es/m/15602-e895445f73dc450b@postgresql.org1 parente7f1d14 commit16e0464
1 file changed
+17
-9
lines changedLines changed: 17 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| 22 | + | |
| 23 | + | |
22 | 24 |
| |
23 | 25 |
| |
24 | 26 |
| |
| |||
931 | 933 |
| |
932 | 934 |
| |
933 | 935 |
| |
934 |
| - | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
935 | 941 |
| |
936 | 942 |
| |
937 |
| - | |
938 |
| - | |
| 943 | + | |
939 | 944 |
| |
940 | 945 |
| |
941 |
| - | |
942 |
| - | |
943 | 946 |
| |
944 | 947 |
| |
945 |
| - | |
946 |
| - | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
947 | 956 |
| |
948 | 957 |
| |
949 | 958 |
| |
| |||
1125 | 1134 |
| |
1126 | 1135 |
| |
1127 | 1136 |
| |
1128 |
| - | |
1129 |
| - | |
| 1137 | + | |
1130 | 1138 |
| |
1131 | 1139 |
| |
1132 | 1140 |
| |
|
0 commit comments
Comments
(0)