Обсуждение: Feature request: pgdump and version number / -i option

Поиск
Список
Период
Сортировка

Feature request: pgdump and version number / -i option

От
Laurent ROCHE
Дата:
Hi,

I am running pgAdmin III 8.1.4 on WinXP on a PG server 8.3.3.

I am trying to backup a single table. When doing right-click on the table and "backup" command, it will fail because pgdump considers there's a mismatch between the server version (8.3.3) and the pgdump version (8.3) version.
I get the following message:
C:\Program Files\pgAdmin III\1.8\pg_dump.exe -h my_server -p 5432 -U postgres -F p -v -f "C:\Projects\table.sql" -t "\"public\".\"my_table\"" my_db
pg_dump: server version: 8.3.3; pg_dump version: 8.3.0
pg_dump: aborting because of version mismatch  (Use the -i option to proceed anyway.)
pg_dump: *** aborted because of error

I realise this is because pgdump is a bit too specific about the version number: for now, the solution is to run the command from the command line with the extra option -i.

But in a future version, could we have an extra option in the backup popup to use the -i option ?

 
Cheers,
L@u
The Computing Froggy


Re: Feature request: pgdump and version number / -i option

От
"Dave Page"
Дата:
On Thu, Jan 8, 2009 at 4:05 PM, Laurent ROCHE <laurent_roche@yahoo.com> wrote:

> But in a future version, could we have an extra option in the backup popup
> to use the -i option ?

