Re: Upper limit arguments of pg_logical_slot_xxx_changes functionsaccept invalid values - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: Upper limit arguments of pg_logical_slot_xxx_changes functionsaccept invalid values
Date
Msg-id CAD21AoBpR_NMTj822c0CywyF_NrTJ_6Y+aAc1iM75p45mR55Kg@mail.gmail.com
Whole thread Raw
In response to Re: Upper limit arguments of pg_logical_slot_xxx_changes functionsaccept invalid values  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Thank you for comment!

On Fri, Jul 27, 2018 at 7:27 AM, Michael Paquier <michael@paquier.xyz> wrote:
> On Thu, Jul 12, 2018 at 09:58:16AM +0900, Masahiko Sawada wrote:
>>   If upto_lsn is non-NULL, decoding will include only those
>> transactions which commit prior to the specified LSN. If upto_nchanges
>> is non-NULL, decoding will stop when the number of rows produced by
>> decoding exceeds the specified value.
>
> It is also possible to interpret a negative value as an equivalent to
> infinite, no?  That's how I read the documentation quote you are adding
> here.

Given the meaning of upto_nchanges I would expect that the "non-NULL"
is a positive value but it's possible to interpret as you mentioned.
Maybe this patch should fix only the code setting InvalidXLogRecPtr to
upto_nchanges.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgbench - very minor bug fix on hash() missing argument
Next
From: David Rowley
Date:
Subject: Re: Speeding up INSERTs and UPDATEs to partitioned tables