From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Steele <david@pgmasters.net>
Cc: Teodor Sigaev <teodor@sigaev.ru>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Exclude unlogged tables from base backups
Date: Sun, 25 Mar 2018 15:22:03 -0400
Message-ID: <3587.1522005723@sss.pgh.pa.us> (raw)
In-Reply-To: <8d57c3ba-d44b-a8eb-7a91-c0b6156240fd@pgmasters.net>
References: <E1ezPKi-00081N-FP@gemulon.postgresql.org>
<14453.1522001792@sss.pgh.pa.us>
<8d57c3ba-d44b-a8eb-7a91-c0b6156240fd@pgmasters.net>
David Steele <david@pgmasters.net> writes:
> On 3/25/18 2:16 PM, Tom Lane wrote:
>> Buildfarm member skink (valgrind) has reported this during its last couple
>> of runs:
> I think skink is using large values for rel oids and that has exposed a
> bug. The strncpy doesn't zero terminate the string if the oid has the
> max number of characters. At least, I was able to reproduce under those
> circumstances.
Actually, that code didn't guarantee zero termination under *any*
circumstances; it only happened to work if the stack contained
zeroes to start with.
> The attached should fix it.
Found this in my inbox right after pushing a fix. I did it slightly
differently, emulating the later rather than earlier calls in reinit.c.
The earlier ones memset the whole target field because they're concerned
about being able to hash it, but we don't need that here, just zero
termination.
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us, david@pgmasters.net, teodor@sigaev.ru
Subject: Re: pgsql: Exclude unlogged tables from base backups
In-Reply-To: <3587.1522005723@sss.pgh.pa.us>
References: <E1ezPKi-00081N-FP@gemulon.postgresql.org> <14453.1522001792@sss.pgh.pa.us> <8d57c3ba-d44b-a8eb-7a91-c0b6156240fd@pgmasters.net> <3587.1522005723@sss.pgh.pa.us>
* 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