"David Azevedo" <davixz@xxxxxxxxx> writes: > 2007-08-16 13:49:43||/labrsangioro/forms/recepcao_temp.php||ERROR: could > not open relation 1663/1491040/1555634: Invalid argument > 2007-08-16 14:12:36||/labrsangioro/forms/recepcao_temp.php||PANIC: could > not open file "pg_xlog/000000010000000000000046" (log file 0, segment 70): > Invalid argument These look pretty bad. Can you confirm whether these files are really missing? Some people have reported strange errors not entirely unlike these being caused by virus firewalls which prevent Postgres from doing file operations it expects to be able to do. Can you disable any virus firewalls on this machine, at least temporarily or as far as local file operations are affected? > i always used nextval to insert autoincrement values, and currval to get the > inserted value. > > after i backup one of the databases and restore ( just it, backup and > restore in the same server ) the curval function stoped to work and i get > the following message: Is this the same server as is getting the errors above? If so then following an error it will try to reconnect to the server which will be a new connection and not have the sequence value set. Are there any other errors in your logs? If there were any other errors earlier it might have prevented your nextval() from getting called. How did you back it up and restore it? Are you referring to pg_dump/pg_restore or some system backup? Can you do \ds on the working and non-working database and compare the results? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match