pgsql: Fix size check in statext_dependencies_deserialize() - Mailing list pgsql-committers

From Michael Paquier
Subject pgsql: Fix size check in statext_dependencies_deserialize()
Date
Msg-id E1wRO3v-0010pP-2W@gemulon.postgresql.org
Whole thread
List pgsql-committers
Fix size check in statext_dependencies_deserialize()

The check for the minimum expected bytea size of a MVDependencies object
was using SizeOfItem() for its calculation.  This macro uses the number
of attributes in a single dependency.

This minimum size calculation should be based on MinSizeOfItems(), that
computes the minimum expected size as the header plus the
minimally-sized number of dependency items.

Oversight in d08c44f7a4ec.

Author: Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>
Discussion: https://postgr.es/m/4b8d299d-2505-4c30-bf80-0f697410db35@tantorlabs.com
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0b8fa5fd37b193c46a03aa5d2838f2c6af973782

Modified Files
--------------
src/backend/statistics/dependencies.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


pgsql-committers by date:

Previous
From: Álvaro Herrera
Date:
Subject: pgsql: Revert "Allow logical replication snapshots to be database-speci
Next
From: Michael Paquier
Date:
Subject: pgsql: Fix size check in statext_dependencies_deserialize()