On Fri, Aug 6, 2010 at 12:28 PM, Burgholzer, Robert (DEQ)
<Robert.Burgholzer@deq.virginia.gov> wrote:
> I am trying to get my head around what causes catalog corruption. I
> have posted before with regard to recovering from corruptions (if that
> is what indeed happened to me), and was given much help.
>
> Does anyone know why a database catalog will get corrupted? As I
> mentioned previously, my db involves considerable use of temporary
> tables created by php-psql connections. Other than that, I don't know
> of too much that is "odd" about my use (misuse) of the database.
Two most common causes are bad memory / hard drives / cpu and a
machine that doesn't fsync properly crashing and losing part of a
write to the disks.
memtest86+ will give you an idea if your hardware (cpu / mem) are
stable and reliable. SMART can tell you if your hard drives are
acting up. pgbench can tell you if your system is lying about fsync
(a single SATA drive shouldn't be able to do more than a few hundred
tps).