From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Vladimir Kunschikov <kunschikov@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [patch] pg_dump/pg_restore zerror() and strerror() mishap
Date: Fri, 28 Jul 2017 14:19:13 -0400
Message-ID: <20170728181913.owfihtuye2ki6agv@alvherre.pgsql> (raw)
In-Reply-To: <CAFWCTZa2o0xM9XFbKOPaWd=urONkCEmFimH9Dao474_q7P2ELg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Vladimir Kunschikov wrote:
> >This "maxlen" business and the fallback error message are
> >strange. We have roughly equivalent code in pg_basebackup.c
> >which has been working since 2011
> >Perhaps you can drop the memchr/fallback tricks and adopt the
> >pg_basebackup coding? Or is there a specific reason to have
> >the memchr check?
>
> Ofcourse that tricks can be dropped, function will be much prettier.
> 'Tricks' were made to pass some strict internal tests.
Well, if there are cases which cause zlib to return a message that
causes a crash when printing it or some other problem, then let's use
your version both in this new code and in pg_basebackup. Do these cases
really exist?
> Initially I used exactly that function from pg_basebackup.c:
> https://github.com/kunschikov/postgres/commit/15e9fda6df51cf17c0b0a4f201ee0f93cf258de9#diff-98e3f8ce...
> It was rewritten for the sake of somewhat exaggerated security.
> Version #5 in attachment.
I'd rather have all the security we can get, so before dropping those
protections, let's make sure they are useless.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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-hackers@postgresql.org
Cc: alvherre@2ndquadrant.com, kunschikov@gmail.com
Subject: Re: [patch] pg_dump/pg_restore zerror() and strerror() mishap
In-Reply-To: <20170728181913.owfihtuye2ki6agv@alvherre.pgsql>
* 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