Re: [PATCH] Fix memory corruption in pg_shdepend.c

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Sven Klemm <sven(at)timescale(dot)com>
Subject: Re: [PATCH] Fix memory corruption in pg_shdepend.c
Date: 2021-10-20 11:47:47
Message-ID: A36C312D-35CA-4F04-8518-F14B023BB133@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 20 Oct 2021, at 12:55, Michael Paquier <michael(at)paquier(dot)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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2021-10-20 11:48:33 Re: lastOverflowedXid does not handle transaction ID wraparound
Previous Message Dilip Kumar 2021-10-20 11:47:02 Re: pgsql: Document XLOG_INCLUDE_XID a little better