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 1tBgX7-005QAD-CQ for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Nov 2024 20:33:40 +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 1tBgX4-006fv4-N3 for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Nov 2024 20:33:39 +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 1tBgX4-006fup-4d for pgsql-hackers@lists.postgresql.org; Thu, 14 Nov 2024 20:33:38 +0000 Received: from fout-b7-smtp.messagingengine.com ([202.12.124.150]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tBgX1-001tHP-Tn for pgsql-hackers@postgresql.org; Thu, 14 Nov 2024 20:33:37 +0000 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfout.stl.internal (Postfix) with ESMTP id 11EB1114017F; Thu, 14 Nov 2024 15:33:35 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-11.internal (MEProxy); Thu, 14 Nov 2024 15:33:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1731616414; x=1731702814; bh=y rJYF4+CmmvE/sc4LFOG6gDLm5HddRY0JRWNTUFSheA=; b=URjIHPZlFPg1+pBxK NuAmJvgc1TCCmJm3+DgFZDi8x1TeM4neS1Y1fBkZHcJQuMdsbbrb7mhNs+uyS5En IKad9D5LR7efPoJq9iXM8/x8Uclc0GbE8Xf8yIPjHMzQ0p0PeTpFeOoE/edhRmhj KFGr+VLNRClSjtcNA/zeE9k8oGRIs3/xOkGYIVz6wbw3a74gbYp3JVpciviG1YiJ quBlDDuo32GmsGWD93qjW9U0ax6rdcPkxd2VNfXVG/MS5rSfxy9Yh27LRRCekZHE PXqqGl5D8skk+O5rZFD12J6HAy8QPskIc5VHxRuubOs40sMMfqcb0EzuMUT7tmHD /f00Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrvddvgddufeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeen ucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhh drnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffh jeejhffgieeuueekjeekfffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrph hrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsggprh gtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehmhihonhesuggv sghirghnrdhorhhgpdhrtghpthhtohepphgrvhgrnhdruggvohhlrghsvggvsehgmhgrih hlrdgtohhmpdhrtghpthhtohepnhhorghhsehlvggruggsohgrthdrtghomhdprhgtphht thhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlhdrohhrghdprhgtph htthhopehtghhlsehsshhsrdhpghhhrdhprgdruhhs X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 14 Nov 2024 15:33:34 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1731616412; bh=sTcWhiO6cvLTr4g0sCYlAbqGUrgqRVW1YaWgahqWM+8=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=HwwF6XxeyV/ogQgmFi+mc1NyhFlNI998BZFNdKmuQZfinKFsJCs5vPfJQ7cLPkWVF 9PKBkNsKuv9ArpM85ok6P+xDcvV2mwY1CXmT77NRkOzlVfnXfsENUGe19pXRGcvwky udifiExlEGL/DWq7tt9vj7uZ0d98iTrG2iN2spLmQnZmaAO1R/E3/QRtys4fUMfWbB ++XdyYLzOqlu9L0wBBOsUQE9JLHD+Tuaox3aTMPoNXlDfTCmkVhw6cOWxJzbPESFJO ClwPF5kkCwSZxFKCcv5c8MSAuGXS+n68F4PidPf5ARtIBPcHfe6Y/Bc9EaDkE7p18n LVbg7G4BT1mNw== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 53EF7EE; Thu, 14 Nov 2024 21:33:32 +0100 (CET) Date: Thu, 14 Nov 2024 21:33:32 +0100 From: Alvaro Herrera To: Tom Lane Cc: Christoph Berg , Noah Misch , Pavan Deolasee , pgsql-hackers Subject: Re: Potential ABI breakage in upcoming minor releases Message-ID: <202411142033.u6za5a6ylj2k@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1976928.1731614974@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024-Nov-14, Tom Lane wrote: > Alvaro Herrera writes: > > On 2024-Nov-14, Christoph Berg wrote: > >> It didn't actually crash, true. > > > But timescale did crash: > > So what is timescale doing differently? No idea. Maybe a stacktrace from a core would tell us more; but the jenkins task doesn't seem to have server logs or anything else to gives us more clues. There are three makeNode(ResultRelInfo), but they don't look anything out of the ordinary: C perhan: timescaledb 0$ git grep -C5 makeNode.ResultRelInfo src/copy.c- * src/copy.c- * WARNING. The dummy rangetable index is decremented by 1 (unchecked) src/copy.c- * inside `ExecConstraints` so unless you want to have a overflow, keep it src/copy.c- * above zero. See `rt_fetch` in parsetree.h. src/copy.c- */ src/copy.c: resultRelInfo = makeNode(ResultRelInfo); src/copy.c- src/copy.c-#if PG16_LT src/copy.c- ExecInitRangeTable(estate, pstate->p_rtable); src/copy.c-#else src/copy.c- Assert(pstate->p_rteperminfos != NULL); -- src/nodes/chunk_dispatch/chunk_insert_state.c-create_chunk_result_relation_info(const ChunkDispatch *dispatch, Relation rel) src/nodes/chunk_dispatch/chunk_insert_state.c-{ src/nodes/chunk_dispatch/chunk_insert_state.c- ResultRelInfo *rri; src/nodes/chunk_dispatch/chunk_insert_state.c- ResultRelInfo *rri_orig = dispatch->hypertable_result_rel_info; src/nodes/chunk_dispatch/chunk_insert_state.c- Index hyper_rti = rri_orig->ri_RangeTableIndex; src/nodes/chunk_dispatch/chunk_insert_state.c: rri = makeNode(ResultRelInfo); src/nodes/chunk_dispatch/chunk_insert_state.c- src/nodes/chunk_dispatch/chunk_insert_state.c- InitResultRelInfo(rri, rel, hyper_rti, NULL, dispatch->estate->es_instrument); src/nodes/chunk_dispatch/chunk_insert_state.c- src/nodes/chunk_dispatch/chunk_insert_state.c- /* Copy options from the main table's (hypertable's) result relation info */ src/nodes/chunk_dispatch/chunk_insert_state.c- rri->ri_WithCheckOptions = rri_orig->ri_WithCheckOptions; -- src/ts_catalog/catalog.c-extern TSDLLEXPORT ResultRelInfo * src/ts_catalog/catalog.c-ts_catalog_open_indexes(Relation heapRel) src/ts_catalog/catalog.c-{ src/ts_catalog/catalog.c- ResultRelInfo *resultRelInfo; src/ts_catalog/catalog.c- src/ts_catalog/catalog.c: resultRelInfo = makeNode(ResultRelInfo); src/ts_catalog/catalog.c- resultRelInfo->ri_RangeTableIndex = 0; /* dummy */ src/ts_catalog/catalog.c- resultRelInfo->ri_RelationDesc = heapRel; src/ts_catalog/catalog.c- resultRelInfo->ri_TrigDesc = NULL; /* we don't fire triggers */ src/ts_catalog/catalog.c- src/ts_catalog/catalog.c- ExecOpenIndices(resultRelInfo, false); I didn't catch any other allocations that would depend on the size of ResultRelInfo in obvious ways. Oh, hmm, there's this bit which uses struct assignment into a stack element: tsl/src/compression/compression.c-1559- if (decompressor->indexstate->ri_NumIndices > 0) tsl/src/compression/compression.c-1560- { tsl/src/compression/compression.c:1561: ResultRelInfo indexstate_copy = *decompressor->indexstate; tsl/src/compression/compression.c-1562- Relation single_index_relation; I find this rather suspect. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "La espina, desde que nace, ya pincha" (Proverbio africano)