Re: Backup and restore through JDBC

Поиск
Список
Период
Сортировка
От Tom Dunstan
Тема Re: Backup and restore through JDBC
Дата
Msg-id 451D270B.6040205@tomd.cc
обсуждение исходный текст
Ответ на Re: Backup and restore through JDBC  (Markus Schaber <schabi@logix-tt.com>)
Ответы Re: Backup and restore through JDBC  (Markus Schaber <schabi@logix-tt.com>)
Список pgsql-hackers
Markus Schaber wrote:
> Marlon Petry wrote:
>> But I would need to have installed pg_dump and pg_restore in machine
>> client?
>> Without having installed pg_dump and pg_restore,how I could make
> 
> pg_dump and pg_restore should be runnable (possible with a small shell /
> bash wrapper script) without any "installation", simply having them and
> all neded libs lying in the current directory.

There's probably a case for having static builds of pg_dump and 
pg_restore around for various architectures, if only to help people out 
when they don't have access to a build environment etc. Either a set of 
static binaries on the website, or an easy way to build them from the 
source tree (they could then be copied to the target system).

It strikes me that Marlon hasn't really explained why he wants to use 
JDBC. I assume that your application is Java based, but trust me, 
invoking pg_dump through Runtime.exec() or whatever is going to be much, 
much easier than any of the other things you've suggested, such as 
making a pg_dump API and using JNI to call it. That's just pain city, in 
a bunch of ways.

Do you need to process the dump inside your program in some way? Or do 
you just need to store a dump and restore it later? Why the fascination 
with using an API?

> On a unix box, when you're really crazy, and want to ignore all security
> restrictions, you could even install pg_dump via inetd, and then
> everyone connecting via TCP on the appropriate port gets a dump of the
> database. :-)

Oh, man, my head just exploded reading that. That's taking evil and 
being *creative* with it. :)

Cheers

Tom



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Block B-Tree concept
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Fix IS NULL and IS NOT NULL tests on row-valued