Re: File API cleanup
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-02-20T09:52:14Z
Lists: pgsql-hackers
Attachments
- 0001-Update-types-in-smgr-API.patch (text/plain) patch 0001
On 23.12.22 09:33, Peter Eisentraut wrote: > On 01.12.22 09:25, Peter Eisentraut wrote: >> Here are a couple of patches that clean up the internal File API and >> related things a bit: > > Here are two follow-up patches that clean up some stuff related to the > earlier patch set. I suspect these are all historically related. Another patch under this theme. Here, I'm addressing the smgr API, which effectively sits one level above the previously-dealt with "File" API. Specifically, I'm changing the data buffer to void *, from char *, and adding const where appropriate. As you can see in the patch, most callers were unhappy with the previous arrangement and required casts. (I pondered whether "Page" might be the right data type instead, since the writers all write values of that type. But the readers don't read into pages directly. So "Block" seemed more appropriate, and Block is void * (bufmgr.h), so this makes sense.)
Commits
-
Update types in smgr API
- b9f0e54bc955 16.0 landed
-
Add const to BufFileWrite
- faf3750657a8 16.0 landed
-
Remove unnecessary casts
- 5f2f99c9c62d 16.0 landed
- 07c29ca7fe30 16.0 landed
-
Update types in File API
- 2d4f1ba6cfc2 16.0 landed