a litter question about mdunlinkfiletag function - Mailing list pgsql-hackers

From px shi
Subject a litter question about mdunlinkfiletag function
Date
Msg-id CAAccyYKeYNUCRR8JQ_wvWLF1Fu9CM5FMXQqtW96gFLH43phRHg@mail.gmail.com
Whole thread Raw
Responses Re: a litter question about mdunlinkfiletag function
List pgsql-hackers

Hi, hackers

When calculating the path, forknum is hardcoded as MAIN_FORKNUM:

/* Compute the path. */
p = relpathperm(ftag->rnode, MAIN_FORKNUM);


But since the ftag structure already contains forknum:

typedef struct FileTag
{
int16 handler; /* SyncRequestHandler value, saving space */
int16 forknum; /* ForkNumber, saving space */
RelFileNode rnode;
uint32 segno;
} FileTag;


Wouldn’t it be more flexible to use the value from the ftag structure directly?


Best regards, 

Pixian Shi

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: information_schema.view attgenerated
Next
From: Fujii Masao
Date:
Subject: Re: May be BUG. Periodic burst growth of the checkpoint_req counter on replica.