Large journal as psql table. Good idea? Triggering.

From: Bryce Nesbitt <bryce1(at)obviously(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Large journal as psql table. Good idea? Triggering.
Date: 2007-04-23 23:12:13
Message-ID: 462D3D4D.6090308@obviously.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dear Postgres folks;

I'm considering using a postgres table for something that could be done
with a flat file. Is this a good idea?

I have events on a machine "A", which need to be sent by an SMS/Cell
Phone modem that's on a totally different machine "B". Potentially this
is a job for a flat file FIFO.

But I'm thinking that maybe it's a job for a database table. Each new
row would be written with a status (10="new"). And that the modem
process would poll for new rows. Problem is there will be lots of rows,
but only a trivial few will be "new". The huge index file and the
polling seem like a drag on the database, unless there is a way to optimize.

On the good side, this scheme handles building the FIFO and the IPC
(interprocess communication). Is is a good approach, using postgres as
a glorified FIFO? Should the DB on machine "A" or "B"? Is there a way
to trigger or lower the polling overhead (in this application the delay
is user visible). The volume is low (a few messages a minute tops).

Bryce

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Phillip Smith 2007-04-23 23:27:03 Large journal as psql table. Good idea? Triggering.
Previous Message Bart Degryse 2007-04-23 15:09:33 plperlu hash problem