From: | "Bright D(dot)L(dot)" <dl_bright(at)star-quest(dot)com> |
---|---|
To: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: SELECT Query returns empty |
Date: | 2008-07-10 02:05:52 |
Message-ID: | 3A8792D25EF3D84C8479AE65E30BC1B8AF415D@s-rnd-e12.star-stella.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
>> The scenario:
>> There are two separate processes ? one (P1) inserting
(not
>> updating) data to a table at a high rate (around one record in 10ms)
and
>> another (P2) selecting the data from the same table for further
>>processing. P1
>> and P2 use separate connection to the Database and P1 sends a trigger
to >>P2
>> after inserting the data to the PostgreSQL.
>What do you mean with 'P1 sends a TRIGGER to P2'? You can't send a
>TRIGGER to another process.
By 'send a trigger' what I meant was, P1 sends a TCP packet to P2 (It is
the preferred IPC in our application) asking it to start querying for
data.
>> The issue:
>>
>> P2 tries to query the data from the table, and the result set is
>> empty. I modified the logic to send the trigger only after making
sure >>that P1
>> can successfully query the last record it inserted.
>> I would like to know why P1 can retrieve the data from the table
while P2
>> can?t.
>Wild guess (maybe i misunderstand you): You insert the Data with P1
>within a TRANSACTION and you haven't commited this insert. In this
case,
>P2 can't see the uncommited data.
P1 did commit its insertion and verified it by successfully querying the
last inserted data, before sending the TCP packet - the trigger - to P2
From | Date | Subject | |
---|---|---|---|
Next Message | Jamie Deppeler | 2008-07-10 02:14:19 | Re: Making a RPM installer |
Previous Message | Bright D.L. | 2008-07-10 02:00:32 | Re: SELECT Query returns empty |