]> granicus.if.org Git - postgresql/commit
Fix superuser concurrent refresh of matview owned by another.
authorKevin Grittner <kgrittn@postgresql.org>
Tue, 26 Aug 2014 14:56:26 +0000 (09:56 -0500)
committerKevin Grittner <kgrittn@postgresql.org>
Tue, 26 Aug 2014 14:56:26 +0000 (09:56 -0500)
commita9d0f1cff3fb10151be05be61d24ac9b680c170c
tree01f276e0920702f2990d55334d6196b240c347f1
parent5569d75d6a82f0d11d26404fceb848ae59869126
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