All of a sudden, I cannot save any models in my PostgreSQL database in Rails. Retrieving data works fine.
m = Model.find(1)
m.save
=> false
When I switched to another database, it is fine. There is no entry in the Rails log.
What could cause this behavior? Is the database corrupt? Is the disk dying? I tried rebooting but that did not help.
How can you check the integrity of the database (I have pgAdmin III installed)? Do I need to do some maintenance? How to figure out what the problem is?
Working in Ubuntu 11.04, Rails 3.0.7 and PostgreSQL 8.3.
Have you added any validations since that object was created? Try this:
If something was wrong with your PostgreSQL database you’d probably be seeing exceptions and read errors.