> There have been a number of index-corruption bugs fixed since 8.1.4 ...
>
> In particular, if it's possible that any of these clients abort before
> committing these insertions, the vacuum race condition bug fixed in
> 8.1.10 is a pretty likely candidate for your problem.
I changed second statement to
INSERT INTO session ('MYCOMPNAME',ipaddress,logintime,loggeduser)
SELECT 'MYCOMPNAME',
inet_client_addr()::CHAR(14),current_timestamp::CHAR(28),CURRENT_USER
WHERE NOT EXISTS (SELECT 1 FROM session WHERE
workplace='MYCOMPNAME')
where MYCOMPNAME is logging-in computer name.
Will this fix the isse or is it better to wait 100 ms and re-try insert?
Andrus.