Re: Upper limit arguments of pg_logical_slot_xxx_changes functions accept invalid values

2018-10-01 Thread Michael Paquier
On Tue, Aug 14, 2018 at 10:00:49AM +0900, Masahiko Sawada wrote: > I might be missing something but I think the setting either 0 or > negative values to it solves this problem. Since the upto_nchanges is > int32 we cannot build if somebody reverted > 0ab9d1c4b31622e9176472b4276f3e9831e3d6ba. I don

Re: Upper limit arguments of pg_logical_slot_xxx_changes functions accept invalid values

2018-08-13 Thread Masahiko Sawada
On Sat, Jul 28, 2018 at 2:00 AM, Robert Haas wrote: > On Wed, Jul 11, 2018 at 8:58 PM, Masahiko Sawada > wrote: >> While reading the replication slot codes, I found a wrong assignment >> in pg_logical_slot_get_changes_guts() function as follows. >> >> if (PG_ARGISNULL(2)) >>

Re: Upper limit arguments of pg_logical_slot_xxx_changes functions accept invalid values

2018-07-27 Thread Robert Haas
On Wed, Jul 11, 2018 at 8:58 PM, Masahiko Sawada wrote: > While reading the replication slot codes, I found a wrong assignment > in pg_logical_slot_get_changes_guts() function as follows. > > if (PG_ARGISNULL(2)) >upto_nchanges = InvalidXLogRecPtr; > else >

Re: Upper limit arguments of pg_logical_slot_xxx_changes functions accept invalid values

2018-07-26 Thread Masahiko Sawada
Thank you for comment! On Fri, Jul 27, 2018 at 7:27 AM, Michael Paquier 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

Re: Upper limit arguments of pg_logical_slot_xxx_changes functions accept invalid values

2018-07-26 Thread Michael Paquier
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 specif

Re: Upper limit arguments of pg_logical_slot_xxx_changes functions accept invalid values

2018-07-26 Thread Brian Faherty
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested The error messages are nice, and I think will be a helpful feature. T

Upper limit arguments of pg_logical_slot_xxx_changes functions accept invalid values

2018-07-11 Thread Masahiko Sawada
Hi, While reading the replication slot codes, I found a wrong assignment in pg_logical_slot_get_changes_guts() function as follows. if (PG_ARGISNULL(2)) upto_nchanges = InvalidXLogRecPtr; else upto_nchanges = PG_GETARG_INT32(2); Since the upto_nchan