Re: Segfault when restoring -Fd dump on current HEAD

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Justin Pryzby <pryzby(at)telsasoft(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Hubert Lubaczewski <depesz(at)depesz(dot)com>, pgsql-hackers mailing list <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Segfault when restoring -Fd dump on current HEAD
Date: 2019-02-26 10:47:13
Message-ID: CA+q6zcWUBA9O3LTRLtUWxfymzmcJ0hMbe=Tw23Ox2ZuW6ia+=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Tue, Feb 26, 2019 at 9:13 AM Dmitry Dolgov <9erthalion6(at)gmail(dot)com> wrote:
>
> > On Tue, Feb 26, 2019 at 6:38 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> > Works for me. With a quick read of the code, it seems to me that it
> > is possible to keep compatibility while keeping the simplifications
> > around ArchiveEntry()'s refactoring.
>
> Yes, it should be rather simple, we can e.g. return to the old less consistent
> NULL handling approach something (like in the attached patch), or replace a NULL
> value with an empty string in WriteToc. Give me a moment, I'll check it out. At
> the same time I would suggest to keep replace_line_endings -> sanitize_line,
> since it doesn't break compatibility.

Ok, unfortunately, I don't see any other ways, so the patch from the previous
email is probably the best option (we could also check NULLs in WriteToc, but
it means the same kind of inconsistency, and in this case I guess it's better
to keep NULL handling as it was before).

But I hope it still makes sense to consider more consisten approach here, maybe
with the next dump version bump, if it's going to happen in the foreseeable
future.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2019-02-26 10:58:33 Re: [HACKERS] Block level parallel vacuum
Previous Message Richard Guo 2019-02-26 10:24:36 Re: NOT IN subquery optimization