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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Rearrange explain.c's API so callers need not embed sizeof(Expla
Date: 2015-01-15 18:39:38
Message-ID: E1YBpKU-0001HR-Ml@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

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