Re: Segfault when restoring -Fd dump on current HEAD

From: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz>, Justin Pryzby <pryzby(at)telsasoft(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-27 09:36:22
Message-ID: CA+q6zcWQN09BSTDFskDkeuHRRHDZCjdy=87qvJHG2XSurCzu8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Tue, Feb 26, 2019 at 11:53 PM Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>
> On 2019-Feb-26, Dmitry Dolgov wrote:
>
> > 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.
>
> Hmm, shouldn't we modify sanitize_line so that it returns strdup(hyphen)
> when input is empty and want_hyphen, too?

Yes, you're right.

> I think it would be better to just put back the .defn = "" (etc) to the
> ArchiveEntry calls.

Then we should do this not only for defn, but for owner and dropStmt too. I can
update the fix patch I've sent before, if it's preferrable approach in this
particular situation. But I hope there are no objections if I'll then submit
the original changes with more consistent null handling separately to make
decision about them more consciously.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dean Rasheed 2019-02-27 09:37:11 Re: BUG #15623: Inconsistent use of default for updatable view
Previous Message Andres Freund 2019-02-27 09:32:31 Re: get_controlfile() can leak fds in the backend