Search Postgresql Archives

Problem with records that disappear.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux