Hi,
I am running PostgreSQL 7.0.3 on a linux box.
My application uses java/persistence layer/jdbc which does the following
when inserting a row
1) gets a connection from the pool and gets a new id for the row using
select nextval('sequence');
2) returns the connection to the pool
3) gets another connection from the pool and inserts the data into the
row using the id retrieved in step 1
4) returns the connection to the pool
Recently we have had instances where the postmaster has 'crashed' and it
appears that the sequence numbers were not written to disk
After the postmaster restarts we have instances where there are rows in
the database with id's greater than the current sequence value. The
interesting part is that values are always different by 4?
In other words there is a row with an id 1004 and the sequence is
currently 1000?
We are running with fsync on. One thing that has changed lately is we
are running with quite a few buffers?
Any insight would be appreciated,
Dave