[PERFORM] How to use a trigger to write rows to a remote server

2007-07-18 Thread Michael Dengler

Hi All,

I am trying to find out how to use a trigger function on a table to copy any
inserted row to a remote PG server.

ie:

Row X is inserted into TableX in DB1 on server1TableX trigger function
fires and contacts DB2 on server2 and inserts the row into TableY on
server2.

I've looked around and can't see to find this. Essentially I need to know
how to write to a remote DB server from within a trigger function.

This is not replication, I'm not interested in a full blown trigger based
replication solution.

Any Help is greatly appreciated!

Thanks

Mike


Re: [PERFORM] How to use a trigger to write rows to a remote server

2007-07-18 Thread Michael Dengler

Hmm..I was hoping to avoid personal insults

Anyway, Nuts or not...what I am attempting is to simply have row from one
table inserted into another servers DB I don't see it as replication
because:

a) The destination table will have a trigger that modifies the arriving data
to fit its table scheme.
b) It is not critical that the data be synchronous (ie a lost row on the
destination DB is not a big deal)
c) I see as more of a provision of data to the destination DB NOT A
REPLICATION OF DATA.

Essentially the remote server just wants to know when some record arrives at
the source server and wants to know some of the info contained in the new
record.

And yes it may be that I know little about the myriad of problems involved
with replication...but I do know how to carry on a civil, adult
conversationmaybe we can have a knowledge exchange.

Cheers

Mike



On 7/18/07, Tom Lane [EMAIL PROTECTED] wrote:


Michael Dengler [EMAIL PROTECTED] writes:
 I am trying to find out how to use a trigger function on a table to copy
any
 inserted row to a remote PG server.
 ...
 This is not replication, I'm not interested in a full blown trigger
based
 replication solution.

To be blunt, you're nuts.  You *are* building a trigger based
replication system, and the fact that you think you can cut corners
just shows how little you know about the problems involved.





Use Slony, or some other solution that someone else has already gotten

the bugs out of.

regards, tom lane



[PERFORM] WAL shipping and ever expanding pg_xlog

2007-06-13 Thread Michael Dengler

Hi,

I'm doing WAL shipping to do a warm standby system (8.2.4).

The problem is that the pg_xlog dir on the master just gets bigger and
bigger (never seems to truncate) and the corresponding archive directory on
the slave also gets bigger and bigger. Is there a way to moderate this?

Thanks

Mike


Re: [PERFORM] WAL shipping and ever expanding pg_xlog

2007-06-13 Thread Michael Dengler

OKit looks like the slave machine has run out of space and that caused
the xlog files to pile up on the master.

Still...how do I prevent such all of the shipped WAL segments from remaining
on the slave machine? Do I need to retain every single one? Can they be
safely removed after the slave machine has restored the particular segment?

Thanks

Mike


On 6/13/07, Michael Dengler [EMAIL PROTECTED] wrote:


Hi,

I'm doing WAL shipping to do a warm standby system (8.2.4).

The problem is that the pg_xlog dir on the master just gets bigger and
bigger (never seems to truncate) and the corresponding archive directory on
the slave also gets bigger and bigger. Is there a way to moderate this?

Thanks

Mike




Re: [PERFORM] WAL shipping and ever expanding pg_xlog

2007-06-13 Thread Michael Dengler

Doug Knight just informed me about the pg_standby module.

Works like a charm!

Thanks

Mike


On 6/13/07, Merlin Moncure [EMAIL PROTECTED] wrote:


On 6/13/07, Michael Dengler [EMAIL PROTECTED] wrote:
 OKit looks like the slave machine has run out of space and that
caused
 the xlog files to pile up on the master.

 Still...how do I prevent such all of the shipped WAL segments from
remaining
 on the slave machine? Do I need to retain every single one? Can they be
 safely removed after the slave machine has restored the particular
segment?

Are you using the pg_standy utility?  It has options to control this...

merlin



[PERFORM] how to output column names

2007-04-19 Thread Michael Dengler

Hi,

Is there a query I can perform (perhaps on a system table) to return all of
the column names  (ONLY the column names) for a given DB? (I seem to
remember doing this before but cant remember how)

Thanks

Mike


Re: [PERFORM] how to output column names

2007-04-19 Thread Michael Dengler

Perfect! thanks for the help!.

Mike


On 4/19/07, Jon Sime [EMAIL PROTECTED] wrote:


Michael Dengler wrote:
 Hi,

 Is there a query I can perform (perhaps on a system table) to return all
 of the column names  (ONLY the column names) for a given DB? (I seem to
 remember doing this before but cant remember how)

 Thanks

 Mike


The 'columns' view in information_schema should do the trick for you.

-Jon

--
Senior Systems Developer
Media Matters for America
http://mediamatters.org/



