From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> |
Cc: | "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Shouldn't flush dirty buffers at shutdown ? |
Date: | 2000-05-09 14:49:31 |
Message-ID: | 12124.957883771@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Hiroshi Inoue" <Inoue(at)tpf(dot)co(dot)jp> writes:
> if heap data wasn't flushed while corresponding indices
> are written to disk,the indices would point to non-existence
> heap block. It would be the cause of inconsistency after the
> restart of postmaster. Shouldn't there be a mechanism to
> flush dirty buffers at(or before) the shutdown of postmaster ?
Hmm, good point, but that doesn't seem like the right answer.
Suppose the system crashes before we are able to flush the
dirty buffers? I think you have identified a problem that needs
a more general solution: we need to be robust in the case that
an index entry is on disk that points to a tuple that never made
it to disk. We can legitimately assume that the tuple is uncommitted
and ignore the index entry --- we just have to not fail ;-)
Not sure how to do it offhand; maybe some additional checking in the
index fetch code will do?
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2000-05-09 15:02:59 | Re: Commercializing PostgreSQL: What do you thing? |
Previous Message | Hiroshi Inoue | 2000-05-09 14:34:17 | Shouldn't flush dirty buffers at shutdown ? |