Re: Confusing error message with too-large file in pg_basebackup - Mailing list pgsql-bugs

From Guillaume Lelarge
Subject Re: Confusing error message with too-large file in pg_basebackup
Date
Msg-id CAECtzeWnJ3P9nN0US7aWTmBtEX1j+_OYSUMQRaChfgucNfqWQw@mail.gmail.com
Whole thread Raw
In response to Re: Confusing error message with too-large file in pg_basebackup  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Confusing error message with too-large file in pg_basebackup  (Michael Paquier <michael.paquier@gmail.com>)
Re: Confusing error message with too-large file in pg_basebackup  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-bugs
Le 20 nov. 2015 6:26 AM, "Michael Paquier" <michael.paquier@gmail.com> a
=C3=A9crit :
>
> On Fri, Nov 20, 2015 at 1:41 PM, Tom Lane wrote:
> > It's not unreasonable for pg_basebackup to use tar format, because the
> > size limitation should not be an issue for files that are expected to
> > be in a data directory.  Leftover core dump files are unexpected :-(.
> > I wonder if we could put some sort of filter into pg_basebackup so
> > it would skip this sort of thing.
>
> We could try to have some filtering with the core file name for most
> of the main distribution cases, like "core", or "core*", however with
> kernel.core_pattern it is easy to set up on a given system a custom
> core file name format.
>
> Without having to call "file" through system(), another way would be
> to have directly a look at the file type, but this looks
> unmaintainable to me, look for example here in magic/Magdir/ that
> keeps a reference of that. That's quite interesting.
> ftp://ftp.astron.com/pub/file/
> Now there is actually the possibility to call directly "file" in the
> base backup code path as well, and filter the result depending on if
> "core" shows up...

Looking at the file's size is probably a better idea. As far as I know,
PostgreSQL doesn't create files bigger than 1GB, except for log files. I'm
not sure about this but I guess pg_basebackup doesn't ship log files. So,
looking at the size would work.

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Confusing error message with too-large file in pg_basebackup
Next
From: Michael Paquier
Date:
Subject: Re: Confusing error message with too-large file in pg_basebackup