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.96) (envelope-from ) id 1wzfww-004A3w-1P for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Aug 2026 19:39:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wzfwv-004Fjr-1T for pgsql-hackers@arkaria.postgresql.org; Thu, 27 Aug 2026 19:39:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wzfwv-004Fjj-0W for pgsql-hackers@lists.postgresql.org; Thu, 27 Aug 2026 19:39:45 +0000 Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wzfws-00000001bVk-405O for pgsql-hackers@postgresql.org; Thu, 27 Aug 2026 19:39:44 +0000 Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-51c8e2e39easo558041cf.0 for ; Thu, 27 Aug 2026 12:39:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787859581; x=1788464381; darn=postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to:content-type; bh=dF4iE05LBvRy2E6meToUSGJsCXJzTbqiYRjm9kikwsM=; b=S2e7YyBVmvcp5xT85I+/MMjM6j13z7hlDar3E3cahmyzjSDctzoBXIM2l/nCq68oG2 ikuXAFCfRK2Hd2Au1c56nyckxdZAAbY7uM4XhO5/tgqM7VodZjTsdwJsxVG/xZ0kegVP dFjUWgpcIHVxEq6yO1QX+tc47meTnFGRRmMjMS6EGE3tpMiyZIos/80im4ysPKMSfUSm +fWRU4bhLB/X/vpd4nge7bYvJFmAkAG35Wh20DXp/tT8c6l3rSLuU4Z511eLU/HbiCjd DOivjHg8bwyeztEV/6l6vViS2BMd4NAabfhwNfJyNuLQO76jErVIVb/T6+G1xK67kLje LhaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787859581; x=1788464381; h=in-reply-to:content-transfer-encoding:content-disposition :content-type:mime-version:references:message-id:subject:cc:to:from :date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to:content-type; bh=dF4iE05LBvRy2E6meToUSGJsCXJzTbqiYRjm9kikwsM=; b=sKLgUY0i/mzj9+tRSCgGlMr+/OnYaG/WUZ5lTec2ej2yfzxesnj2QGsP/CKMWfZHBV 6yh/RWrQcEZeALkF42gMLB13Ejz4B9fpoMvMYxXP9NFGLHSyqiAwzy10p31lwTm2tbex zqzzwPV73lBW+COzj4NgwXM4OI7JleJMtUKOjqksI35trHi2iqlErU1BwTRUSQGVbOw2 YmW/7tPbL8o4zYJYwXiUWNY3yGfL/hajFA9qWdcvMWBKIow3ReDVzCYsB6B9bUHct/8o WsGAAQJFtIAVVXs13VQld7G6KZhRz1UHSHbYLdjaK5On9vTyKVJO76G98AZujzJ+xrsm jLQw== X-Gm-Message-State: AFuF++lr58gDlc2fqNjPJLHSqlWRmiXD+ne80SW8hj0vnvaiqQ4Fh3lO cBIRwNbxqVogniOT1w4h/XWnRoDwivzsEGBj6BmpT35mdGg40ijkIwYS X-Gm-Gg: AR+sD12iomDqZiZj03I3eUOg9yKU9jLBo3CAHRhNDlKkOB2rtveZxG6Z+7gIsUeol3M msW26Ox3OIE/xfuNGZVMi2+Os+yQ4VepHl1PWOJmz/bycgjc5TfnmuiVi29gL9ntrPp65F8y2AY 1miG4rK+5ZXgSzePPAZZ/OzYW+FRBwQJBN9dP4hui2iTPVYejd60v1SMLHjlfF6FEN4+UmfaCcf i+kTsrwXZYGLmCc2aNxb87Pc5qYdX4hvbRAcFb+CR8RhyRYj+ydN+YxVcemhSOiBGl3i/uMbB4F oFJqR1Mw1FDKrDtX/8aF9n+w6VD2KCy1C5UO6g41uMVWKBV5U4Gwl9WOJMcOWWTd8n7YJhtqta8 eb9ZSrxmUuUYm0ZLI0iM2o3T7kNaQhpalkK67lONfMZpsZbWY2apdtb/0Z+P03585X0/LX+HXpR 4bzVL5rFTIEPihQNkUfs7oWgzz+fsZVAjEWsvmMbvlQS6C6Zjhpp13OnM/B+sCaI5sPwNDKx0Ug 5MLEJXRpX49kwTJxlu3uRNuKnPRlmeR9RGm/94DDDIjFntVW49BC6mKsdA92trsX523XtfBxQQq E6nT47uepp53Y08= X-Received: by 2002:a05:622a:1a82:b0:52f:aaa7:af7d with SMTP id d75a77b69052e-52fb9429a87mr18423601cf.15.1787859577418; Thu, 27 Aug 2026 12:39:37 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-52fb9eaf0desm3164631cf.19.2026.08.27.12.39.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2026 12:39:36 -0700 (PDT) Date: Thu, 27 Aug 2026 14:39:35 -0500 From: Nathan Bossart To: Fujii Masao Cc: pgsql-hackers@postgresql.org, alvherre@kurilemu.de Subject: Re: REPACK (ANALYZE) within transaction block segfaults Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Aug 28, 2026 at 01:09:59AM +0900, Fujii Masao wrote: > On Thu, Aug 27, 2026 at 10:56 PM Nathan Bossart > wrote: >> Presumably we need to handle transaction blocks a bit like how vacuum() >> does. Or maybe even prevent REPACK (ANALYZE) within a transaction block. > > I looked into this a bit. I think the problem is not ordinary > transaction blocks themselves, but non-top-level execution, such as the > DO block in the reproducer. > > So the attached patch rejects only non-top-level REPACK (ANALYZE) > commands. Hm. Couldn't we do something like the in_outer_xact/use_own_xacts stuff in vacuum() to get it working instead? -- nathan