pgsql: Fix brin_summarize_new_values() to check index type and ownershi - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix brin_summarize_new_values() to check index type and ownershi
Date
Msg-id E1aCt4h-0005QT-Ff@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix brin_summarize_new_values() to check index type and ownership.

brin_summarize_new_values() did not check that the passed OID was for
an index at all, much less that it was a BRIN index, and would fail in
obscure ways if it wasn't (possibly damaging data first?).  It also
lacked any permissions test; by analogy to VACUUM, we should only allow
the table's owner to summarize.

Noted by Jeff Janes, fix by Michael Paquier and me

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3d2b31e30e2931b3edb5ab9d0eafca13e7bcffe5

Modified Files
--------------
src/backend/access/brin/brin.c     |   42 +++++++++++++++++++++++++++++++++---
src/test/regress/expected/brin.out |   11 ++++++++++
src/test/regress/sql/brin.sql      |    5 +++++
3 files changed, 55 insertions(+), 3 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix brin_summarize_new_values() to check index type and ownershi
Next
From: Tom Lane
Date:
Subject: pgsql: Include typmod when complaining about inherited column type mism