Lists: | pgsql-generalpgsql-hackers |
---|
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 09:53:39 |
Message-ID: | VisenaEmail.48.49926ea6f91dceb6.15355a48249@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Hi all.
Is there a way to exclude pg_largeobject from pg_dump? -T pg_largeobject
doesn't work. I've tried to exclude tables using OID-datatype also but that
didn't work either.
Thanks.
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 14:43:37 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
On 03/08/2016 01:53 AM, Andreas Joseph Krogh wrote:
> Hi all.
> Is there a way to exclude pg_largeobject from pg_dump? -T pg_largeobject
> doesn't work. I've tried to exclude tables using OID-datatype also but
> that didn't work either.
Well pg_largeobject is a system catalog so pretty sure it cannot be
excluded.
What tables are you trying to exclude with OID?
Do you care about not dumping the pg_largeobject table or not dumping
the data it contains?
> Thanks.
> --
> *Andreas Joseph Krogh*
> CTO / Partner - Visena AS
> Mobile: +47 909 56 963
> andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
> www.visena.com <https://www.visena.com>
> <https://www.visena.com>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 15:04:54 |
Message-ID: | VisenaEmail.52.847ab3115631be66.15356bce8aa@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
På tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>>:
On 03/08/2016 01:53 AM, Andreas Joseph Krogh wrote:
> Hi all.
> Is there a way to exclude pg_largeobject from pg_dump? -T pg_largeobject
> doesn't work. I've tried to exclude tables using OID-datatype also but
> that didn't work either.
Well pg_largeobject is a system catalog so pretty sure it cannot be
excluded.
What tables are you trying to exclude with OID?
Do you care about not dumping the pg_largeobject table or not dumping
the data it contains?
I have several tables with OID-columns and I'd like to dump my DB without any
data in pg_largeobject (> 95% of the space is occupied by data in
pg_largeobject).
I've tried to exclude (using -T) the tables containing OID-columns but
pg_largeobject is still dumped containing the data it seems.
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 15:30:36 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> P tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>>:
> Do you care about not dumping the pg_largeobject table or not dumping
> the data it contains?
>
> I have several tables with OID-columns and I'd like to dump my DB without any
> data in pg_largeobject (> 95% of the space is occupied by data in
> pg_largeobject).
> I've tried to exclude (using -T) the tables containing OID-columns but
> pg_largeobject is still dumped containing the data it seems.
A look at the pg_dump source code says that it skips blobs if any of
-s, -n, -t are used. There's a -b switch to undo that and include
them anyway, but no "inverse -b" to skip them in an otherwise-complete
dump.
So you could do something along the lines of pg_dump -t '*' ...
although this will result in *all* non-schema-named objects being
excluded, I believe, which might be a problem.
regards, tom lane
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 15:46:11 |
Message-ID: | VisenaEmail.55.46e0f617a1742ef3.15356e70f1f@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
På tirsdag 08. mars 2016 kl. 16:30:36, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
<mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> P�� tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>>:
> Do you care about not dumping the pg_largeobject table or not dumping
> the data it contains?
>
> I have several tables with OID-columns and I'd like to dump my DB without
any
> data in pg_largeobject (> 95% of the space is occupied by data in
> pg_largeobject).
> I've tried to exclude (using -T) the tables containing OID-columns but
> pg_largeobject is still dumped containing the data it seems.
A look at the pg_dump source code says that it skips blobs if any of
-s, -n, -t are used. There's a -b switch to undo that and include
them anyway, but no "inverse -b" to skip them in an otherwise-complete
dump.
So you could do something along the lines of pg_dump -t '*' ...
although this will result in *all* non-schema-named objects being
excluded, I believe, which might be a problem.
regards, tom lane
Hm:
pg_dump -v -t '*' > andreak-noblob.dmp
pg_dump: reading extensions
pg_dump: identifying extension members
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: [archiver (db)] query failed: ERROR: permission denied for relation
pg_authid
pg_dump: [archiver (db)] query was: LOCK TABLE pg_catalog.pg_authid IN ACCESS
SHARE MODE
What I'm looking for is "inverse -b" in an otherwise complete dump. Any plans
to add that?
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 15:54:19 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
On 03/08/2016 07:46 AM, Andreas Joseph Krogh wrote:
> På tirsdag 08. mars 2016 kl. 16:30:36, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
>
> Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> > P�� tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
> > adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>>:
> > Do you care about not dumping the pg_largeobject table or not
> dumping
> > the data it contains?
> >
> > I have several tables with OID-columns and I'd like to dump my DB
> without any
> > data in pg_largeobject (> 95% of the space is occupied by data in
> > pg_largeobject).
> > I've tried to exclude (using -T) the tables containing
> OID-columns but
> > pg_largeobject is still dumped containing the data it seems.
>
> A look at the pg_dump source code says that it skips blobs if any of
> -s, -n, -t are used. There's a -b switch to undo that and include
> them anyway, but no "inverse -b" to skip them in an otherwise-complete
> dump.
>
> So you could do something along the lines of pg_dump -t '*' ...
> although this will result in *all* non-schema-named objects being
> excluded, I believe, which might be a problem.
>
> regards, tom lane
>
> Hm:
> pg_dump -v -t '*' > andreak-noblob.dmp
> pg_dump: reading extensions
> pg_dump: identifying extension members
> pg_dump: reading schemas
> pg_dump: reading user-defined tables
> pg_dump: [archiver (db)] query failed: ERROR: permission denied for
> relation pg_authid
Off hand I would say you are running pg_dump as a user that is not a
superuser:
aklaver(at)panda:~> pg_dump -v -d test -U aklaver -t '*'
pg_dump: reading extensions
pg_dump: identifying extension members
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: [archiver (db)] query failed: ERROR: permission denied for
relation pg_authid
pg_dump: [archiver (db)] query was: LOCK TABLE pg_catalog.pg_authid IN
ACCESS SHARE MODE
aklaver(at)panda:~> pg_dump -v -d test -U postgres -t '*'
pg_dump: reading extensions
pg_dump: identifying extension members
pg_dump: reading schemas
pg_dump: reading user-defined tables
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined operator families
pg_dump: reading user-defined text search parsers
pg_dump: reading user-defined text search templates
pg_dump: reading user-defined text search dictionaries
....
> pg_dump: [archiver (db)] query was: LOCK TABLE pg_catalog.pg_authid IN
> ACCESS SHARE MODE
> What I'm looking for is "inverse -b" in an otherwise complete dump. Any
> plans to add that?
> --
> *Andreas Joseph Krogh*
> CTO / Partner - Visena AS
> Mobile: +47 909 56 963
> andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
> www.visena.com <https://www.visena.com>
> <https://www.visena.com>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 15:57:01 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> What I'm looking for is "inverse -b" in an otherwise complete dump. Any plans
> to add that?
[ shrug... ] Nobody ever asked for it before.
regards, tom lane
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 15:58:07 |
Message-ID: | VisenaEmail.57.8131aff25e7bb811.15356f25889@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
På tirsdag 08. mars 2016 kl. 16:54:19, skrev Adrian Klaver <
adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>>:
On 03/08/2016 07:46 AM, Andreas Joseph Krogh wrote:
> På tirsdag 08. mars 2016 kl. 16:30:36, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
>
> Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> > P�� tirsdag 08. mars 2016 kl. 15:43:37, skrev Adrian Klaver <
> > adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>>:
> > Do you care about not dumping the pg_largeobject table or not
> dumping
> > the data it contains?
> >
> > I have several tables with OID-columns and I'd like to dump my DB
> without any
> > data in pg_largeobject (> 95% of the space is occupied by data in
> > pg_largeobject).
> > I've tried to exclude (using -T) the tables containing
> OID-columns but
> > pg_largeobject is still dumped containing the data it seems.
>
> A look at the pg_dump source code says that it skips blobs if any of
> -s, -n, -t are used. There's a -b switch to undo that and include
> them anyway, but no "inverse -b" to skip them in an otherwise-complete
> dump.
>
> So you could do something along the lines of pg_dump -t '*' ...
> although this will result in *all* non-schema-named objects being
> excluded, I believe, which might be a problem.
>
> regards, tom lane
>
> Hm:
> pg_dump -v -t '*' > andreak-noblob.dmp
> pg_dump: reading extensions
> pg_dump: identifying extension members
> pg_dump: reading schemas
> pg_dump: reading user-defined tables
> pg_dump: [archiver (db)] query failed: ERROR: permission denied for
> relation pg_authid
Off hand I would say you are running pg_dump as a user that is not a
superuser:
[snip]
Yes, since when should I not be able to dump a DB (owned by a non-superuser)
as that user?
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 16:02:45 |
Message-ID: | VisenaEmail.58.394f4ff49edcfa56.15356f35d60@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
<mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> What I'm looking for is "inverse -b" in an otherwise complete dump. Any
plans
> to add that?
[ shrug... ] Nobody ever asked for it before.
regards, tom lane
It surely helps testing production-datasets which contain lots of BLOBs where
one wants to dump the production-data into a test-env. We have >1TB databases
containing > 95% blobs so it would help us tremendously to have this option.
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From: | Melvin Davidson <melvin6925(at)gmail(dot)com> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 16:04:15 |
Message-ID: | CANu8FiyWeFxyoDeGhC5D636FuuG40_C5zuSwdii8kc5XzbMk-w@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
On Tue, Mar 8, 2016 at 11:02 AM, Andreas Joseph Krogh <andreas(at)visena(dot)com>
wrote:
> På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>
> Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> > What I'm looking for is "inverse -b" in an otherwise complete dump. Any
> plans
> > to add that?
>
> [ shrug... ] Nobody ever asked for it before.
>
> regards, tom lane
>
>
> It surely helps testing production-datasets which contain lots of BLOBs
> where one wants to dump the production-data into a test-env. We have >1TB
> databases containing > 95% blobs so it would help us tremendously to have
> this option.
>
> --
> *Andreas Joseph Krogh*
> CTO / Partner - Visena AS
> Mobile: +47 909 56 963
> andreas(at)visena(dot)com
> www.visena.com
> <https://www.visena.com>
>
>
Probably you need to redesign the schema.
Move the blobs to a new/separate child table. Then you can exclude them.
--
*Melvin Davidson*
I reserve the right to fantasize. Whether or not you
wish to share my fantasy is entirely up to you.
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 16:10:43 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> P tirsdag 08. mars 2016 kl. 16:54:19, skrev Adrian Klaver <
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>>:
> Off hand I would say you are running pg_dump as a user that is not a
> superuser:
> Yes, since when should I not be able to dump a DB (owned by a non-superuser)
> as that user?
The problem is that -t '*' is being interpreted as matching system
catalogs. You might be able to get somewhere with
pg_dump -t '*' -N pg_catalog ...
Probably we should fix pg_dump so it doesn't try to dump system catalogs
as tables, even if the switches seem to ask it to.
regards, tom lane
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 16:13:55 |
Message-ID: | VisenaEmail.59.1a2f3002c4199902.15357011130@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
På tirsdag 08. mars 2016 kl. 17:10:43, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
<mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> P�� tirsdag 08. mars 2016 kl. 16:54:19, skrev Adrian Klaver <
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>>:
> Off hand I would say you are running pg_dump as a user that is not a
> superuser:
> Yes, since when should I not be able to dump a DB (owned by a non-superuser)
> as that user?
The problem is that -t '*' is being interpreted as matching system
catalogs. You might be able to get somewhere with
pg_dump -t '*' -N pg_catalog ...
Probably we should fix pg_dump so it doesn't try to dump system catalogs
as tables, even if the switches seem to ask it to.
regards, tom lane
That didn't work either:
pg_dump -t '*' -N pg_catalog
pg_dump: [archiver (db)] query failed: ERROR: permission denied for relation
pg_authid
pg_dump: [archiver (db)] query was: LOCK TABLE pg_catalog.pg_authid IN ACCESS
SHARE MODE
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 16:38:04 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
> På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
>
> Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> > What I'm looking for is "inverse -b" in an otherwise complete
> dump. Any plans
> > to add that?
>
> [ shrug... ] Nobody ever asked for it before.
>
> regards, tom lane
>
> It surely helps testing production-datasets which contain lots of BLOBs
> where one wants to dump the production-data into a test-env. We have
> >1TB databases containing > 95% blobs so it would help us tremendously
> to have this option.
I have quite a few customers that would benefit from the ability to not
have blobs present in dumps.
JD
--
Command Prompt, Inc. http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 16:45:14 |
Message-ID: | VisenaEmail.5a.d831768a6ded6753.153571b22ee@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
jd(at)commandprompt(dot)com <mailto:jd(at)commandprompt(dot)com>>:
On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
> På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
>
> Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> > What I'm looking for is "inverse -b" in an otherwise complete
> dump. Any plans
> > to add that?
>
> [ shrug... ] Nobody ever asked for it before.
>
> regards, tom lane
>
> It surely helps testing production-datasets which contain lots of BLOBs
> where one wants to dump the production-data into a test-env. We have
> >1TB databases containing > 95% blobs so it would help us tremendously
> to have this option.
I have quite a few customers that would benefit from the ability to not
have blobs present in dumps.
Great! So how do we proceed to get "--no-blobs" added to pg_dump?
Maybe CommandPrompt and Visena should co-fund development of such an addition,
if it's accepted by -hackers?
We'd be willing to pay for such an addition for the 9.5 branch, as a patch.
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 20:03:01 |
Message-ID: | CAKFQuwbDce8vgTdDz-nwu-ELGOFcq3jjWujZYkt3E+t5Zig2sQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh <andreas(at)visena(dot)com>
wrote:
> På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
> jd(at)commandprompt(dot)com>:
>
> On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
> > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
> > <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
> >
> > Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> > > What I'm looking for is "inverse -b" in an otherwise complete
> > dump. Any plans
> > > to add that?
> >
> > [ shrug... ] Nobody ever asked for it before.
> >
> > regards, tom lane
> >
> > It surely helps testing production-datasets which contain lots of BLOBs
> > where one wants to dump the production-data into a test-env. We have
> > >1TB databases containing > 95% blobs so it would help us tremendously
> > to have this option.
>
> I have quite a few customers that would benefit from the ability to not
> have blobs present in dumps.
>
>
> Great! So how do we proceed to get "--no-blobs" added to pg_dump?
> Maybe CommandPrompt and Visena should co-fund development of such an
> addition, if it's accepted by -hackers?
> We'd be willing to pay for such an addition for the 9.5 branch, as a patch.
>
Unfortunately this doesn't qualify as a bug fix - it is a new feature and
thus is ineligible for inclusion in official 9.5
David J.
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-03-08 20:06:30 |
Message-ID: | VisenaEmail.61.e2e77cebd61cce97.15357d4fbce@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston <
david(dot)g(dot)johnston(at)gmail(dot)com <mailto:david(dot)g(dot)johnston(at)gmail(dot)com>>:
On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh <andreas(at)visena(dot)com
<mailto:andreas(at)visena(dot)com>> wrote:
På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
jd(at)commandprompt(dot)com <mailto:jd(at)commandprompt(dot)com>>:
On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
> På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
<mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>>:
>
> Andreas Joseph Krogh <andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>>
writes:
> > What I'm looking for is "inverse -b" in an otherwise complete
> dump. Any plans
> > to add that?
>
> [ shrug... ] Nobody ever asked for it before.
>
> regards, tom lane
>
> It surely helps testing production-datasets which contain lots of BLOBs
> where one wants to dump the production-data into a test-env. We have
> >1TB databases containing > 95% blobs so it would help us tremendously
> to have this option.
I have quite a few customers that would benefit from the ability to not
have blobs present in dumps.
Great! So how do we proceed to get "--no-blobs" added to pg_dump?
Maybe CommandPrompt and Visena should co-fund development of such an addition,
if it's accepted by -hackers?
We'd be willing to pay for such an addition for the 9.5 branch, as a patch.
Unfortunately this doesn't qualify as a bug fix - it is a new feature and
thus is ineligible for inclusion in official 9.5
David J.
Of course. That's why I mentioned that, if possible, an unofficial patch to
9.5 could be developed, funded partly by Visena (my company). Given that
someone is willing to do this of course.
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-10-23 15:06:57 |
Message-ID: | CAECtzeXCAN2afpiDJAWn+Uh5MYRMHS_c+YCYCCLLR-7D8N2ExQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh <andreas(at)visena(dot)com>:
> På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston <
> david(dot)g(dot)johnston(at)gmail(dot)com>:
>
> On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh <andreas(at)visena(dot)com>
> wrote:
>
>> På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
>> jd(at)commandprompt(dot)com>:
>>
>> On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
>> > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <
>> tgl(at)sss(dot)pgh(dot)pa(dot)us
>> > <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
>> >
>> > Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
>> > > What I'm looking for is "inverse -b" in an otherwise complete
>> > dump. Any plans
>> > > to add that?
>> >
>> > [ shrug... ] Nobody ever asked for it before.
>> >
>> > regards, tom lane
>> >
>> > It surely helps testing production-datasets which contain lots of BLOBs
>> > where one wants to dump the production-data into a test-env. We have
>> > >1TB databases containing > 95% blobs so it would help us tremendously
>> > to have this option.
>>
>> I have quite a few customers that would benefit from the ability to not
>> have blobs present in dumps.
>>
>>
>> Great! So how do we proceed to get "--no-blobs" added to pg_dump?
>> Maybe CommandPrompt and Visena should co-fund development of such an
>> addition, if it's accepted by -hackers?
>> We'd be willing to pay for such an addition for the 9.5 branch, as a
>> patch.
>>
>
> Unfortunately this doesn't qualify as a bug fix - it is a new feature and
> thus is ineligible for inclusion in official 9.5
>
> David J.
>
>
> Of course. That's why I mentioned that, if possible, an unofficial patch
> to 9.5 could be developed, funded partly by Visena (my company). Given that
> someone is willing to do this of course.
>
>
That probably should look like the patch attached. It applies cleanly on
HEAD, and works AFAICT. If this patch seems interesting enough, I'll add it
to the next commit fest (note for myself, update the ref/pg_dump.sgml
documentation file).
For Andreas' information, it also applies on 9.5, though I didn't check if
it worked afterwards.
--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com
Attachment | Content-Type | Size |
---|---|---|
noblobs.patch | text/x-patch | 1.3 KB |
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-10-23 17:15:17 |
Message-ID: | VisenaEmail.21.a63bf9f6ad8a6d62.157f28873f6@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge <
guillaume(at)lelarge(dot)info <mailto:guillaume(at)lelarge(dot)info>>:
2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh <andreas(at)visena(dot)com
<mailto:andreas(at)visena(dot)com>>: På tirsdag 08. mars 2016 kl. 21:03:01, skrev
David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com
<mailto:david(dot)g(dot)johnston(at)gmail(dot)com>>:
On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh <andreas(at)visena(dot)com
<mailto:andreas(at)visena(dot)com>> wrote:
På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
jd(at)commandprompt(dot)com <mailto:jd(at)commandprompt(dot)com>>:
On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
> På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
<mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>>:
>
> Andreas Joseph Krogh <andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>>
writes:
> > What I'm looking for is "inverse -b" in an otherwise complete
> dump. Any plans
> > to add that?
>
> [ shrug... ] Nobody ever asked for it before.
>
> regards, tom lane
>
> It surely helps testing production-datasets which contain lots of BLOBs
> where one wants to dump the production-data into a test-env. We have
> >1TB databases containing > 95% blobs so it would help us tremendously
> to have this option.
I have quite a few customers that would benefit from the ability to not
have blobs present in dumps.
Great! So how do we proceed to get "--no-blobs" added to pg_dump?
Maybe CommandPrompt and Visena should co-fund development of such an addition,
if it's accepted by -hackers?
We'd be willing to pay for such an addition for the 9.5 branch, as a patch.
Unfortunately this doesn't qualify as a bug fix - it is a new feature and
thus is ineligible for inclusion in official 9.5
David J.
Of course. That's why I mentioned that, if possible, an unofficial patch to
9.5 could be developed, funded partly by Visena (my company). Given that
someone is willing to do this of course.
That probably should look like the patch attached. It applies cleanly on HEAD,
and works AFAICT. If this patch seems interesting enough, I'll add it to the
next commit fest (note for myself, update the ref/pg_dump.sgml documentation
file).
For Andreas' information, it also applies on 9.5, though I didn't check if it
worked afterwards.
+1 for adding it to the commitfest.
It's almost scary how simple this patch is and noone ever got around to
implement it.
Thanks, I'll test it on 9.5 soon.
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-10-23 18:37:30 |
Message-ID: | VisenaEmail.23.fecb45d4a097b8be.157f2d48b54@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
På søndag 23. oktober 2016 kl. 19:15:17, skrev Andreas Joseph Krogh <
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>>:
På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge <
guillaume(at)lelarge(dot)info <mailto:guillaume(at)lelarge(dot)info>>:
2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh <andreas(at)visena(dot)com
<mailto:andreas(at)visena(dot)com>>: På tirsdag 08. mars 2016 kl. 21:03:01, skrev
David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com
<mailto:david(dot)g(dot)johnston(at)gmail(dot)com>>:
On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh <andreas(at)visena(dot)com
<mailto:andreas(at)visena(dot)com>> wrote:
På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
jd(at)commandprompt(dot)com <mailto:jd(at)commandprompt(dot)com>>:
On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
> På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us
<mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>
> <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>>:
>
> Andreas Joseph Krogh <andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>>
writes:
> > What I'm looking for is "inverse -b" in an otherwise complete
> dump. Any plans
> > to add that?
>
> [ shrug... ] Nobody ever asked for it before.
>
> regards, tom lane
>
> It surely helps testing production-datasets which contain lots of BLOBs
> where one wants to dump the production-data into a test-env. We have
> >1TB databases containing > 95% blobs so it would help us tremendously
> to have this option.
I have quite a few customers that would benefit from the ability to not
have blobs present in dumps.
Great! So how do we proceed to get "--no-blobs" added to pg_dump?
Maybe CommandPrompt and Visena should co-fund development of such an addition,
if it's accepted by -hackers?
We'd be willing to pay for such an addition for the 9.5 branch, as a patch.
Unfortunately this doesn't qualify as a bug fix - it is a new feature and
thus is ineligible for inclusion in official 9.5
David J.
Of course. That's why I mentioned that, if possible, an unofficial patch to
9.5 could be developed, funded partly by Visena (my company). Given that
someone is willing to do this of course.
That probably should look like the patch attached. It applies cleanly on HEAD,
and works AFAICT. If this patch seems interesting enough, I'll add it to the
next commit fest (note for myself, update the ref/pg_dump.sgml documentation
file).
For Andreas' information, it also applies on 9.5, though I didn't check if it
worked afterwards.
+1 for adding it to the commitfest.
It's almost scary how simple this patch is and noone ever got around to
implement it.
Thanks, I'll test it on 9.5 soon.
It's totally OK for me to use 9.6 (now that it's released) to dump 9.5 DBs, so
I'm all good with this patch, thanks!
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-10-23 18:44:34 |
Message-ID: | CAECtzeV614XQ-9kC9=X6-2oVp7bTeBP9ps6gjvN9tepkYQZ9dg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
2016-10-23 20:37 GMT+02:00 Andreas Joseph Krogh <andreas(at)visena(dot)com>:
> På søndag 23. oktober 2016 kl. 19:15:17, skrev Andreas Joseph Krogh <
> andreas(at)visena(dot)com>:
>
> På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge <
> guillaume(at)lelarge(dot)info>:
>
> 2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh <andreas(at)visena(dot)com>:
>>
>> På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston <
>> david(dot)g(dot)johnston(at)gmail(dot)com>:
>>
>> On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh <andreas(at)visena(dot)com>
>> wrote:
>>
>>> På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
>>> jd(at)commandprompt(dot)com>:
>>>
>>> On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
>>> > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <
>>> tgl(at)sss(dot)pgh(dot)pa(dot)us
>>> > <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
>>> >
>>> > Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
>>> > > What I'm looking for is "inverse -b" in an otherwise complete
>>> > dump. Any plans
>>> > > to add that?
>>> >
>>> > [ shrug... ] Nobody ever asked for it before.
>>> >
>>> > regards, tom lane
>>> >
>>> > It surely helps testing production-datasets which contain lots of BLOBs
>>> > where one wants to dump the production-data into a test-env. We have
>>> > >1TB databases containing > 95% blobs so it would help us tremendously
>>> > to have this option.
>>>
>>> I have quite a few customers that would benefit from the ability to not
>>> have blobs present in dumps.
>>>
>>>
>>> Great! So how do we proceed to get "--no-blobs" added to pg_dump?
>>> Maybe CommandPrompt and Visena should co-fund development of such an
>>> addition, if it's accepted by -hackers?
>>> We'd be willing to pay for such an addition for the 9.5 branch, as a
>>> patch.
>>>
>>
>> Unfortunately this doesn't qualify as a bug fix - it is a new feature
>> and thus is ineligible for inclusion in official 9.5
>>
>> David J.
>>
>>
>> Of course. That's why I mentioned that, if possible, an unofficial patch
>> to 9.5 could be developed, funded partly by Visena (my company). Given that
>> someone is willing to do this of course.
>>
>>
>
> That probably should look like the patch attached. It applies cleanly on
> HEAD, and works AFAICT. If this patch seems interesting enough, I'll add it
> to the next commit fest (note for myself, update the ref/pg_dump.sgml
> documentation file).
>
> For Andreas' information, it also applies on 9.5, though I didn't check if
> it worked afterwards.
>
>
> +1 for adding it to the commitfest.
>
>
>
Done, https://commitfest.postgresql.org/11/833/
It's almost scary how simple this patch is and noone ever got around to
> implement it.
>
>
Nobody had the time (like me, till now) or the motivation.
>
> Thanks, I'll test it on 9.5 soon.
>
>
> It's totally OK for me to use 9.6 (now that it's released) to dump 9.5
> DBs, so I'm all good with this patch, thanks!
>
Remember that, if it gets commited, it'll be for next release (aka 10), and
not 9.6 and earlier.
--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com
From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-10-23 18:49:11 |
Message-ID: | CAECtzeXk+dQHA_10Mp477t=2QvxtbgbRHxoHsHyxg8UpSQGUtg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
2016-10-23 20:44 GMT+02:00 Guillaume Lelarge <guillaume(at)lelarge(dot)info>:
> 2016-10-23 20:37 GMT+02:00 Andreas Joseph Krogh <andreas(at)visena(dot)com>:
>
>> På søndag 23. oktober 2016 kl. 19:15:17, skrev Andreas Joseph Krogh <
>> andreas(at)visena(dot)com>:
>>
>> På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge <
>> guillaume(at)lelarge(dot)info>:
>>
>> 2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh <andreas(at)visena(dot)com>:
>>>
>>> På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston <
>>> david(dot)g(dot)johnston(at)gmail(dot)com>:
>>>
>>> On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh <andreas(at)visena(dot)com
>>> > wrote:
>>>
>>>> På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake <
>>>> jd(at)commandprompt(dot)com>:
>>>>
>>>> On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
>>>> > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane <
>>>> tgl(at)sss(dot)pgh(dot)pa(dot)us
>>>> > <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
>>>> >
>>>> > Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
>>>> > > What I'm looking for is "inverse -b" in an otherwise complete
>>>> > dump. Any plans
>>>> > > to add that?
>>>> >
>>>> > [ shrug... ] Nobody ever asked for it before.
>>>> >
>>>> > regards, tom lane
>>>> >
>>>> > It surely helps testing production-datasets which contain lots of
>>>> BLOBs
>>>> > where one wants to dump the production-data into a test-env. We have
>>>> > >1TB databases containing > 95% blobs so it would help us
>>>> tremendously
>>>> > to have this option.
>>>>
>>>> I have quite a few customers that would benefit from the ability to not
>>>> have blobs present in dumps.
>>>>
>>>>
>>>> Great! So how do we proceed to get "--no-blobs" added to pg_dump?
>>>> Maybe CommandPrompt and Visena should co-fund development of such an
>>>> addition, if it's accepted by -hackers?
>>>> We'd be willing to pay for such an addition for the 9.5 branch, as a
>>>> patch.
>>>>
>>>
>>> Unfortunately this doesn't qualify as a bug fix - it is a new feature
>>> and thus is ineligible for inclusion in official 9.5
>>>
>>> David J.
>>>
>>>
>>> Of course. That's why I mentioned that, if possible, an unofficial patch
>>> to 9.5 could be developed, funded partly by Visena (my company). Given that
>>> someone is willing to do this of course.
>>>
>>>
>>
>> That probably should look like the patch attached. It applies cleanly on
>> HEAD, and works AFAICT. If this patch seems interesting enough, I'll add it
>> to the next commit fest (note for myself, update the ref/pg_dump.sgml
>> documentation file).
>>
>> For Andreas' information, it also applies on 9.5, though I didn't check
>> if it worked afterwards.
>>
>>
>> +1 for adding it to the commitfest.
>>
>>
>>
> Done, https://commitfest.postgresql.org/11/833/
>
> It's almost scary how simple this patch is and noone ever got around to
>> implement it.
>>
>>
> Nobody had the time (like me, till now) or the motivation.
>
>
>>
>> Thanks, I'll test it on 9.5 soon.
>>
>>
>> It's totally OK for me to use 9.6 (now that it's released) to dump 9.5
>> DBs, so I'm all good with this patch, thanks!
>>
>
> Remember that, if it gets commited, it'll be for next release (aka 10),
> and not 9.6 and earlier.
>
>
New patch, this time with the documentation.
--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com
Attachment | Content-Type | Size |
---|---|---|
noblobs_v2.patch | text/x-patch | 1.9 KB |
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-10-23 21:58:45 |
Message-ID: | VisenaEmail.26.f05553e040034f44.157f38c6e90@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
På søndag 23. oktober 2016 kl. 20:44:34, skrev Guillaume Lelarge <
guillaume(at)lelarge(dot)info <mailto:guillaume(at)lelarge(dot)info>>:
[snip]
Remember that, if it gets commited, it'll be for next release (aka 10), and
not 9.6 and earlier.
The patch working for 9.6 is fine for me, but getting this in master is of
course the best.
-- Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
<https://www.visena.com>
From: | amul sul <sulamul(at)gmail(dot)com> |
---|---|
To: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
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-03 07:22:32 |
Message-ID: | CAAJ_b94jrnKuGac0Juqi5WoHnOBz71ennTGNHFP3LLK3DkrioA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Hi Guillaume,
With your v2 patch, -B options working as expected but --no-blobs
options is still unrecognized, this happens is because of you have
forgot to add entry for 'no-blobs' in long_options[] array.
Apart from this concern patch looks good to me. Thanks
Regards,
Amul
The new status of this patch is: Waiting on Author
On Mon, Oct 24, 2016 at 12:19 AM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info> wrote:
> 2016-10-23 20:44 GMT+02:00 Guillaume Lelarge <guillaume(at)lelarge(dot)info>:
>>
>> 2016-10-23 20:37 GMT+02:00 Andreas Joseph Krogh <andreas(at)visena(dot)com>:
>>>
>>> På søndag 23. oktober 2016 kl. 19:15:17, skrev Andreas Joseph Krogh
>>> <andreas(at)visena(dot)com>:
>>>
>>> På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge
>>> <guillaume(at)lelarge(dot)info>:
>>>
>>> 2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh <andreas(at)visena(dot)com>:
>>>>
>>>> På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston
>>>> <david(dot)g(dot)johnston(at)gmail(dot)com>:
>>>>
>>>> On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh
>>>> <andreas(at)visena(dot)com> wrote:
>>>>>
>>>>> På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake
>>>>> <jd(at)commandprompt(dot)com>:
>>>>>
>>>>> On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
>>>>> > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane
>>>>> > <tgl(at)sss(dot)pgh(dot)pa(dot)us
>>>>> > <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
>>>>> >
>>>>> > Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
>>>>> > > What I'm looking for is "inverse -b" in an otherwise complete
>>>>> > dump. Any plans
>>>>> > > to add that?
>>>>> >
>>>>> > [ shrug... ] Nobody ever asked for it before.
>>>>> >
>>>>> > regards, tom lane
>>>>> >
>>>>> > It surely helps testing production-datasets which contain lots of
>>>>> > BLOBs
>>>>> > where one wants to dump the production-data into a test-env. We have
>>>>> > >1TB databases containing > 95% blobs so it would help us
>>>>> > tremendously
>>>>> > to have this option.
>>>>>
>>>>> I have quite a few customers that would benefit from the ability to not
>>>>> have blobs present in dumps.
>>>>>
>>>>>
>>>>> Great! So how do we proceed to get "--no-blobs" added to pg_dump?
>>>>> Maybe CommandPrompt and Visena should co-fund development of such an
>>>>> addition, if it's accepted by -hackers?
>>>>> We'd be willing to pay for such an addition for the 9.5 branch, as a
>>>>> patch.
>>>>
>>>>
>>>> Unfortunately this doesn't qualify as a bug fix - it is a new feature
>>>> and thus is ineligible for inclusion in official 9.5
>>>>
>>>> David J.
>>>>
>>>>
>>>> Of course. That's why I mentioned that, if possible, an unofficial patch
>>>> to 9.5 could be developed, funded partly by Visena (my company). Given that
>>>> someone is willing to do this of course.
>>>>
>>>
>>>
>>> That probably should look like the patch attached. It applies cleanly on
>>> HEAD, and works AFAICT. If this patch seems interesting enough, I'll add it
>>> to the next commit fest (note for myself, update the ref/pg_dump.sgml
>>> documentation file).
>>>
>>> For Andreas' information, it also applies on 9.5, though I didn't check
>>> if it worked afterwards.
>>>
>>>
>>> +1 for adding it to the commitfest.
>>>
>>
>>
>> Done, https://commitfest.postgresql.org/11/833/
>>
>>> It's almost scary how simple this patch is and noone ever got around to
>>> implement it.
>>
>>
>> Nobody had the time (like me, till now) or the motivation.
>>
>>>
>>>
>>> Thanks, I'll test it on 9.5 soon.
>>>
>>>
>>> It's totally OK for me to use 9.6 (now that it's released) to dump 9.5
>>> DBs, so I'm all good with this patch, thanks!
>>
>>
>> Remember that, if it gets commited, it'll be for next release (aka 10),
>> and not 9.6 and earlier.
>>
>
> New patch, this time with the documentation.
>
>
> --
> Guillaume.
> http://blog.guillaume.lelarge.info
> http://www.dalibo.com
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>
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-03 14:01:18 |
Message-ID: | CAECtzeX5H6+5h05BB-0ORdjJuWhb7tY_hDHxZccRiOMpuoAeOg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Hi,
2016-11-03 8:22 GMT+01:00 amul sul <sulamul(at)gmail(dot)com>:
> Hi Guillaume,
>
> With your v2 patch, -B options working as expected but --no-blobs
> options is still unrecognized, this happens is because of you have
> forgot to add entry for 'no-blobs' in long_options[] array.
>
>
You're right. v3 (attached) fixes this.
> Apart from this concern patch looks good to me. Thanks
>
>
Thanks.
> Regards,
> Amul
>
> The new status of this patch is: Waiting on Author
>
> On Mon, Oct 24, 2016 at 12:19 AM, Guillaume Lelarge
> <guillaume(at)lelarge(dot)info> wrote:
> > 2016-10-23 20:44 GMT+02:00 Guillaume Lelarge <guillaume(at)lelarge(dot)info>:
> >>
> >> 2016-10-23 20:37 GMT+02:00 Andreas Joseph Krogh <andreas(at)visena(dot)com>:
> >>>
> >>> På søndag 23. oktober 2016 kl. 19:15:17, skrev Andreas Joseph Krogh
> >>> <andreas(at)visena(dot)com>:
> >>>
> >>> På søndag 23. oktober 2016 kl. 17:06:57, skrev Guillaume Lelarge
> >>> <guillaume(at)lelarge(dot)info>:
> >>>
> >>> 2016-03-08 21:06 GMT+01:00 Andreas Joseph Krogh <andreas(at)visena(dot)com>:
> >>>>
> >>>> På tirsdag 08. mars 2016 kl. 21:03:01, skrev David G. Johnston
> >>>> <david(dot)g(dot)johnston(at)gmail(dot)com>:
> >>>>
> >>>> On Tue, Mar 8, 2016 at 9:45 AM, Andreas Joseph Krogh
> >>>> <andreas(at)visena(dot)com> wrote:
> >>>>>
> >>>>> På tirsdag 08. mars 2016 kl. 17:38:04, skrev Joshua D. Drake
> >>>>> <jd(at)commandprompt(dot)com>:
> >>>>>
> >>>>> On 03/08/2016 08:02 AM, Andreas Joseph Krogh wrote:
> >>>>> > På tirsdag 08. mars 2016 kl. 16:57:01, skrev Tom Lane
> >>>>> > <tgl(at)sss(dot)pgh(dot)pa(dot)us
> >>>>> > <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us>>:
> >>>>> >
> >>>>> > Andreas Joseph Krogh <andreas(at)visena(dot)com> writes:
> >>>>> > > What I'm looking for is "inverse -b" in an otherwise
> complete
> >>>>> > dump. Any plans
> >>>>> > > to add that?
> >>>>> >
> >>>>> > [ shrug... ] Nobody ever asked for it before.
> >>>>> >
> >>>>> > regards, tom lane
> >>>>> >
> >>>>> > It surely helps testing production-datasets which contain lots of
> >>>>> > BLOBs
> >>>>> > where one wants to dump the production-data into a test-env. We
> have
> >>>>> > >1TB databases containing > 95% blobs so it would help us
> >>>>> > tremendously
> >>>>> > to have this option.
> >>>>>
> >>>>> I have quite a few customers that would benefit from the ability to
> not
> >>>>> have blobs present in dumps.
> >>>>>
> >>>>>
> >>>>> Great! So how do we proceed to get "--no-blobs" added to pg_dump?
> >>>>> Maybe CommandPrompt and Visena should co-fund development of such an
> >>>>> addition, if it's accepted by -hackers?
> >>>>> We'd be willing to pay for such an addition for the 9.5 branch, as a
> >>>>> patch.
> >>>>
> >>>>
> >>>> Unfortunately this doesn't qualify as a bug fix - it is a new feature
> >>>> and thus is ineligible for inclusion in official 9.5
> >>>>
> >>>> David J.
> >>>>
> >>>>
> >>>> Of course. That's why I mentioned that, if possible, an unofficial
> patch
> >>>> to 9.5 could be developed, funded partly by Visena (my company).
> Given that
> >>>> someone is willing to do this of course.
> >>>>
> >>>
> >>>
> >>> That probably should look like the patch attached. It applies cleanly
> on
> >>> HEAD, and works AFAICT. If this patch seems interesting enough, I'll
> add it
> >>> to the next commit fest (note for myself, update the ref/pg_dump.sgml
> >>> documentation file).
> >>>
> >>> For Andreas' information, it also applies on 9.5, though I didn't check
> >>> if it worked afterwards.
> >>>
> >>>
> >>> +1 for adding it to the commitfest.
> >>>
> >>
> >>
> >> Done, https://commitfest.postgresql.org/11/833/
> >>
> >>> It's almost scary how simple this patch is and noone ever got around to
> >>> implement it.
> >>
> >>
> >> Nobody had the time (like me, till now) or the motivation.
> >>
> >>>
> >>>
> >>> Thanks, I'll test it on 9.5 soon.
> >>>
> >>>
> >>> It's totally OK for me to use 9.6 (now that it's released) to dump 9.5
> >>> DBs, so I'm all good with this patch, thanks!
> >>
> >>
> >> Remember that, if it gets commited, it'll be for next release (aka 10),
> >> and not 9.6 and earlier.
> >>
> >
> > New patch, this time with the documentation.
> >
> >
>
--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com
Attachment | Content-Type | Size |
---|---|---|
noblobs_v3.patch | text/x-patch | 2.3 KB |
From: | amul sul <sulamul(at)gmail(dot)com> |
---|---|
To: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
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-04 06:52:15 |
Message-ID: | CAAJ_b979qaRa-UyOoeDE7iP0mHa5e3hRDJrXQWm6FHoZvAXEaQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Hi Guillaume,
I found following issues with this patch, sorry missed in previous post:
#1 :
43 @@ -392,6 +393,10 @@ main(int argc, char **argv)
44 dopt.outputBlobs = true;
45 break;
46
47 + case 'B': /* Don't dump blobs */
48 + dopt.include_everything = false;
49 + break;
50 +
Touching dopt.include_everything flag does not seems to be a good idea
for '--no-blobs' option, our intension is to exclude blob only, but
this excluds other dump too (e.g COMMENT ON DATABASE, CREATE
EXTENSION, COMMENT ON EXTENSION, .., etc) that what we don't want,
right?
#2 :
We should add note for default behaviour if --no-blobs & --blobs both
are specified.
Regards,
Amul Sul
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-04 08:35:49 |
Message-ID: | CAECtzeXExEOvuf=XLpdPnyNTK5cOhxmKt8K28HYuynCzsMKQdg@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Hi Amul,
2016-11-04 7:52 GMT+01:00 amul sul <sulamul(at)gmail(dot)com>:
> Hi Guillaume,
>
> I found following issues with this patch, sorry missed in previous post:
>
>
You don't have to be sorry for me doing shitty things :)
> #1 :
> 43 @@ -392,6 +393,10 @@ main(int argc, char **argv)
> 44 dopt.outputBlobs = true;
> 45 break;
> 46
> 47 + case 'B': /* Don't dump blobs */
> 48 + dopt.include_everything = false;
> 49 + break;
> 50 +
>
> Touching dopt.include_everything flag does not seems to be a good idea
> for '--no-blobs' option, our intension is to exclude blob only, but
> this excluds other dump too (e.g COMMENT ON DATABASE, CREATE
> EXTENSION, COMMENT ON EXTENSION, .., etc) that what we don't want,
> right?
>
>
Agreed. I was afraid of that, but for some reason, didn't find that. I'll
fix this.
> #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'll try to work on this today but as I'm in pgconf.eu 2016, it may be only
for tomorrow.
Thank you.
--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com
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-06 20:33:20 |
Message-ID: | CAECtzeWcrQvKCm=DqoaZ8+vUAU7a5k7M0-8Vs6x9CR-sCtvFoA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
2016-11-04 9:35 GMT+01:00 Guillaume Lelarge <guillaume(at)lelarge(dot)info>:
> Hi Amul,
>
> 2016-11-04 7:52 GMT+01:00 amul sul <sulamul(at)gmail(dot)com>:
>
>> Hi Guillaume,
>>
>> I found following issues with this patch, sorry missed in previous post:
>>
>>
> You don't have to be sorry for me doing shitty things :)
>
>
>> #1 :
>> 43 @@ -392,6 +393,10 @@ main(int argc, char **argv)
>> 44 dopt.outputBlobs = true;
>> 45 break;
>> 46
>> 47 + case 'B': /* Don't dump blobs */
>> 48 + dopt.include_everything = false;
>> 49 + break;
>> 50 +
>>
>> Touching dopt.include_everything flag does not seems to be a good idea
>> for '--no-blobs' option, our intension is to exclude blob only, but
>> this excluds other dump too (e.g COMMENT ON DATABASE, CREATE
>> EXTENSION, COMMENT ON EXTENSION, .., etc) that what we don't want,
>> right?
>>
>>
> Agreed. I was afraid of that, but for some reason, didn't find that. I'll
> fix this.
>
Fixed in v4.
>
>
>> #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.
> I'll try to work on this today but as I'm in pgconf.eu 2016, it may be
> only for tomorrow.
>
>
It tooks me more time than expected. v4 attached.
>
--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com
Attachment | Content-Type | Size |
---|---|---|
noblobs_v4.patch | text/x-patch | 3.0 KB |
From: | amul sul <sulamul(at)gmail(dot)com> |
---|---|
To: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
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 06:06:24 |
Message-ID: | CAAJ_b94U9U-oFYGM5036ctoTj8SOEJte7WtPyzDfgTQ0soypnQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
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.
>>
>>
>>>
>>> #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>
Regards,
Amul Sul
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: | Whole Thread | Raw Message | Download mbox | Resend email |
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 |
From: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
---|---|
To: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
Cc: | amul sul <sulamul(at)gmail(dot)com>, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-11-08 00:06:47 |
Message-ID: | VisenaEmail.2c.f3a091fe0c264347.1584139e60e@tc7-visena |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
På mandag 07. november 2016 kl. 22:01:41, skrev Guillaume Lelarge <
guillaume(at)lelarge(dot)info <mailto:guillaume(at)lelarge(dot)info>>:
2016-11-07 7:06 GMT+01:00 amul sul <sulamul(at)gmail(dot)com
<mailto:sulamul(at)gmail(dot)com>>: On Mon, Nov 7, 2016 at 2:03 AM, Guillaume Lelarge
<guillaume(at)lelarge(dot)info <mailto: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?
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
andreas(at)visena(dot)com <mailto:andreas(at)visena(dot)com>
www.visena.com <https://www.visena.com>
From: | amul sul <sulamul(at)gmail(dot)com> |
---|---|
To: | Andreas Joseph Krogh <andreas(at)visena(dot)com> |
Cc: | Guillaume Lelarge <guillaume(at)lelarge(dot)info>, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-11-08 05:01:35 |
Message-ID: | CAAJ_b94f7cGtwH0Gw2Om4Gm8mU2nMqpA1DunfJjv0sVD3WML3g@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
On Tue, Nov 8, 2016 at 5:36 AM, Andreas Joseph Krogh <andreas(at)visena(dot)com> wrote:
>
>
> 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.
>
Yes, thats the reason v4 patch was not as expected.
Regards,
Amul Sul
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-13 21:23:41 |
Message-ID: | CAECtzeXOTXGz9O6EJ=L4wYwARqW31bKo=j_bcDWe3pg5b8-i1w@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
2016-11-08 6:01 GMT+01:00 amul sul <sulamul(at)gmail(dot)com>:
> On Tue, Nov 8, 2016 at 5:36 AM, Andreas Joseph Krogh <andreas(at)visena(dot)com>
> wrote:
> >
> >
> > 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.
> >
>
> Yes, thats the reason v4 patch was not as expected.
>
>
It took me some time but I finally understand.
Behaviour fix in v6.
--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com
Attachment | Content-Type | Size |
---|---|---|
noblobs_v6.patch | text/x-patch | 3.1 KB |
From: | Amul Sul <sulamul(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Cc: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-11-17 06:15:41 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
The following review has been posted through the commitfest application:
make installcheck-world: tested, passed
Implements feature: tested, passed
Spec compliant: not tested
Documentation: tested, passed
Patch v6 looks good to me, passing to committer.
Thanks !
The new status of this patch is: Ready for Committer
From: | Stephen Frost <sfrost(at)snowman(dot)net> |
---|---|
To: | Amul Sul <sulamul(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-11-29 16:12:25 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
Guillaume, Amul,
* Amul Sul (sulamul(at)gmail(dot)com) wrote:
> The following review has been posted through the commitfest application:
> make installcheck-world: tested, passed
> Implements feature: tested, passed
> Spec compliant: not tested
> Documentation: tested, passed
>
> Patch v6 looks good to me, passing to committer.
>
> Thanks !
>
> The new status of this patch is: Ready for Committer
I've pushed this patch. In the future if you are working with the
pg_dump TAP tests and add a new 'run', be sure to update the 'tests' to
indicate which tests should 'like' or 'unlike' that run. If you have
any questions, feel free to ask.
Thanks!
Stephen
From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Amul Sul <sulamul(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Exclude pg_largeobject form pg_dump |
Date: | 2016-11-29 21:31:49 |
Message-ID: | CAECtzeUiB5_PK5pZXOzmY+4aCZmH6Kdsa=n2LkPg52p6CuW=+g@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Lists: | pgsql-general pgsql-hackers |
2016-11-29 17:12 GMT+01:00 Stephen Frost <sfrost(at)snowman(dot)net>:
> Guillaume, Amul,
>
> * Amul Sul (sulamul(at)gmail(dot)com) wrote:
> > The following review has been posted through the commitfest application:
> > make installcheck-world: tested, passed
> > Implements feature: tested, passed
> > Spec compliant: not tested
> > Documentation: tested, passed
> >
> > Patch v6 looks good to me, passing to committer.
> >
> > Thanks !
> >
> > The new status of this patch is: Ready for Committer
>
> I've pushed this patch. In the future if you are working with the
> pg_dump TAP tests and add a new 'run', be sure to update the 'tests' to
> indicate which tests should 'like' or 'unlike' that run. If you have
> any questions, feel free to ask.
>
>
Thank you. And thanks Amul for the review.
--
Guillaume.
http://blog.guillaume.lelarge.info
http://www.dalibo.com