This keeps coming back to haunt me in :-(. I've added an option -
hopefully that'll keep everyone happy!

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re: Feature request: pgdump and version number / -i option

От
"Sufficool, Stanley"
Дата:

> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Dave Page
> Sent: Friday, January 09, 2009 1:39 PM
> To: Laurent ROCHE
> Cc: pgAdmin III support
> Subject: Re: [pgadmin-support] Feature request: pgdump and
> version number / -i option
>
>
> On Thu, Jan 8, 2009 at 4:05 PM, Laurent ROCHE
> <laurent_roche@yahoo.com> wrote:
>
> > But in a future version, could we have an extra option in
> the backup
> > popup to use the -i option ?
>
> This keeps coming back to haunt me in :-(. I've added an
> option - hopefully that'll keep everyone happy!

Can we get the database to handle this instead / also?

If pg_dump / pg_restore were libs, could this be called via pl/pgsql
functions instead?
SELECT PG_DUMP(database text,schema text, filename text,
compressiontype text, other options...)SELECT PG_RESTORE(database text,schema text, filename text)

This would not be useable for client side dumps of the database. But in
those cases pg_dump could still be used, or the dump location
exported/shared.

This would also require the dump location to be writeable by the server
process (postgres user).


>
> --
> Dave Page
> EnterpriseDB UK:   http://www.enterprisedb.com
>
> --
> Sent via pgadmin-support mailing list
> (pgadmin-support@postgresql.org) To make changes to your
> subscription: http://www.postgresql.org/mailpref/pgadmin-support
>


Re: Feature request: pgdump and version number / -i option

От
"Dave Page"
Дата:
On Fri, Jan 9, 2009 at 11:16 PM, Sufficool, Stanley
<ssufficool@rov.sbcounty.gov> wrote:
>
> Can we get the database to handle this instead / also?
>
> If pg_dump / pg_restore were libs, could this be called via pl/pgsql
> functions instead?

If it were done in the right way, yes. The topic comes up on
pgsql-hackers every now and again, but I'm not aware that anyone has
worked on it.

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re : Feature request: pgdump and version number / -i option

От
Laurent ROCHE
Дата:
Still in my case (I assume other people too) pl/pgsql functions would not help as I work on a remote server from a workstation: I want the files on my workstation and not on a remote server that I only access for the database !

 
Cheers,
L@u
The Computing Froggy



De : Dave Page <dpage@pgadmin.org>
À : "Sufficool, Stanley" <ssufficool@rov.sbcounty.gov>
Cc : pgAdmin III support <pgadmin-support@postgresql.org>
Envoyé le : Lundi, 12 Janvier 2009, 9h59mn 06s
Objet : Re: [pgadmin-support] Feature request: pgdump and version number / -i option

On Fri, Jan 9, 2009 at 11:16 PM, Sufficool, Stanley
<ssufficool@rov.sbcounty.gov> wrote:
>
> Can we get the database to handle this instead / also?
>
> If pg_dump / pg_restore were libs, could this be called via pl/pgsql
> functions instead?

If it were done in the right way, yes. The topic comes up on
pgsql-hackers every now and again, but I'm not aware that anyone has
worked on it.

--
Dave Page
EnterpriseDB UK:  http://www.enterprisedb.com

--
Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-support

Re: Re : Feature request: pgdump and version number / -i option

От
"Dave Page"
Дата:
On Mon, Jan 12, 2009 at 2:35 PM, Laurent ROCHE <laurent_roche@yahoo.com> wrote:
> Still in my case (I assume other people too) pl/pgsql functions would not
> help as I work on a remote server from a workstation: I want the files on my
> workstation and not on a remote server that I only access for the database !

Presumably we'd be able to stream the output in a similar way to COPY.

In any case, there would have to still be a pg_dump style interface so
it could be used to dump from old server without needing a whole new
server. I would expect any server functions to simply be wrappers
around a llibrary of functions used by pg_dump. Not that this is the
right place or I the right person to be discussing this!!

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com


Re: Re : Feature request: pgdump and version number / -i option

От
"Sufficool, Stanley"
Дата:
If we can get these tools as libraries with exported functions, then
wouldn't just be a matter of some UDF calling the C libraries?

It would be ideal to get this absorbed into the mainline PG development,
but proof that it works and has a userbase would go a long way towards
acceptance.

As I noted in my first post, I am very aware that this could break
client side backups. Your idea of streaming the backup is something I
hadn't considered. If the stream was compressed, then this would
actually reduce backup times at the client!

Should I join and cross post to pg-hackers to bring them into the fray?


> -----Original Message-----
> From: Dave Page [mailto:dpage@pgadmin.org]
> Sent: Monday, January 12, 2009 6:41 AM
> To: Laurent ROCHE
> Cc: Sufficool, Stanley; pgAdmin III support
> Subject: Re: Re : [pgadmin-support] Feature request: pgdump
> and version number / -i option
>
>
> On Mon, Jan 12, 2009 at 2:35 PM, Laurent ROCHE
> <laurent_roche@yahoo.com> wrote:
> > Still in my case (I assume other people too) pl/pgsql
> functions would
> > not help as I work on a remote server from a workstation: I
> want the
> > files on my workstation and not on a remote server that I
> only access
> > for the database !
>
> Presumably we'd be able to stream the output in a similar way to COPY.
>
> In any case, there would have to still be a pg_dump style
> interface so it could be used to dump from old server without
> needing a whole new server. I would expect any server
> functions to simply be wrappers around a llibrary of
> functions used by pg_dump. Not that this is the right place
> or I the right person to be discussing this!!
>
> --
> Dave Page
> EnterpriseDB UK:   http://www.enterprisedb.com
>


Re: Re : Feature request: pgdump and version number / -i option

От
"Dave Page"
Дата:
On Mon, Jan 12, 2009 at 4:36 PM, Sufficool, Stanley
<ssufficool@rov.sbcounty.gov> wrote:
> If we can get these tools as libraries with exported functions, then
> wouldn't just be a matter of some UDF calling the C libraries?

Yes, exactly.

> It would be ideal to get this absorbed into the mainline PG development,
> but proof that it works and has a userbase would go a long way towards
> acceptance.
>
> As I noted in my first post, I am very aware that this could break
> client side backups. Your idea of streaming the backup is something I
> hadn't considered. If the stream was compressed, then this would
> actually reduce backup times at the client!
>
> Should I join and cross post to pg-hackers to bring them into the fray?

Not much point - everyone is working hard on the 8.4 release right now
and unlikely to want to start discussing such a change at the moment.



-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com