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

Commit638cf09

Browse files
committed
Handle 5-char filenames in SlruScanDirectory
Original users of slru.c were all producing 4-digit filenames, so thatwas all that that code was prepared to handle. Changes to multixact.cin the course of commit0ac5ad5 made pg_multixact/members create5-digit filenames once a certain threshold was reached, whichSlruScanDirectory wasn't prepared to deal with; in particular,5-digit-name files were not removed during truncation. Change thatroutine to make it aware of those files, and have it process them justlike any others.Right now, some pg_multixact/members directories will contain a mixtureof 4-char and 5-char filenames. A future commit is expected fix thingsso that each slru.c user declares the correct maximum width for thefiles it produces, to avoid such unsightly mixtures.Noticed while investigating bug #8673 reported by Serge Negodyuck.
1 parenta50d976 commit638cf09

File tree

1 file changed

+6
-2
lines changed
  • src/backend/access/transam

1 file changed

+6
-2
lines changed

‎src/backend/access/transam/slru.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,8 +1293,12 @@ SlruScanDirectory(SlruCtl ctl, SlruScanCallback callback, void *data)
12931293
cldir=AllocateDir(ctl->Dir);
12941294
while ((clde=ReadDir(cldir,ctl->Dir))!=NULL)
12951295
{
1296-
if (strlen(clde->d_name)==4&&
1297-
strspn(clde->d_name,"0123456789ABCDEF")==4)
1296+
size_tlen;
1297+
1298+
len=strlen(clde->d_name);
1299+
1300+
if ((len==4||len==5)&&
1301+
strspn(clde->d_name,"0123456789ABCDEF")==len)
12981302
{
12991303
segno= (int)strtol(clde->d_name,NULL,16);
13001304
segpage=segno*SLRU_PAGES_PER_SEGMENT;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp