Re: [ patch ] pg_dump: new --custom-fetch-table and --custom-fetch-value parameters

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Andrea Urbani <matfanjol(at)mail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [ patch ] pg_dump: new --custom-fetch-table and --custom-fetch-value parameters
Date: 2016-12-21 17:44:48
Message-ID: 20161221174448.GJ18360@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrea,

* Andrea Urbani (matfanjol(at)mail(dot)com) wrote:
> I had a problem with a Postgresql 9.3.5 on 32 bit linux, old 2.6.26
> kernel:

Ok, though, to be clear, this is a feature request, so we wouldn't
back-patch adding this to pg_dump.

> I have solve it adding two new parameters, --custom-fetch-table and
> --custom-fetch-value, to fetch less records for the specified table(s).

Giving the user the ability to change the fetch size sounds interesting,
though do we really need to specify it per table? What about just a
--fetch-size=X option?

> This does not completely solve the problem, but it helps you to get more
> chance to be able to dump your database.

That is certainly a worthwhile goal.

>     pg_dump --dbname=healthorganizer --username=hor --column-inserts
> --custom-fetch-table='"tDocumentsFiles"' --custom-fetch-value=25

I don't particularly like the use of 'custom' in the name of the option,
seems like it's just a noise word and not really necessary.

> I haven't tested the documentation: too many problems while building it
> (also the original version, without my changes; probably I have bogus
> tools... and too less time to check/try...).
> Attached the patches for the master and REL9_6_STABLE.

I agree the documentation can be a bit of a pain, but there's a lot of
issues with the patch itself when it comes to the project style. The
indentation doesn't look like it's all correct, and multi-line comments
should be of the form:

/*
* text here
*/

Lastly, it'd be good to have this patch added to
https://commitfest.postgresql.org to have it formally reviewed in the
commitfest cycle coming up in January.

Thanks!

Stephen

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joe Conway 2016-12-21 17:49:01 Re: Getting rid of "unknown error" in dblink and postgres_fdw
Previous Message Stephen Frost 2016-12-21 17:34:01 Re: [BUG?] pg_event_trigger_ddl_commands() error with ALTER TEXT SEARCH CONFIGURATION