diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-11-15 01:19:49 -0300 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2014-11-15 01:19:49 -0300 |
commit | 85b506bbfc2937c9abdfcce4e01a8feca8e64ee8 (patch) | |
tree | 6525cd42c9bd3dec7e2eadcedc0594e8c113c403 /src/backend/commands/matview.c | |
parent | e4d1e264918f4019c86c807e7c349658f7a10397 (diff) | |
download | postgresql-85b506bbfc2937c9abdfcce4e01a8feca8e64ee8.tar.gz postgresql-85b506bbfc2937c9abdfcce4e01a8feca8e64ee8.zip |
Get rid of SET LOGGED indexes persistence kludge
This removes ATChangeIndexesPersistence() introduced by f41872d0c1239d36
which was too ugly to live for long. Instead, the correct persistence
marking is passed all the way down to reindex_index, so that the
transient relation built to contain the index relfilenode can
get marked correctly right from the start.
Author: Fabrízio de Royes Mello
Review and editorialization by Michael Paquier
and Álvaro Herrera
Diffstat (limited to 'src/backend/commands/matview.c')
-rw-r--r-- | src/backend/commands/matview.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/commands/matview.c b/src/backend/commands/matview.c index 523ba35ba24..b19da4ac63c 100644 --- a/src/backend/commands/matview.c +++ b/src/backend/commands/matview.c @@ -67,7 +67,7 @@ static void mv_GenerateOper(StringInfo buf, Oid opoid); static void refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner, int save_sec_context); -static void refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap); +static void refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap, char relpersistence); static void OpenMatViewIncrementalMaintenance(void); static void CloseMatViewIncrementalMaintenance(void); @@ -303,7 +303,7 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString, Assert(matview_maintenance_depth == old_depth); } else - refresh_by_heap_swap(matviewOid, OIDNewHeap); + refresh_by_heap_swap(matviewOid, OIDNewHeap, relpersistence); /* Roll back any GUC changes */ AtEOXact_GUC(false, save_nestlevel); @@ -759,10 +759,10 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner, * swapping is handled by the called function, so it is not needed here. */ static void -refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap) +refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap, char relpersistence) { finish_heap_swap(matviewOid, OIDNewHeap, false, false, true, true, - RecentXmin, ReadNextMultiXactId()); + RecentXmin, ReadNextMultiXactId(), relpersistence); } |