]> granicus.if.org Git - postgresql/commit
Fix superuser concurrent refresh of matview owned by another.
authorKevin Grittner <kgrittn@postgresql.org>
Tue, 26 Aug 2014 15:00:42 +0000 (10:00 -0500)
committerKevin Grittner <kgrittn@postgresql.org>
Tue, 26 Aug 2014 15:00:42 +0000 (10:00 -0500)
commit06414c0f68e9f8039c1de40d009f12fa96c49192
tree4be11daf7ad87ceb47117b1086061f4256764554
parent3a3d3f9ec01f1f7333e3bbcd5ba9398fd19ad8d9
Fix superuser concurrent refresh of matview owned by another.

Use SECURITY_LOCAL_USERID_CHANGE while building temporary tables;
only escalate to SECURITY_RESTRICTED_OPERATION while potentially
running user-supplied code.  The more secure mode was preventing
temp table creation.  Add regression tests to cover this problem.

This fixes Bug #11208 reported by Bruno Emanuel de Andrade Silva.

Backpatch to 9.4, where the bug was introduced.
src/backend/commands/matview.c
src/test/regress/expected/matview.out
src/test/regress/sql/matview.sql