Re: Use RELATION_IS_OTHER_TEMP where possible

From: Junwang Zhao <zhjwpku(at)gmail(dot)com>
To: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
Cc: Nathan Bossart <nathandbossart(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use RELATION_IS_OTHER_TEMP where possible
Date: 2025-06-11 11:35:39
Message-ID: CAEG8a3Ju5Z1hCGMAPir_vUErLPtn5rvQyMJNTkGG3H+tsFSspA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Ashutosh,

On Wed, Jun 11, 2025 at 7:11 PM Ashutosh Bapat
<ashutosh(dot)bapat(dot)oss(at)gmail(dot)com> wrote:
>
>
>
> On Wed, Jun 11, 2025 at 5:12 AM Junwang Zhao <zhjwpku(at)gmail(dot)com> wrote:
>>
>> Hi Nathan,
>>
>> On Wed, Jun 11, 2025 at 12:30 AM Nathan Bossart
>> <nathandbossart(at)gmail(dot)com> wrote:
>> >
>> > On Wed, Jun 11, 2025 at 12:07:35AM +0800, Junwang Zhao wrote:
>> > > All other files perform this check using RELATION_IS_OTHER_TEMP.
>> > > Should we update tablecmds.c to do the same for consistency?
>> >
>> > Seems like a good idea.
>>
>> Thanks for the comment.
>>
>> I have attached a patch with the proposed changes.
>
>
> LGTM. I looked at other instances of is_localtemp, but none of them have (relation)->rd_rel->relpersistence == RELPERSISTENCE_TEMP there. Your patch has covered all the existing ones.

Thank you for the review and the additional check.

I have created a cf entry to track this.

https://commitfest.postgresql.org/patch/5815/

>
> --
> Best Wishes,
> Ashutosh Bapat

--
Regards
Junwang Zhao

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Borisov 2025-06-11 12:27:02 Re: Improve the performance of Unicode Normalization Forms.
Previous Message David G. Johnston 2025-06-11 11:11:22 Re: Possibly hard-to-read message