>> 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