From: | Neil Conway <neilc(at)samurai(dot)com> |
---|---|
To: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | ReadBuffer() error checking |
Date: | 2004-11-13 08:41:33 |
Message-ID: | 4195C8BD.80601@samurai.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
AFAIK, ReadBuffer() will elog on error, so callers can assume that the
buffer it returns is valid. The vast majority of ReadBuffer() call sites
make this assumption, but some went to the trouble of checking that the
returned buffer was valid and elog'ing if it was not. I've removed the
error checking from the latter since it is dead code.
I thought about adding an assertion (or even a precautionary
elog(ERROR)) to ReadBuffer to verify that the returned buffer is indeed
valid, but I didn't end up doing it. Feel free to raise your hand if you
think this is a good idea.
Barring any objections, I'll apply the attached patch to HEAD tomorrow.
-Neil
Attachment | Content-Type | Size |
---|---|---|
read-buffer-error-cleanup-1.patch | text/plain | 4.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2004-11-13 08:45:36 | Re: PITR docs enhancements |
Previous Message | Robert Treat | 2004-11-13 05:51:37 | Give the TODO list a little more verbose explanation |