Re: Exclude pg_largeobject form pg_dump

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: amul sul <sulamul(at)gmail(dot)com>
Cc: Andreas Joseph Krogh <andreas(at)visena(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Exclude pg_largeobject form pg_dump
Date: 2016-11-07 21:01:41
Message-ID: CAECtzeU2KuxHejbU0o91uOfBQ+MvCz3Jauri0UHOaXo0k3xVkA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

2016-11-07 7:06 GMT+01:00 amul sul <sulamul(at)gmail(dot)com>:

> On Mon, Nov 7, 2016 at 2:03 AM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info> wrote:
> >>
> >> Agreed. I was afraid of that, but for some reason, didn't find that.
> I'll
> >> fix this.
> >
> >
> > Fixed in v4.
> >
>
> This fix is broken.
>
> 70 - if (dopt.include_everything && !dopt.schemaOnly)
> 71 + if (dopt.include_everything && !dopt.schemaOnly &&
> !dopt.outputBlobs)
> 72 dopt.outputBlobs = true;
>
> dopt.outputBlobs set to FALSE when option -B is specified and this IF
> condition reverts to TRUE which force to dump blobs.
>
>
I don't see what you mean. It forces dump of Blobs if we didn't use -B and
if we include everything in the dump, which seems good to me. What did you
try that didn't work as expected?

>>
> >>
> >>>
> >>> #2 :
> >>> We should add note for default behaviour if --no-blobs & --blobs both
> >>> are specified.
> >>>
> >>
> >> Right. I don't know how I will handle this, but you're right that the
> >> behaviour should be specified. I'll also fix this.
> >>
> >
> > I checked other options, such as --format, and there's nothing noted as a
> > default behaviour. Last one wins, which is what this patch does.
> >
>
> Such note exists for --table & --exclude-table option, see following
> lines in pg_dump.sgml
>
> 569 <para>
> 570 When both <option>-t</> and <option>-T</> are given, the
> behavior
> 571 is to dump just the tables that match at least one
> <option>-t</>
> 572 switch but no <option>-T</> switches. If <option>-T</>
> appears
> 573 without <option>-t</>, then tables matching <option>-T</> are
> 574 excluded from what is otherwise a normal dump.
> 575 </para>
> 576 </listitem>
>
>
You're right on this. v5 fixes this.

--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com

Attachment Content-Type Size
noblobs_v5.patch text/x-patch 3.2 KB

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Joseph Krogh 2016-11-08 00:06:47 Re: Exclude pg_largeobject form pg_dump
Previous Message Andy Colson 2016-11-07 20:01:11 Re: Abscence of synonym

Browse pgsql-hackers by date

  From Date Subject
Next Message MauMau 2016-11-07 21:47:52 Re: Re: BUG #13755: pgwin32_is_service not checking if SECURITY_SERVICE_SID is disabled
Previous Message Tom Lane 2016-11-07 20:53:42 Re: Let's get rid of SPI_push/SPI_pop