Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd77ff69

Browse files
committed
pg_dump: Fix ordering
Materialized views refresh should be last.From: Jim Nasby <Jim.Nasby@BlueTreble.com>
1 parent272adf4 commitd77ff69

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

‎src/bin/pg_dump/pg_dump_sort.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ static const char *modulename = gettext_noop("sorter");
2626
* Sort priority for database object types.
2727
* Objects are sorted by type, and within a type by name.
2828
*
29+
* Because materialized views can potentially reference system views,
30+
* DO_REFRESH_MATVIEW should always be the last thing on the list.
31+
*
2932
* NOTE: object-type priorities must match the section assignments made in
3033
* pg_dump.c; that is, PRE_DATA objects must sort before DO_PRE_DATA_BOUNDARY,
3134
* POST_DATA objects must sort after DO_POST_DATA_BOUNDARY, and DATA objects
@@ -70,11 +73,11 @@ static const int dbObjectTypePriority[] =
7073
22,/* DO_PRE_DATA_BOUNDARY */
7174
26,/* DO_POST_DATA_BOUNDARY */
7275
33,/* DO_EVENT_TRIGGER */
73-
34,/* DO_REFRESH_MATVIEW */
74-
35,/* DO_POLICY */
75-
36,/* DO_PUBLICATION */
76-
37,/* DO_PUBLICATION_REL */
77-
38/* DO_SUBSCRIPTION */
76+
38,/* DO_REFRESH_MATVIEW */
77+
34,/* DO_POLICY */
78+
35,/* DO_PUBLICATION */
79+
36,/* DO_PUBLICATION_REL */
80+
37/* DO_SUBSCRIPTION */
7881
};
7982

8083
staticDumpIdpreDataBoundId;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp