Re: SELECT Query returns empty

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: SELECT Query returns empty
Date: 2008-07-09 08:58:07
Message-ID: 20080709085807.GD6426@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

am Wed, dem 09.07.2008, um 16:32:11 +0800 mailte Bright D.L. folgendes:
> 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.

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

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2008-07-09 08:58:26 Re: SELECT Query returns empty
Previous Message Thomas Markus 2008-07-09 08:53:39 Re: SELECT Query returns empty