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

Commit2132e06

Browse files
committed
I made it so it rolled over files at 1MB. My table ended up with 120
segments, and my indexes had 3(Yes, it DOES work!).DROP TABLE removed ALL segments from the table, but only the main indexsegment.So it looks like removing the table itself is using mdunlink in md.c,while removing indexes uses FileNameUnlink() which only unlinks 1 file.As far as I can tell, calling FileNameUnlink() and mdunlink() is basicallythe same, except mdunlink() deletes any extra segments.I've done some testing and it seems to work. It also passes regressiontests(except float8, geometry and rules, but that's normal).If this patch is right, this fixes all known multi-segment problems onLinux.Ole Gjerde
1 parentde81fbd commit2132e06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/catalog/index.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.71 1999/05/10 00:44:55 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.72 1999/05/15 22:31:07 momjian Exp $
1111
*
1212
*
1313
* INTERFACE ROUTINES
@@ -1187,7 +1187,7 @@ index_destroy(Oid indexId)
11871187
*/
11881188
ReleaseRelationBuffers(userindexRelation);
11891189

1190-
if (FileNameUnlink(relpath(userindexRelation->rd_rel->relname.data))<0)
1190+
if (mdunlink(userindexRelation)!=SM_SUCCESS)
11911191
elog(ERROR,"amdestroyr: unlink: %m");
11921192

11931193
index_close(userindexRelation);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp