Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit68c3234

Browse files
committed
Repair a bunch of problems in md.c. This builds on Hiroshi's
insight that RelationFlushRelation ought to invoke smgrclose, and that theway to make that work is to ensure that mdclose doesn't fail if the relationis already closed (or unlinked, if we are looking at a DROP TABLE). WhileI was testing that, I was able to identify several problems that we hadwith multiple-segment relations. The system is now able to do initdb andpass the regression tests with a very small segment size (I had it set to64Kb per segment for testing). I don't believe that ever worked before.File descriptor leaks seem to be gone too.I have partially addressed the concerns we had about mdtruncate(), too.On a Win32 or NFS filesystem it is not possible to unlink a file thatanother backend is holding open, so what md.c now does is to truncateunwanted files to zero length before trying to unlink them. The otherbackends will be forced to close their open files by relation cacheinvalidation --- but I think it would take considerable work to makethat happen before vacuum truncates the relation rather than after.Leaving zero-length files lying around seems a usable compromise.
1 parent4478d29 commit68c3234

File tree

3 files changed

+154
-112
lines changed

3 files changed

+154
-112
lines changed

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp