[Pljava-dev] Question regarding triggers and data visibility

From: JBurtenshaw at cooperstandard(dot)com (Burtenshaw, John J(dot))
To:
Subject: [Pljava-dev] Question regarding triggers and data visibility
Date: 2005-11-11 21:57:32
Message-ID: 75F39425D1954A4380D5C9E1D630CDC903EA9133@C2A007.stratford.auto.cooperintra.ctb
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pljava-dev

Thanks for the quick reply Rakesh. It turns out I was not using
transaction blocks (i.e. allowing "autocommit") so I just tried the
insert statement in a Begin/commit block and it did not make a
difference. Any other ideas as to what could cause this strange
phenomena?

Regards,

John Burtenshaw

________________________________

From: Rakesh Vidyadharan [mailto:rakesh at rakeshv.org]
Sent: Friday, November 11, 2005 4:32 PM
To: Burtenshaw, John J.
Subject: Re: [Pljava-dev] Question regarding triggers and data
visibility

On Nov 11, 2005, at 3:27 PM, Burtenshaw, John J. wrote:

I have created a trigger that notifies a daemon process (via the java
RMI mechanism) that a new record has been inserted into a table. The
problem I am having is that the record is not visible to the daemon
process after it performs a 'select' on the table in question. Further
investigation shows that the new record was successfully inserted into
the table. The strange thing is that if I do a table lock (i.e. 'lock
table') in the trigger method before notifying the daemon the data
becomes visible to the daemon!! I don't like using the lock as I have
had issues with the lock causing random problems. Any ideas as to how I
can make the new data visible?

That sounds like a transaction commit issue to me. If the insert has
not been committed, then another connection will not be able to see the
record.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pgfoundry.org/pipermail/pljava-dev/attachments/20051111/5c51d78a/attachment.html>

Responses

Browse pljava-dev by date

  From Date Subject
Next Message Rakesh Vidyadharan 2005-11-11 22:07:28 [Pljava-dev] Question regarding triggers and data visibility
Previous Message Burtenshaw, John J. 2005-11-11 21:27:20 [Pljava-dev] Question regarding triggers and data visibility