Search Postgresql Archives

Re: Pushing result set to table on different machine?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Tue, 13 Sep 2005, Jerry LeVan wrote:

> Hi,
> I recently added a linux/windows laptop to our home network.
>
> I have started Postgresql (8.0.3) on the laptop and have
> "replicated" my main database on the laptop. (pg_dump,
> ftp and pg-"undump").
>
> I would like to keep them reasonably in sync. Slony is
> overkill and I think the "mirror" contrib is possibly
> overkill also.
>
> I have installed the dblink package and can easily "pull"
> data from my main server back to  the laptop.
>
> Is there a elegant way to "push" the data from the main
> server to the laptop?


I have not tried this with Postgres, but have done similar things with
other databases and related packages.

In the Postgres case, a script on the server which remotely runs a command
on the laptop (ssh/rexec/rsh as you prefer) could run a

copy from table (on the server) | copy to table from stdin (remotely on
the laptop)

Something to empty tables first might help, but any command can be set up
to run on the laptop, but be invoked from the server. Data from a srever
run command can, as above, be piped as input to a command run by the
laptop (but started from/by the server)

I don't know that I'd recommend it, but you may be able to rsynch the
database directory.

Set up the script & run it on the server whenever you want.


Brent Wood

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux