postgresql/src/backend/storage
Thomas Munro cf112c1220 Remove dead pread and pwrite replacement code.
pread() and pwrite() are in SUSv2, and all targeted Unix systems have
them.

Previously, we defined pg_pread and pg_pwrite to emulate these function
with lseek() on old Unixen.  The names with a pg_ prefix were a reminder
of a portability hazard: they might change the current file position.
That hazard is gone, so we can drop the prefixes.

Since the remaining replacement code is Windows-only, move it into
src/port/win32p{read,write}.c, and move the declarations into
src/include/port/win32_port.h.

No need for vestigial HAVE_PREAD, HAVE_PWRITE macros as they were only
used for declarations in port.h which have now moved into win32_port.h.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Greg Stark <stark@mit.edu>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com
2022-08-05 09:49:21 +12:00
..
buffer Convert macros to static inline functions (buf_internals.h) 2022-07-27 13:54:37 -04:00
file Remove dead pread and pwrite replacement code. 2022-08-05 09:49:21 +12:00
freespace Change internal RelFileNode references to RelFileNumber or RelFileLocator. 2022-07-06 11:39:09 -04:00
ipc Fix comment in procarray.c. 2022-07-28 14:56:20 +09:00
large_object Update copyright for 2022 2022-01-07 19:04:57 -05:00
lmgr Add output path arg in generate-lwlocknames.pl 2022-07-18 12:24:32 -07:00
page Convert macros to static inline functions (bufpage.h) 2022-07-11 07:21:52 +02:00
smgr Use TRUNCATE to preserve relfilenode for pg_largeobject + index. 2022-07-28 16:03:42 -04:00
sync Avoid shadowing a variable in sync.c. 2022-07-15 00:06:32 +12:00
Makefile Refactor the fsync queue for wider use. 2019-04-04 23:38:38 +13:00