Re: Question on inserting and querying at the same time.

From: Richard Huxton <dev(at)archonet(dot)com>
To: Wei Weng <wweng(at)kencast(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question on inserting and querying at the same time.
Date: 2006-11-08 08:38:34
Message-ID: 4551978A.7080602@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Wei Weng wrote:
> I have a database table that has about 90k entries, they are all
> straightfoward text, and there is only one ID field that I use as
> primary key for this table.
>
> I have two threads working on this table. One of them inserting new
> content constantly, (about every second) another one idles and only
> wakes up when I want to query(select) the table.
>
> My problem is that from the log it seems to me that since the insertion
> is done far frequently than query, the query thread never finishes its
> job. It just hangs there for a long time until I kill it by restarting
> postgresql. (Even statements like EXPLAIN ANALYZE will hang)

Define "threads". If you mean a threaded client application, are you
sure your libpq was compiled with threading enabled?

Define "hangs" please. What do the logs show?

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2006-11-08 08:42:02 Re: FOR ... IN
Previous Message Desmond Coughlan 2006-11-08 08:33:34 RE : Re: RE : Re: first steps in PhP and PostgreSQL