pgsql: Rearrange explain.c's API so callers need not embed sizeof(Expla - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Rearrange explain.c's API so callers need not embed sizeof(Expla
Date
Msg-id E1YBpKU-0001HR-Ml@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Rearrange explain.c's API so callers need not embed sizeof(ExplainState).

The folly of the previous arrangement was just demonstrated: there's no
convenient way to add fields to ExplainState without breaking ABI, even
if callers have no need to touch those fields.  Since we might well need
to do that again someday in back branches, let's change things so that
only explain.c has to have sizeof(ExplainState) compiled into it.  This
costs one extra palloc() per EXPLAIN operation, which is surely pretty
negligible.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8e166e164c7c4531d7eb150d836aa2357989237a

Modified Files
--------------
contrib/auto_explain/auto_explain.c |   43 +++++++++++------------
src/backend/commands/explain.c      |   66 +++++++++++++++++------------------
src/include/commands/explain.h      |    2 +-
3 files changed, 55 insertions(+), 56 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Improve performance of EXPLAIN with large range tables.
Next
From: Heikki Linnakangas
Date:
Subject: pgsql: Fix thinko in re-setting wal_log_hints flag from a parameter-cha