pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@postgresql.org
Subject: pgsql: Improve index AMs' opclass validation procedures.
Date: Fri, 22 Jan 2016 00:47:25 +0000
Message-ID: <E1aMPsr-0005Ip-KR@gemulon.postgresql.org> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>

Improve index AMs' opclass validation procedures.

The amvalidate functions added in commit 65c5fcd353a859da were on the
crude side.  Improve them in a few ways:

* Perform signature checking for operators and support functions.

* Apply more thorough checks for missing operators and functions,
where possible.

* Instead of reporting problems as ERRORs, report most problems as INFO
messages and make the amvalidate function return FALSE.  This allows
more than one problem to be discovered per run.

* Report object names rather than OIDs, and work a bit harder on making
the messages understandable.

Also, remove a few more opr_sanity regression test queries that are
now superseded by the amvalidate checks.

Branch
------
master

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

Modified Files
--------------
src/backend/access/brin/brin_validate.c  |  260 ++++++++++++++++++++-------
src/backend/access/gin/ginvalidate.c     |  233 ++++++++++++++++++------
src/backend/access/gist/gistvalidate.c   |  241 +++++++++++++++++++------
src/backend/access/hash/hashvalidate.c   |  289 +++++++++++++++++++++++-------
src/backend/access/index/Makefile        |    2 +-
src/backend/access/index/amvalidate.c    |  246 +++++++++++++++++++++++++
src/backend/access/nbtree/nbtvalidate.c  |  274 ++++++++++++++++------------
src/backend/access/spgist/spgvalidate.c  |  211 +++++++++++++++++-----
src/backend/utils/cache/lsyscache.c      |   23 +++
src/include/access/amvalidate.h          |   36 ++++
src/include/utils/lsyscache.h            |    1 +
src/test/regress/expected/opr_sanity.out |  204 +--------------------
src/test/regress/sql/opr_sanity.sql      |  171 +-----------------
13 files changed, 1417 insertions(+), 774 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


view thread (3+ messages)  latest in thread

Message-ID: <E1aMPsr-0005Ip-KR@gemulon.postgresql.org>
Permalink:  ../E1aMPsr-0005Ip-KR@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1aMPsr-0005Ip-KR@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Improve index AMs' opclass validation procedures.
  In-Reply-To: <E1aMPsr-0005Ip-KR@gemulon.postgresql.org>
  References: <E1aMPsr-0005Ip-KR@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox