pg_logical_slot_get_changes_guts() previously assigned InvalidXLogRecPtr to the local variable upto_nchanges, which is of type int32, not XLogRecPtr. While this caused no functional issue since InvalidXLogRecPtr is defined as 0, it was semantically incorrect. This commit fixes the issue by updating pg_logical_slot_get_changes_guts() to set upto_nchanges to 0 instead of InvalidXLogRecPtr. No backpatch is needed, as the previous behavior was harmless. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Steven Niu <niushiji@gmail.com> Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com> Discussion: https://postgr.es/m/CAHGQGwHKHuR5NGnGxU3+ebz7cbC1ZAR=AgG4Bueq==Lj6iX8Sw@mail.gmail.com
PostgreSQL Database Management System
This directory contains the source code distribution of the PostgreSQL database management system.
PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.
Copyright and license information can be found in the file COPYRIGHT.
General documentation about this version of PostgreSQL can be found at https://www.postgresql.org/docs/devel/. In particular, information about building PostgreSQL from the source code can be found at https://www.postgresql.org/docs/devel/installation.html.
The latest version of this software, and related software, may be obtained at https://www.postgresql.org/download/. For more information look at our web site located at https://www.postgresql.org/.