pgsql: Fix superuser concurrent refresh of matview owned by another.

From: Kevin Grittner <kgrittn(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix superuser concurrent refresh of matview owned by another.
Date: 2014-08-26 15:05:05
Message-ID: E1XMIIz-0003Ss-9D@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/a9d0f1cff3fb10151be05be61d24ac9b680c170c

Modified Files
--------------
src/backend/commands/matview.c | 93 ++++++++++++++++-----------------
src/test/regress/expected/matview.out | 12 +++++
src/test/regress/sql/matview.sql | 13 +++++
3 files changed, 70 insertions(+), 48 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2014-08-26 19:59:21 pgsql: Fix typo in b34e37bfefbed1bf9396dde18f308d8b96fd176c.
Previous Message Bruce Momjian 2014-08-26 14:08:04 Re: pgsql: pg_upgrade: prevent automatic oid assignment