Problem with records that disappear.

From: Condor <condor(at)stz-bg(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Problem with records that disappear.
Date: 2013-01-14 08:15:09
Message-ID: 6ff4bdd3aff41ad7f706bc5e2eba9f03@stz-bg.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

from some time I have a very strange problem with my postgresql 9.2.2
64bit.
I make a few changes with an plp function:

BEGIN
UPDATE table SET X = X where id = aid;
UPDATE table_2 SET Y=Y where id = aid;
IF aid > 0 THEN
SELECT INTO ids id FROM table_3 WHERE x = x;
IF aid IS NULL THEN
INSERT INTO table_3 (id) VALUES (x);
ELSE
UPDATE table_3 SET id = id + 1 WHERE x = X;
END IF;
END IF;
RETURN 200;
END;

When I call the function from php everything it's seems to work,
but some time modify records just disappear. I don't have any ideas for
the moment
what is the problem in my postgresql or in my php code. I'm sure there
was a recording was made.
I run in middle night vacuum, reindex on tables and vacuum analyze;
I check my postgresql logs, but no any errors. I check the php logs,
but no errors.
My vacuum also did not log any error messages. This problem happened
one or two times per month
and I can't track him. Is not happened very often. My question is: Is
there any chance this function
to stay opened or some thing like that and on the night when vacuum is
started to rollback changes ?
Also any other suggestions are welcome.

Cheers,
Hristo C.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John R Pierce 2013-01-14 08:45:55 Re: Problem with records that disappear.
Previous Message Condor 2013-01-14 07:38:01 Re: Linux Distribution Preferences?