From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix segmentation fault in MergeInheritedAttribute()
Date: Fri, 03 May 2024 09:15:50 +0000
Message-ID: <E1s2p1B-001HDX-0b@gemulon.postgresql.org> (raw)
Fix segmentation fault in MergeInheritedAttribute()
While converting a pg_attribute tuple into a ColumnDef,
ColumnDef::compression remains NULL if there is no compression method
set fot the attribute. Calling strcmp() with NULL
ColumnDef::compression, when comparing compression methods of parents,
causes segmentation fault in MergeInheritedAttribute(). Skip
comparing compression methods if either of them is NULL.
Author: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Reported-by: Alexander Lakhin <exclusion@gmail.com>
Discussion: https://www.postgresql.org/message-id/b22a6834-aacb-7b18-0424-a3f5fe889667%40gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/8f0a97dfffc5b5f48f609fb894befcdf761dd576
Modified Files
--------------
src/backend/commands/tablecmds.c | 16 ++++++++++------
src/test/regress/expected/compression.out | 10 +++++++---
src/test/regress/sql/compression.sql | 8 +++++---
3 files changed, 22 insertions(+), 12 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix segmentation fault in MergeInheritedAttribute()
In-Reply-To: <E1s2p1B-001HDX-0b@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox