Commit Graph

19 Commits

Author SHA1 Message Date
Thomas Munro d2e150831a Remove configure probe for fdatasync.
fdatasync() is in SUSv2, and all targeted Unix systems have it.  We have
a replacement function for Windows.

We retain the probe for the function declaration, which allows us to
supply the mysteriously missing declaration for macOS, and also for
Windows.  No need to keep a HAVE_FDATASYNC macro around.

Also rename src/port/fdatasync.c to win32fdatasync.c since it's only for
Windows.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com
Discussion: https://postgr.es/m/CA%2BhUKGJZJVO%3DiX%2Beb-PXi2_XS9ZRqnn_4URh0NUQOwt6-_51xQ%40mail.gmail.com
2022-08-05 16:37:38 +12:00
Thomas Munro f900a79ecd Default to wal_sync_method=fdatasync on FreeBSD.
FreeBSD 13 gained O_DSYNC, which would normally cause wal_sync_method to
choose open_datasync as its default value.  That may not be a good
choice for all systems, and performs worse than fdatasync in some
scenarios.  Let's preserve the existing default behavior for now.

Like commit 576477e73c, which did the same for Linux, back-patch to all
supported releases.

Discussion: https://postgr.es/m/CA%2BhUKGLsAMXBQrCxCXoW-JsUYmdOL8ALYvaX%3DCrHqWxm-nWbGA%40mail.gmail.com
2021-02-15 16:04:59 +13:00
Magnus Hagander 9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Bruce Momjian f3d99d160d Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
Bruce Momjian b6b71b85bc Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
Bruce Momjian 69f2e9b0fc Move slock_t typdefs into s_lock.h from include/port files for
centralization and easier maintanence.
2003-12-23 03:31:30 +00:00
Bruce Momjian 887b5a7be0 Remove NEED_I386_TAS_ASM and just test for compiler defines. 2003-12-23 00:32:06 +00:00
Bruce Momjian 9114cb1c5f This applied patch remove NEED_SPARC_TAS_ASM and instead uses __sparc ||
__sparc__.
2003-12-22 23:39:53 +00:00
Bruce Momjian 69a46e9ce1 Enable Opteron/Itanium spinlocks. 2003-09-12 15:49:34 +00:00
Bruce Momjian 089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
Tom Lane a26ac42b76 Awhile back I wrote that freebsd.h was probably broken in the places where
it diverged from netbsd.h and openbsd.h.  This has now been confirmed.
Accordingly, make all three exactly alike.
2003-01-01 20:35:39 +00:00
Bruce Momjian 6783b2372e Another pgindent run. Fixes enum indenting, and improves #endif
spacing.  Also adds space for one-line comments.
2001-10-28 06:26:15 +00:00
Bruce Momjian 9e1552607a pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
Tom Lane a7ea9f46e1 Still further tweaking of s_lock assembler: do not assume that leading
whitespace is unimportant in assembly code.  Also, move VAX definition
of typedef slock_t to port header files to be like all the other ports.
Note that netbsd.h and openbsd.h are now identical, and I rather think
that freebsd.h is broken in the places where it doesn't agree --- but
I'll leave it to the freebsders to look at that.
2001-01-20 00:03:55 +00:00
Bruce Momjian 312063c97b Make pgsql compile on FreeBSD-alpha.
Context diff this time.

Remove -m486 compile args for FreeBSD-i386, compile -O2 on i386.

Compile with only -O on alpha for codegen safety.

Make the port use the TEST_AND_SET for alpha and i386 on FreeBSD.

Fix a lot of bogus string formats for outputting pointers (cast to int
and %u/%x replaced with no cast and %p), and 'Size'(size_t) are now
cast to 'unsigned long' and output with %lu/

Remove an unused variable.

Alfred Perlstein
2000-11-16 05:51:07 +00:00
Peter Eisentraut 525e1c4436 USE_POSIX_TIME replaced by HAVE_TM_ZONE || HAVE_INT_TIMEZONE, which are
equivalent.

In linux.h there were some #undef HAVE_INT_TIMEZONE, which are useless
because HAVE_TM_ZONE overrides it anyway, and messing with configure
results isn't cool.
2000-10-29 13:17:34 +00:00
Bruce Momjian 050371fccd More cpu cleanups, only for 6.6. 1999-07-13 20:12:51 +00:00
Bruce Momjian 540c114225 Redefine cpu's as __cpu__. Only for 6.6 branch. 1999-07-13 20:00:37 +00:00
Marc G. Fournier 82a9c9cf38 Missed one more required file... 1998-10-27 04:42:59 +00:00