pgsql: pg_plan_advice: Export feedback-related definitions. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: pg_plan_advice: Export feedback-related definitions.
Date
Msg-id E1wCJcs-000o8m-2g@gemulon.postgresql.org
Whole thread
List pgsql-committers
pg_plan_advice: Export feedback-related definitions.

It turns out that our main regression test suite queries tables upon
which concurrent DDL is occurring, which can, rarely, cause
test_plan_advice failures. We're not quite ready to fix that problem
just yet, because we want to gather some more information about how
often it actually happens first. But, our plan is going to require
test_plan_advice to access a few bits of pg_plan_advice that have
been considered internal up until now, so this commit rejiggers
things to expose those bits.

First, test_plan_advice is going to need to be able to interpret
the PGPA_TE_* constants which have been declared in pgpa_trove.h.
The "TE" stands for "trove entry" but that's kind of a silly name;
change the naming to "FB" (for "feedback") and move the declarations
to pg_plan_advice.h, which is a header file that's already installed.
This has the side benefit of making these constants available to any
other extensions that may want to examine plan advice feedback.

Second, test_plan_advice is going to call pgpa_planner_feedback_warning,
so make that function non-static and mark it PGDLLEXPORT.

Discussion: http://postgr.es/m/CA+TgmobOOmmXSJz3e+cjTY-bA1+W0dqVDqzxUBEvGtW62whYGg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c644aca24089ce001c46029f9e2144789ada165b

Modified Files
--------------
contrib/pg_plan_advice/pg_plan_advice.h | 29 ++++++++++++++
contrib/pg_plan_advice/pgpa_planner.c   | 69 ++++++++++++++++-----------------
contrib/pg_plan_advice/pgpa_planner.h   |  3 ++
contrib/pg_plan_advice/pgpa_trove.c     | 17 ++++----
contrib/pg_plan_advice/pgpa_trove.h     | 30 --------------
5 files changed, 75 insertions(+), 73 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: pg_plan_advice: Fix a bug when a subquery is pruned away entirel
Next
From: Robert Haas
Date:
Subject: pgsql: doc: Fix a couple of mistakes in pgplanadvice.sgml