From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Matthew Hagerty <matthew(at)venux(dot)net> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: pg6.4.2 eating records... |
Date: | 2000-06-01 04:51:26 |
Message-ID: | 13236.959835086@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Matthew Hagerty <matthew(at)venux(dot)net> writes:
> I have a question about pg6.4.2, I know it is old but upgrading is not an
> option at this point in time (not my decision). :(
Try to persuade your PHB to reconsider ;-)
> Every night I run the following:
> <sql to drop all indexes>
> vacuum;
> <sql to create all indexes>
> vacuum analyze;
This is a little bizarre, to say the least. It should be
> <sql to drop all indexes>
> vacuum analyze;
> <sql to create all indexes>
There's no point in running two vacuums, and there's even less point
in dropping/recreating indexes around the vacuum only to proceed to
run another vacuum with the indexes in place.
> select a.app_id from applicants as a where a.app_id not in
> (select n.note_id from appnotes as n where n.note_id=a.app_id);
> app_id
> ------
> 27555
> 26446
> 27556
> 1734
> 26502
> 26246
> (6 rows)
Ugh. It would be interesting to see EXPLAIN of this query run just
before and just after the vacuum sequence. If it's failing just
after the nightly vacuum, what makes it start working again by the
time of the next one?
In all honesty, you are not likely to attract a whole lot of interest
in fixing 6.4.* bugs at this late date. My own interest will only
extend as far as making sure the bug is not still there in 7.0...
> What happened? Did vacuum eat them or something? The records are always
> just missing out of the appnotes table.
My guess is the records are still there, but due to some bug the
specific query you are using fails to find them. Postgres has many
faults, but losing data completely isn't usually one of them.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Ross J. Reedstrom | 2000-06-01 05:09:20 | Re: Database names with spaces |
Previous Message | Charlie Hornberger | 2000-06-01 03:34:36 | full-text indexing, locales, triggers, SPI & more fun |