Re: Exclude pg_largeobject form pg_dump - Mailing list pgsql-general

From Andreas Joseph Krogh
Subject Re: Exclude pg_largeobject form pg_dump
Date
Msg-id VisenaEmail.2c.f3a091fe0c264347.1584139e60e@tc7-visena
Whole thread Raw
In response to Re: Exclude pg_largeobject form pg_dump  (Guillaume Lelarge <guillaume@lelarge.info>)
Responses Re: Exclude pg_largeobject form pg_dump
List pgsql-general
På mandag 07. november 2016 kl. 22:01:41, skrev Guillaume Lelarge <guillaume@lelarge.info>:
2016-11-07 7:06 GMT+01:00 amul sul <sulamul@gmail.com>:
On Mon, Nov 7, 2016 at 2:03 AM, Guillaume Lelarge
<guillaume@lelarge.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?
 
I guess what he means is that if -B is given, the following code sets dopt.outputBlobs = false
 
+            case 'B':            /* Don't dump blobs */
+                dopt.outputBlobs = false;
+                break;
 
 
Then this IF sets it back to TRUE:
 
+    if (dopt.include_everything && !dopt.schemaOnly && !dopt.outputBlobs)
         dopt.outputBlobs = true;
 
 
...making it impossible to turn off dumping of blobs.
 
--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963

pgsql-general by date:

Previous
From: Guillaume Lelarge
Date:
Subject: Re: Exclude pg_largeobject form pg_dump
Next
From: Michael Paquier
Date:
Subject: Re: checkpoint_timout with no WAL activity