Re: setting estate in ExecInitNode() itself

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: setting estate in ExecInitNode() itself
Date: 2018-01-05 20:01:37
Message-ID: CA+TgmobfGkKBx1Ei1Aqd+LYatpx-4hhkfVYPxmEo-EGPGA3x1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jan 5, 2018 at 2:50 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> Agreed on that. But I also think there's quite some room for
> centralizing some of the work done in the init routines. Not quite sure
> how, but I do dislike the amount of repetition both in code and
> comments.

+1.

I *assume* that if you really understand how all of this stuff works,
adding new types of executor nodes is easy to do correctly. But, as
the executor README says "XXX a great deal more documentation needs
to be written here..." -- BTW, that comment dates to 2001 -- and I
have found it not to be all that straightforward (cf. commits
8538a6307049590ddb5ba127b2ecac6308844d60,
7df2c1f8daeb361133ac8bdeaf59ceb0484e315a,
41b0dd987d44089dc48e9c70024277e253b396b7,
0510421ee091ee3ddabdd5bd7ed096563f6bf17f,
b10967eddf964f8c0a11060cf3f366bbdd1235f6). Having similar, but often
very briefly commented, initialization, rescan, and cleanup nodes in
every file makes it hard to understand what actually needs to be done
differently in each case, and why.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-01-05 20:03:19 Re: Condition variable live lock
Previous Message Tom Lane 2018-01-05 19:55:50 Re: setting estate in ExecInitNode() itself