Re: RES: Lock Problem

From: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
To: André José Guergolet <AGuergolet(at)compugraf(dot)com(dot)br>
Cc: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, pgsql-sql(at)postgresql(dot)org
Subject: Re: RES: Lock Problem
Date: 2006-08-24 21:19:41
Message-ID: 1156454380.7223.91.camel@state.g2switchworks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, 2006-08-24 at 16:12, André José Guergolet wrote:
> Sorry, I have a table with 360 rows, in this table I control the state of machines on network:
>
>
> Ip State StateDate
> 172.20.0.39 Running 2006-08-23 00:00:00
> 172.20.0.59 Running 2006-08-23 00:00:00
> 172.20.0.72 Running 2006-08-23 00:00:00
> 172.20.0.84 Running 2006-08-23 00:00:00
> 172.20.0.35 Running 2006-08-23 00:00:00
> 172.20.0.17 Running 2006-08-23 00:00:00
> 172.20.0.28 Running 2006-08-23 00:00:00
> 172.20.0.39 Running 2006-08-23 00:00:00
> 172.20.0.14 Running 2006-08-23 00:00:00
> 172.20.0.33 Running 2006-08-23 00:00:00
> 172.20.0.19 Running 2006-08-23 00:00:00
>
> My system, checks if my script is running in each machine at this table, this table has 360 rows and has 50-100 updates per minute in columns STATE and STATEDATE.
>
> I list this states with a webpage. This webpage updates the list every 10 seconds. My page executes only "select * from machinestates".
>
> If I stop the updates, I never get my page stopped at the select command.
>
> I read about "DIRTY Transaction", is it the way?
> I have another solution?

I'm guessing you've got a different problem. Generally speaking, in an
MVCC database like PostgreSQL, readers don't block writers, and writers
don't block readers.

We need more info on how you're doing this. SQL queries for the updates
etc...

Are you vacuuming the database often enough? Is this table suffering
from bloat?

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Phillip Smith 2006-08-24 23:16:46 Re: Importing data from csv
Previous Message André José Guergolet 2006-08-24 21:12:32 RES: Lock Problem