Re: delete commands fails silently to delete primary key

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: delete commands fails silently to delete primary key
Date: 2008-11-23 11:34:17
Message-ID: 191DC854409F41DABC041B3B8A91CCF4@andrusnotebook
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2008-11-23 12:50:30 Re: Postgres mail list traffic over time
Previous Message hubert depesz lubaczewski 2008-11-23 11:20:41 Re: date stamp on update?