Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sYwhA-00FKW0-Fv for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jul 2024 23:55:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sYwh8-00F1Ch-Su for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Jul 2024 23:55:54 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sYwh8-00F1CZ-5D for pgsql-hackers@lists.postgresql.org; Tue, 30 Jul 2024 23:55:54 +0000 Received: from m16.mail.163.com ([117.135.210.5]) by makus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sYwh3-002Hjr-0M for pgsql-hackers@lists.postgresql.org; Tue, 30 Jul 2024 23:55:52 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version: Content-Type; bh=ekIQINuX8Lc5IGJBbrr7keIUG3ASd0pB8Kdmm6xzPHc=; b=KApRCsWlaS6kCr5SSZ9QmcANTzJfZ+yfC2QH1dh/qbo9z+Pbt3XCImCQsFAUdn QEOdWuV3QXZ119Z8NKDBSxElA6+wr25IXAv+FnWmC1yTb0Vnp2LJwCyDZsqA7TC9 WZoblN7E4bS9yAQ/LVs66q1Ik3zNGLgf8LTmx37qMqkn4= Received: from lovely-coding (unknown [101.227.46.166]) by gzga-smtp-mta-g3-3 (Coremail) with SMTP id _____wDnz5N7falm3QVuAg--.56739S3; Wed, 31 Jul 2024 07:55:40 +0800 (CST) From: Andy Fan To: Etsuro Fujita Cc: PostgreSQL Hackers Subject: Re: Comment in portal.h In-Reply-To: (Etsuro Fujita's message of "Tue, 30 Jul 2024 19:39:27 +0900") References: Date: Wed, 31 Jul 2024 07:55:39 +0800 Message-ID: <87plqusadg.fsf@163.com> MIME-Version: 1.0 Content-Type: text/plain X-CM-TRANSID: _____wDnz5N7falm3QVuAg--.56739S3 X-Coremail-Antispam: 1Uf129KBjvdXoWrtFyxWF4kCF17ArW5Wr1fXrb_yoW3trb_uw 1Yyws5Ww1qk3yUt3Zxtrs8AF17K3yqgrW5Xw1Fgr4jvr4rGa15G34kuwsa9w15K3WkGrWU CrnxZwn7uw13tjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRdgAc3UUUUU== X-Originating-IP: [101.227.46.166] X-CM-SenderInfo: x2klx3xlid0iqsrtqiywtou0bp/1tbiNh8sU2XAmu3MEQAAsZ List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Etsuro Fujita writes: > Hi, > > I noticed $SUBJECT while working on something else: > > /* > * Where we store tuples for a held cursor or a PORTAL_ONE_RETURNING or > * PORTAL_UTIL_SELECT query. (A cursor held past the end of its > * transaction no longer has any active executor state.) > */ > Tuplestorestate *holdStore; /* store for holdable cursors */ > MemoryContext holdContext; /* memory containing holdStore */ > > We do that for PORTAL_ONE_MOD_WITH as well, so the comment should be > "Where we store tuples for a held cursor or a PORTAL_ONE_RETURNING, > PORTAL_ONE_MOD_WITH, or PORTAL_UTIL_SELECT query.". Attached is a > patch for that. Patch looks good to me. All the codes of PortalRun & FillPortalStore & PortalRunSelect are consistent with this idea. -- Best Regards Andy Fan