Remove all traces of tuplestore_donestoring() in the C code
authorMichael Paquier <michael@paquier.xyz>
Thu, 17 Feb 2022 00:52:02 +0000 (09:52 +0900)
committerMichael Paquier <michael@paquier.xyz>
Thu, 17 Feb 2022 00:52:02 +0000 (09:52 +0900)
commitd61a361d1aef1231db61162d99b635b89c73169d
tree87cdc9beef527e6ff005748e5ef7029cfd302cce
parent46208923446651a58c49115d17b4de6da4934c71
Remove all traces of tuplestore_donestoring() in the C code

This routine is a no-op since dd04e95 from 2003, with a macro kept
around for compatibility purposes.  This has led to the same code
patterns being copy-pasted around for no effect, sometimes in confusing
ways like in pg_logical_slot_get_changes_guts() from logical.c where the
code was actually incorrect.

This issue has been discussed on two different threads recently, so
rather than living with this legacy, remove any uses of this routine in
the C code to simplify things.  The compatibility macro is kept to avoid
breaking any out-of-core modules that depend on it.

Reported-by: Tatsuhito Kasahara, Justin Pryzby
Author: Tatsuhito Kasahara
Discussion: https://postgr.es/m/20211217200419.GQ17618@telsasoft.com
Discussion: https://postgr.es/m/CAP0=ZVJeeYfAeRfmzqAF2Lumdiv4S4FewyBnZd4DPTrsSQKJKw@mail.gmail.com
24 files changed:
contrib/dblink/dblink.c
contrib/pageinspect/brinfuncs.c
contrib/pg_stat_statements/pg_stat_statements.c
contrib/postgres_fdw/connection.c
contrib/tablefunc/tablefunc.c
contrib/xml2/xpath.c
src/backend/access/transam/xlogfuncs.c
src/backend/commands/event_trigger.c
src/backend/commands/extension.c
src/backend/commands/prepare.c
src/backend/foreign/foreign.c
src/backend/replication/logical/launcher.c
src/backend/replication/logical/logicalfuncs.c
src/backend/replication/logical/origin.c
src/backend/replication/slotfuncs.c
src/backend/replication/walsender.c
src/backend/storage/ipc/shmem.c
src/backend/utils/adt/mcxtfuncs.c
src/backend/utils/adt/pgstatfuncs.c
src/backend/utils/adt/varlena.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/pg_config.c
src/backend/utils/mmgr/portalmem.c
src/include/utils/tuplestore.h