forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitdcb467b
committed
Fix pg_dump handling of extension config tables
Since 9.1, we've provided extensions with a way to denote"configuration" tables- tables created by an extension which the usermay modify. By marking these as "configuration" tables, the extensionis asking for the data in these tables to be pg_dump'd (tables whichare not marked in this way are assumed to be entirely handled duringCREATE EXTENSION and are not included at all in a pg_dump).Unfortunately, pg_dump neglected to consider foreign key relationshipsbetween extension configuration tables and therefore could end uptrying to reload the data in an order which would cause FK violations.This patch teaches pg_dump about these dependencies, so that the datadumped out is done so in the best order possible. Note that there's noway to handle circular dependencies, but those have yet to be seen inthe wild.The release notes for this should include a caution to users thatexisting pg_dump-based backups may be invalid due to this issue. Thedata is all there, but restoring from it will require extracting thedata for the configuration tables and then loading them in the correctorder by hand.Discussed initially back in bug #6738, more recently brought up byGilles Darold, who provided an initial patch which was further reworkedby Michael Paquier. Further modifications and documentation updatesby me.Back-patch to 9.1 where we added the concept of extension configurationtables.1 parent1c96685 commitdcb467b
2 files changed
+90
-1
lines changedLines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
714 | 714 |
| |
715 | 715 |
| |
716 | 716 |
| |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
717 | 728 |
| |
718 | 729 |
| |
719 | 730 |
| |
|
Lines changed: 79 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13739 | 13739 |
| |
13740 | 13740 |
| |
13741 | 13741 |
| |
| 13742 | + | |
| 13743 | + | |
| 13744 | + | |
| 13745 | + | |
| 13746 | + | |
| 13747 | + | |
| 13748 | + | |
| 13749 | + | |
| 13750 | + | |
| 13751 | + | |
| 13752 | + | |
| 13753 | + | |
| 13754 | + | |
| 13755 | + | |
| 13756 | + | |
| 13757 | + | |
| 13758 | + | |
| 13759 | + | |
| 13760 | + | |
| 13761 | + | |
| 13762 | + | |
| 13763 | + | |
| 13764 | + | |
| 13765 | + | |
| 13766 | + | |
| 13767 | + | |
| 13768 | + | |
13742 | 13769 |
| |
13743 | 13770 |
| |
13744 | 13771 |
| |
| |||
13750 | 13777 |
| |
13751 | 13778 |
| |
13752 | 13779 |
| |
13753 |
| - | |
| 13780 | + | |
| 13781 | + | |
| 13782 | + | |
13754 | 13783 |
| |
13755 | 13784 |
| |
13756 | 13785 |
| |
| |||
13929 | 13958 |
| |
13930 | 13959 |
| |
13931 | 13960 |
| |
| 13961 | + | |
| 13962 | + | |
| 13963 | + | |
| 13964 | + | |
| 13965 | + | |
| 13966 | + | |
| 13967 | + | |
| 13968 | + | |
| 13969 | + | |
| 13970 | + | |
| 13971 | + | |
| 13972 | + | |
| 13973 | + | |
| 13974 | + | |
| 13975 | + | |
| 13976 | + | |
| 13977 | + | |
| 13978 | + | |
| 13979 | + | |
| 13980 | + | |
| 13981 | + | |
| 13982 | + | |
| 13983 | + | |
| 13984 | + | |
| 13985 | + | |
| 13986 | + | |
| 13987 | + | |
| 13988 | + | |
| 13989 | + | |
| 13990 | + | |
| 13991 | + | |
| 13992 | + | |
| 13993 | + | |
| 13994 | + | |
| 13995 | + | |
| 13996 | + | |
| 13997 | + | |
| 13998 | + | |
| 13999 | + | |
| 14000 | + | |
| 14001 | + | |
| 14002 | + | |
| 14003 | + | |
| 14004 | + | |
| 14005 | + | |
| 14006 | + | |
| 14007 | + | |
| 14008 | + | |
| 14009 | + | |
13932 | 14010 |
| |
13933 | 14011 |
| |
13934 | 14012 |
| |
|
0 commit comments
Comments
(0)