Re: Minor comment update in execPartition.c

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Etsuro Fujita <fujita(dot)etsuro(at)lab(dot)ntt(dot)co(dot)jp>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Minor comment update in execPartition.c
Date: 2018-04-25 00:47:51
Message-ID: 78e033fb-56ef-38e7-2ca3-19e8fff77990@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Fujita-san,

On 2018/04/24 20:14, Etsuro Fujita wrote:
> Hi,
>
> Here is a comment for ExecInitPartitionInfo:
>
> 296 * ExecInitPartitionInfo
> 297 * Initialize ResultRelInfo and other information for a
> partition if not
> 298 * already done
>
> I think we should remove the words "if not already done" from that
> comment because 1) that function is called if the partition wasn't
> already initialized and 2) that function assumes that. Attached is a
> small patch for removing the words.

Thanks, sounds fine. I think those words remain from earlier versions of
the patch committed as edd44738bc8 [1], where there used to be a fast-path
return if the ResultRelInfo was already non-NULL for the passed in index.
I remember you suggested making it so that we call ExecInitPartitionInfo
only if needed [2]. After making the changes as suggested, the "if not
already done" became redundant.

Thanks,
Amit

[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=edd44738bc8

[2] https://www.postgresql.org/message-id/5A7443DF.1010408%40lab.ntt.co.jp

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2018-04-25 01:15:02 Re: Oddity in tuple routing for foreign partitions
Previous Message Peter Eisentraut 2018-04-24 22:17:05 Re: obsoleting plpython2u and defaulting plpythonu to plpython3u