From: | Junwang Zhao <zhjwpku(at)gmail(dot)com> |
---|---|
To: | Steven Niu <niushiji(at)gmail(dot)com> |
Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: [Patch] remove duplicated smgrclose |
Date: | 2025-03-11 01:38:13 |
Message-ID: | CAEG8a3JSfpyKPEiJ7fsxuhxh3oCSMLW2=P9HZ5LWEiNEoyRkKw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
> Hi, Masahiko
>
> Thanks for your comments! I understand your concern as you stated.
> However, my initial patch was split into two parts as Kirill suggested.
> This thread is about the first part. Another part is here: https://commitfest.postgresql.org/patch/5149/
> Or you can take a look at the v2-0001-remove-duplicated-smgrclose.patch in this thread for the complete change.
>
> I think either we review the v2-patch, or review the both 5149 and 5196 CFs, for my complete change.
> There should be no missing operations.
@@ -482,13 +482,11 @@ smgrdounlinkall(SMgrRelation *rels, int nrels,
bool isRedo)
for (i = 0; i < nrels; i++)
{
RelFileLocatorBackend rlocator = rels[i]->smgr_rlocator;
- int which = rels[i]->smgr_which;
rlocators[i] = rlocator;
/* Close the forks at smgr level */
- for (forknum = 0; forknum <= MAX_FORKNUM; forknum++)
- smgrsw[which].smgr_close(rels[i], forknum);
+ smgrclose(rels[i]);
}
Yeah, you are adjusting the behavior by moving the `smgrclose` operation
after the `smgrdounlinkall` to the `smgrdounlinkall` function itself.
Seems no missing operations in v2-patch. Thanks.
>
> Please let me know if you have more comments.
>
> Best Regards,
> Steven
--
Regards
Junwang Zhao
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Harris | 2025-03-11 01:39:55 | Re: FileFallocate misbehaving on XFS |
Previous Message | John Naylor | 2025-03-11 01:30:30 | Re: CRC32C Parallel Computation Optimization on ARM |