- Notifications
You must be signed in to change notification settings - Fork28
Commitb8de846
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 parented1bb25 commitb8de846
1 file changed
+15
-9
lines changedLines changed: 15 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
849 | 849 |
| |
850 | 850 |
| |
851 | 851 |
| |
852 |
| - | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
853 | 857 |
| |
854 | 858 |
| |
855 |
| - | |
856 |
| - | |
| 859 | + | |
857 | 860 |
| |
858 | 861 |
| |
859 |
| - | |
860 |
| - | |
861 | 862 |
| |
862 | 863 |
| |
863 |
| - | |
864 |
| - | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
865 | 872 |
| |
866 | 873 |
| |
867 | 874 |
| |
| |||
1050 | 1057 |
| |
1051 | 1058 |
| |
1052 | 1059 |
| |
1053 |
| - | |
1054 |
| - | |
| 1060 | + | |
1055 | 1061 |
| |
1056 | 1062 |
| |
1057 | 1063 |
| |
|
0 commit comments
Comments
(0)