]> granicus.if.org Git - postgresql/commit
Fix brin_summarize_new_values() to check index type and ownership.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 26 Dec 2015 17:56:09 +0000 (12:56 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 26 Dec 2015 17:56:09 +0000 (12:56 -0500)
commit3d2b31e30e2931b3edb5ab9d0eafca13e7bcffe5
tree5dec95112a845024db94f4647531904397e659b7
parent8014c44e8275b2fedfc4740c911577c6f1668b56
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
src/backend/access/brin/brin.c
src/test/regress/expected/brin.out
src/test/regress/sql/brin.sql