Re: fdatasync performance problem with large number of DB files
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Michael Brown <michael.brown@discourse.org>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-03-11T00:16:10Z
Lists: pgsql-hackers
Thomas Munro <thomas.munro@gmail.com> writes: > Thinking about this some more, if you were to propose a patch like > that syncfs() one but make it a configurable option, I'd personally be > in favour of trying to squeeze it into v14. Others might object on > commitfest procedural grounds, I dunno, but I think this is a real > operational issue and that's a fairly simple and localised change. > I've run into a couple of users who have just commented that recursive > fsync() code out! I'm a little skeptical about the "simple" part. At minimum, you'd have to syncfs() each tablespace, since we have no easy way to tell which of them are on different filesystems. (Although, if we're presuming this is Linux-only, we might be able to tell with some unportable check or other.) regards, tom lane
Commits
-
Change recovery_init_sync_method to PGC_SIGHUP.
- 34a8b64b4e5f 14.0 landed
-
Provide recovery_init_sync_method=syncfs.
- 61752afb2640 14.0 landed