From: | Vladimir Kunschikov <kunschikov(at)gmail(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [patch] pg_dump/pg_restore zerror() and strerror() mishap |
Date: | 2017-07-28 18:11:03 |
Message-ID: | CAFWCTZa2o0xM9XFbKOPaWd=urONkCEmFimH9Dao474_q7P2ELg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>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.
Initially I used exactly that function from pg_basebackup.c:
https://github.com/kunschikov/postgres/commit/15e9fda6df51cf17c0b0a4f201ee0f93cf258de9#diff-98e3f8ce5d6e87950dd66e4c8bdedb21R713
It was rewritten for the sake of somewhat exaggerated security.
Version #5 in attachment.
--
Regards,
Vladimir Kunschikov
Attachment | Content-Type | Size |
---|---|---|
strerror-gzerror-zlib-v5.patch | text/x-patch | 2.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2017-07-28 18:19:13 | Re: [patch] pg_dump/pg_restore zerror() and strerror() mishap |
Previous Message | Tom Lane | 2017-07-28 17:47:09 | Re: segfault in HEAD when too many nested functions call |