Re: SELECT Query returns empty

Поиск
Список
Период
Сортировка
От Bright D.L.
Тема Re: SELECT Query returns empty
Дата
Msg-id 3A8792D25EF3D84C8479AE65E30BC1B8AF415D@s-rnd-e12.star-stella.com
обсуждение исходный текст
Ответ на Re: SELECT Query returns empty  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Ответы Re: SELECT Query returns empty  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Bright D.L."
Дата:
Сообщение: Re: SELECT Query returns empty
Следующее
От: Jamie Deppeler
Дата:
Сообщение: Re: Making a RPM installer