postgresql/src/backend/storage
Thomas Munro 3eb77eba5a Refactor the fsync queue for wider use.
Previously, md.c and checkpointer.c were tightly integrated so that
fsync calls could be handed off and processed in the background.
Introduce a system of callbacks and file tags, so that other modules
can hand off fsync work in the same way.

For now only md.c uses the new interface, but other users are being
proposed.  Since there may be use cases that are not strictly SMGR
implementations, use a new function table for sync handlers rather
than extending the traditional SMGR one.

Instead of using a bitmapset of segment numbers for each RelFileNode
in the checkpointer's hash table, make the segment number part of the
key.  This requires sending explicit "forget" requests for every
segment individually when relations are dropped, but suits the file
layout schemes of proposed future users better (ie sparse or high
segment numbers).

Author: Shawn Debnath and Thomas Munro
Reviewed-by: Thomas Munro, Andres Freund
Discussion: https://postgr.es/m/CAEepm=2gTANm=e3ARnJT=n0h8hf88wqmaZxk0JYkxw+b21fNrw@mail.gmail.com
2019-04-04 23:38:38 +13:00
..
buffer Refactor the fsync queue for wider use. 2019-04-04 23:38:38 +13:00
file Move hash_any prototype from access/hash.h to utils/hashutils.h 2019-03-11 13:17:50 -03:00
freespace Improve code comments in b0eaa4c51b. 2019-03-16 06:55:56 +05:30
ipc Consistently test for in-use shared memory. 2019-04-03 17:03:46 -07:00
large_object Remove superfluous tqual.h includes. 2019-01-21 12:15:02 -08:00
lmgr Prevent use of uninitialized variable 2019-04-02 16:03:26 -03:00
page Track block level checksum failures in pg_stat_database 2019-03-09 10:47:30 -08:00
smgr Refactor the fsync queue for wider use. 2019-04-04 23:38:38 +13:00
sync Refactor the fsync queue for wider use. 2019-04-04 23:38:38 +13:00
Makefile Refactor the fsync queue for wider use. 2019-04-04 23:38:38 +13:00