postgresql - Where is the call to split files in postgres when they are greater than 1gb? -


according http://www.postgresql.org/docs/current/static/storage-file-layout.html

"when table or index exceeds 1 gb, divided gigabyte-sized segments. first segment's file name same filenode; subsequent segments named filenode.1, filenode.2, etc."

i wondering in source code dealt with. have been searching last few hours have had no luck

edit: if can lead me code writes pages buffer disk appreciated well.

you're looking src/backend/storage/smgr/smgr.c , src/backend/storage/smgr/md.c relfilenode management. main file referred relfilenodebackend , forks forknumber. start backend/storage/smgr/readme.

git grep find things lot faster; quick cd src; git grep --color relfilenode helped find relevant areas of codebase.

buffer cache management , dirty write-out quite separate. it's complicated use of bgwriter (background writer), eagerly writes dirty buffers in shared memory disk without blocking actively working backend(s). i'm not familiar part of code, bit of time git grep , developer documentation should find way around.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -