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

Commitf31c149

Browse files
committed
Improve comments for IncrementalMaintenance DML enabling functions.
Move the static functions after the comment and expand the comment.Per complaint from Andres Freund, although using different commenttext.
1 parent149e38e commitf31c149

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

‎src/backend/commands/matview.c

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -816,27 +816,33 @@ refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap)
816816
RelationCacheInvalidateEntry(matviewOid);
817817
}
818818

819-
staticvoid
820-
OpenMatViewIncrementalMaintenance(void)
821-
{
822-
matview_maintenance_depth++;
823-
}
824-
825-
staticvoid
826-
CloseMatViewIncrementalMaintenance(void)
827-
{
828-
matview_maintenance_depth--;
829-
Assert(matview_maintenance_depth >=0);
830-
}
831819

832820
/*
833821
* This should be used to test whether the backend is in a context where it is
834822
* OK to allow DML statements to modify materialized views. We only want to
835823
* allow that for internal code driven by the materialized view definition,
836824
* not for arbitrary user-supplied code.
825+
*
826+
* While the function names reflect the fact that their main intended use is
827+
* incremental maintenance of materialized views (in response to changes to
828+
* the data in referenced relations), they are initially used to allow REFRESH
829+
* without blocking concurrent reads.
837830
*/
838831
bool
839832
MatViewIncrementalMaintenanceIsEnabled(void)
840833
{
841834
returnmatview_maintenance_depth>0;
842835
}
836+
837+
staticvoid
838+
OpenMatViewIncrementalMaintenance(void)
839+
{
840+
matview_maintenance_depth++;
841+
}
842+
843+
staticvoid
844+
CloseMatViewIncrementalMaintenance(void)
845+
{
846+
matview_maintenance_depth--;
847+
Assert(matview_maintenance_depth >=0);
848+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp