Small and unaffected typo in pg_logical_slot_get_changes_guts()
Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>
From: Kasahara Tatsuhito <kasahara.tatsuhito@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-16T02:27:58Z
Lists: pgsql-hackers
Hi,
I noticed the small typo in pg_logical_slot_get_changes_guts().
======================================
--- a/src/backend/replication/logical/logicalfuncs.c
+++ b/src/backend/replication/logical/logicalfuncs.c
@@ -295,7 +295,7 @@ pg_logical_slot_get_changes_guts(FunctionCallInfo
fcinfo, bool confirm, bool bin
CHECK_FOR_INTERRUPTS();
}
- tuplestore_donestoring(tupstore);
+ tuplestore_donestoring(p->tupstore);
======================================
As above, I think tuplestore_donestoring() should have p->tupstore as
an argument.
Fortunately, tuplestore_donestoring() is defined as ((void) 0) and
does not do anything. Therefore, this typo has no effect
However, it is better to fix the typo or remove the
tuplestore_donestoring() part to avoid confusion.
Since commit dd04e958c8b03c0f0512497651678c7816af3198,
tuplestore_donestoring() seems to be left only for compatibility, so
it looks like it can be removed from the core code, except for the
header (tuplestore.h).
Best regards,
--
Tatsuhito Kasahara
kasahara.tatsuhito _at_ gmail.com
Commits
-
Remove all traces of tuplestore_donestoring() in the C code
- d61a361d1aef 15.0 landed
-
tuplestore_donestoring() isn't needed anymore, but provide a no-op
- dd04e958c8b0 7.4.1 cited