Small and unaffected typo in pg_logical_slot_get_changes_guts() - Mailing list pgsql-hackers

From Kasahara Tatsuhito
Subject Small and unaffected typo in pg_logical_slot_get_changes_guts()
Date
Msg-id CAP0=ZVJeeYfAeRfmzqAF2Lumdiv4S4FewyBnZd4DPTrsSQKJKw@mail.gmail.com
Whole thread Raw
Responses Re: Small and unaffected typo in pg_logical_slot_get_changes_guts()  (Michael Paquier <michael@paquier.xyz>)
Re: Small and unaffected typo in pg_logical_slot_get_changes_guts()  (Justin Pryzby <pryzby@telsasoft.com>)
List 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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: adding 'zstd' as a compression algorithm
Next
From: Michael Paquier
Date:
Subject: Re: adding 'zstd' as a compression algorithm