Re: [PATCH] Fix memory corruption in pg_shdepend.c - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: [PATCH] Fix memory corruption in pg_shdepend.c
Date
Msg-id A36C312D-35CA-4F04-8518-F14B023BB133@yesql.se
Whole thread Raw
In response to Re: [PATCH] Fix memory corruption in pg_shdepend.c  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
> On 20 Oct 2021, at 12:55, Michael Paquier <michael@paquier.xyz> wrote:
> 
> On Wed, Oct 20, 2021 at 01:01:31PM +0300, Aleksander Alekseev wrote:
>> I checked the rest of the PostgreSQL code and apparently, it should
>> have been tts_values[Anum_pg_shdepend_FOO - 1].
>> 
>> The patch is attached. The problem was first reported offlist by Sven
>> Klemm. Investigated and fixed by me.
> 
> Yes, that's indeed a one-off bug when copying shared dependencies of a
> template database to the new one.  This is new as of e3931d0, so I'll
> take care of that and double-check the area while on.

The attached patch looks correct to me.  Skimming the referenced commit I see
nothing else sticking out.

--
Daniel Gustafsson        https://vmware.com/




pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: pgsql: Document XLOG_INCLUDE_XID a little better
Next
From: Dmitry Dolgov
Date:
Subject: Re: lastOverflowedXid does not handle transaction ID wraparound