Re: [PATCH] Improve function toast_delete_external (src/backend/access/table/toast_helper.c)

From: Dong Wook Lee <sh95119(at)gmail(dot)com>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Improve function toast_delete_external (src/backend/access/table/toast_helper.c)
Date: 2022-02-09 23:10:16
Message-ID: CAAcByaJJBJU_y9gGiSTtjeTEshE=Ovv-VuedvFfC4paJSKHkeg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yes, now I understand it.
Thank you for letting me know about that.

Thanks.

2022년 2월 10일 (목) 00:39, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>님이 작성:

>
> Em qua., 9 de fev. de 2022 às 11:34, Dong Wook Lee <sh95119(at)gmail(dot)com>
> escreveu:
>
>> Hi,
>>
>> I've applied your patch. I think it's reasonable.
>> but IMHO It looks more complicated to read because of many conditions
>> in if statement.
>> so what about just moving up if-statement?
>>
>
> No.
> Your version is worse than HEAD, please don't.
>
> 1. Do not declare variables after statement.
> Although Postgres accepts C99, this is not acceptable, for a number of
> problems, already discussed.
>
> 2. Still slow unnecessarily, because still test TupleDescAttr(tupleDesc,
> i)->attlen,
> which is much more onerous than test isnull.
>
> 3. We don't write Baby C code.
> C has short break expressions, use-it!
>
> My version is the right thing, here.
>
> regards,
> Ranier Vilela
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-02-09 23:11:29 Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes
Previous Message Justin Pryzby 2022-02-09 22:42:30 Re: wrong fds used for refilenodes after pg_upgrade relfilenode changes Reply-To: