File API cleanup - Mailing list pgsql-hackers

From Peter Eisentraut
Subject File API cleanup
Date
Msg-id 11dda853-bb5b-59ba-a746-e168b1ce4bdb@enterprisedb.com
Whole thread Raw
Responses Re: File API cleanup
Re: File API cleanup
List pgsql-hackers
Here are a couple of patches that clean up the internal File API and 
related things a bit:

0001-Update-types-in-File-API.patch

     Make the argument types of the File API match stdio better:

     - Change the data buffer to void *, from char *.
     - Change FileWrite() data buffer to const on top of that.
     - Change amounts to size_t, from int.

     In passing, change the FilePrefetch() amount argument from int to
     off_t, to match the underlying posix_fadvise().

0002-Remove-unnecessary-casts.patch

     Some code carefully cast all data buffer arguments for
     BufFileWrite() and BufFileRead() to void *, even though the
     arguments are already void * (and AFAICT were never anything else).
     Remove this unnecessary clutter.

(I had initially thought these casts were related to the first patch, 
but as I said the BufFile API never used char * arguments, so this 
turned out to be unrelated, but still weird.)
Attachment

pgsql-hackers by date:

Previous
From: Noah Misch
Date:
Subject: Re: pgsql: Revoke PUBLIC CREATE from public schema, now owned by pg_databas
Next
From: Amit Kapila
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply