Re: [SQL NOTIFY Help] sending NOTIFY to the external program - Mailing list pgsql-sql

From
Subject Re: [SQL NOTIFY Help] sending NOTIFY to the external program
Date
Msg-id 47230CE166B64744B0120173E4C2161E0103E6A1@BLR-EC-MBX01.wipro.com
Whole thread Raw
In response to [SQL NOTIFY Help] sending NOTIFY to the external program  (<ramachandra.bhaskaram@wipro.com>)
Responses Re: [SQL NOTIFY Help] sending NOTIFY to the external program  (Richard Huxton <dev@archonet.com>)
Re: [SQL NOTIFY Help] sending NOTIFY to the external program  (Andrew Sullivan <ajs@crankycanuck.ca>)
List pgsql-sql
Yes, our application is supposed to know *immediately* that a change in
the database has occurred since, based on this modified data it is doing
lot of other operations and also, the db transactions are heavy(expected
to be arround 300 tps(transactions per sec)).

I agree that this can be done using some untrusted languages, written to
a file and then the application can look into the file for the modified
date.  But, as far as performance is concerned it will take time for the
application to get the response. The user on the application side might
not be kept in waiting state until this transaction happens.

Thanks in Advance,
Ramachandra B.S.

-----Original Message-----
From: Richard Huxton [mailto:dev@archonet.com]
Sent: Wednesday, January 03, 2007 7:39 PM
To: Ramachandra Bhaskaram (WT01 - IP-Multimedia Carrier & Ent Networks)
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] [SQL NOTIFY Help] sending NOTIFY to the external
program

ramachandra.bhaskaram@wipro.com wrote:
> Hi Richard Huxton,
>
>     Thank you for your kind response.
>
>     Is there not any other way other than record the pkey in a
> "process_these" table and have the application check there.    We want
> to minimise the database transactions to improve the DB performance.
>
>     Can we send the exact data which has been changed using
> db-notify to the application?   So that, the application can continue
> processing the data using the Notify message from the DB.

Not via your database connection.

With one of the untrusted languages (C, pl/perlu pl/pythonu etc) you
could do anything you could make a separate connection / write to a file etc.

Does your application need to know *immediately* that a change in the
database has occurred?

--   Richard Huxton  Archonet Ltd


The information contained in this electronic message and any attachments to this message are intended for the exclusive
useof the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended
recipient,you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy
allcopies of this message and any attachments.  

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for
thepresence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 
www.wipro.com


pgsql-sql by date:

Previous
From: Richard Huxton
Date:
Subject: Re: [SQL NOTIFY Help] sending NOTIFY to the external program
Next
From: Richard Huxton
Date:
Subject: Re: [SQL NOTIFY Help] sending NOTIFY to the external program