Re: [PERFORM] Do I need to rebuild php-pgsql for 8.2.3

2007-04-11 Thread Michael Dengler

Hi,

Thanks for the info. One more thingI am in rpm hell. When I try to
# rpm -Uvh postgresql-libs-8.2.3-1PGDG.i686.rpm
I get:
error: Failed dependencies:
   libpq.so.3 is needed by (installed) perl-DBD-Pg-1.31-6.i386
   libpq.so.3 is needed by (installed)
postgresql-python-7.4.13-2.RHEL4.1.i386
   libpq.so.3 is needed by (installed) php-pgsql-4.3.9-3.15.i386
and when I try:
# rpm -ivh compat-postgresql-libs-3-3PGDG.i686.rpm
I get:
error: Failed dependencies:
   postgresql-libs  8.0.2 conflicts with
compat-postgresql-libs-3-3PGDG.i686
gr...
should just force the upgrade (ie. --nodeps)?

Thanks

Mike


On 4/10/07, Devrim GÜNDÜZ [EMAIL PROTECTED] wrote:


Hi,

On Tue, 2007-04-10 at 22:55 +0200, Guillaume Smet wrote:
 See http://developer.postgresql.org/~devrim/rpms/compat/ and choose
 the correct package for your architecture.

... or better, each RHEL4 directory in our FTP site has compat package
(that directory is not up2date now).

Regards,
--
Devrim GÜNDÜZ
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/






Re: [PERFORM] Do I need to rebuild php-pgsql for 8.2.3

2007-04-11 Thread Michael Dengler

Thanks...worked perfectly!

Mike


On 4/11/07, Adam Rich [EMAIL PROTECTED] wrote:


 Here's what I do...

1) Install postgresql-libs from the RHEL source
2) Install compat-postgresql-libs from postgresql.org (install, not
upgrade, use rpm -hiv) use force if necessary
3) Install postgresq-libs from postgresql.org (again, install, not
upgrade, use rpm-hiv) use force if necessary

If done correctly, you'll end up with all 3 client versions:

/usr/lib/libpq.so.3
 /usr/lib/libpq.so.4
 /usr/lib/libpq.so.5



 -Original Message-
*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Michael Dengler
*Sent:* Wednesday, April 11, 2007 12:25 PM
*To:* Devrim GÜNDÜZ
*Cc:* pgsql-performance; Guillaume Smet
*Subject:* Re: [PERFORM] Do I need to rebuild php-pgsql for 8.2.3

Hi,

Thanks for the info. One more thingI am in rpm hell. When I try to
# rpm -Uvh postgresql-libs-8.2.3-1PGDG.i686.rpm
I get:
error: Failed dependencies:
libpq.so.3 is needed by (installed) perl-DBD-Pg-1.31-6.i386
libpq.so.3 is needed by (installed)
postgresql-python-7.4.13-2.RHEL4.1.i386
libpq.so.3 is needed by (installed) php-pgsql-4.3.9-3.15.i386
and when I try:
# rpm -ivh compat-postgresql-libs-3-3PGDG.i686.rpm
I get:
error: Failed dependencies:
postgresql-libs  8.0.2 conflicts with
compat-postgresql-libs-3-3PGDG.i686
gr...
should just force the upgrade (ie. --nodeps)?

Thanks

Mike


On 4/10/07, Devrim GÜNDÜZ [EMAIL PROTECTED] wrote:

 Hi,

 On Tue, 2007-04-10 at 22:55 +0200, Guillaume Smet wrote:
  See 
http://developer.postgresql.org/~devrim/rpms/compat/http://developer.postgresql.org/%7Edevrim/rpms/compat/and
 choose
  the correct package for your architecture.

 ... or better, each RHEL4 directory in our FTP site has compat package
 (that directory is not up2date now).

 Regards,
 --
 Devrim GÜNDÜZ
 PostgreSQL Replication, Consulting, Custom Development, 24x7 support
 Managed Services, Shared and Dedicated Hosting
 Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/







[PERFORM] Do I need to rebuild php-pgsql for 8.2.3

2007-04-10 Thread Michael Dengler

Hi,

I'm using RHEL4 and wondering if I need to upgrade the php and php-pgsql
packages when upgrading from Postgres 7.4.1 to 8.2.3.

Any Help?

Thanks

Mike


[PERFORM] What do the adminpack functions do? (8.2.3)

2007-04-05 Thread Michael Dengler

Hi,

Ive looked through the README in the contrib/adminpack dir but it doesn't
really say what these functions do and how to use them


Any help?

Thanks

miguel


[PERFORM] How to enable jdbc???

2007-03-27 Thread Michael Dengler

Hi,

In postgres 7.4.* I had to pass --with-java to the configure script
for jdbc support.

Does postgres 8.2* include it by default? If not, how do I enable it?

Thanks

Miguel

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq