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 1rd1mt-003T6j-3U for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Feb 2024 05:38:27 +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 1rd1mq-008KcD-FL for pgsql-bugs@arkaria.postgresql.org; Thu, 22 Feb 2024 05:38:24 +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.94.2) (envelope-from ) id 1rd1mq-008Kc5-7Q for pgsql-bugs@lists.postgresql.org; Thu, 22 Feb 2024 05:38:24 +0000 Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rd1mm-000Hmw-Cx for pgsql-bugs@lists.postgresql.org; Thu, 22 Feb 2024 05:38:24 +0000 Received: by mail-ot1-x330.google.com with SMTP id 46e09a7af769-6e2e6bcc115so4140779a34.3 for ; Wed, 21 Feb 2024 21:38:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708580298; x=1709185098; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=A+OI2RgTvqLxIj6pVPwh3IcO2CJp5fWriZL8N5QCfV0=; b=M9phbZqABNQPJ2DkvxSfr07fVMdWuerJDmW28ouVZNp02KaNRBd/RnYdSkr3ZKkGAQ ZeuyMt8yvYVazTAoioQATSWZtiUZS2xdJ2K8FWXH0BlGEdUeO91fN9gGcn60Y/adc2GV PsVQx3fG/4OaDK217euJVT7TkyS+HnTdi0pF7dS3Mw9nXvmYcP/kRNmK8mUqjmq9roY4 7SjbhjJP5KuV862IOrD1q+S0t2K6pd2xcDmE5iIvHSxTFni37kBCWNA5tT9tITu4+EeF U6gxDneEJHR6kVZQPEB8dYqbljRMgwqMY29ljSCcErW5pvd1Z8vobQucTvbQMZIPYSSg uDBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708580298; x=1709185098; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:from:subject:cc:to:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=A+OI2RgTvqLxIj6pVPwh3IcO2CJp5fWriZL8N5QCfV0=; b=L7k79DCAOw9fP6UAHpcDBvid2DcilGgT8hhhAhs82oeCt6D7BENA0HZPBZqp4UsNAH KCgTXZwN6OT7d4yCrTmiBsmqIjxrcjNg0vKZYN54PNsAGpPGLaOUBhUlvn43DVf4fEDL zZtz6/HJ2EfMTYVK/NbhHboMitum67viHJvPiPcA6J9JddbUS5SvDmxrBP1Pn93Fw7mN gzo4N0FAxDGduYXEXhimaMWKYRY8i8oT9LlwhKsIEx6F924XO4F+rioRHX8sNg4pRAr5 u54kjoQ6eyDBK3Q8+BfSguTPRbDxIFEiwuKRngD7yfSqrCBtFm+cMdtkwrHyAVm991ar vYAA== X-Forwarded-Encrypted: i=1; AJvYcCU+JNBMt3F03xYIYwJM91OqhW43hISJKfnCiMJo4JTPgEBsVMDU31G0exUuviq0ZLnOUTXRUSCNAg6WRiHp43nj4W/8pB3hvVL9MaYWN+il X-Gm-Message-State: AOJu0YzTGmLVNVbLfaf2I2VRwZjCEGtvNMi+GfcCBoSBWg3ZyDENeDK+ 0ss2cFsqcCdV2NMYrPYp01V74fsdGZj7gD71u86KIMeYGkY9zjQc X-Google-Smtp-Source: AGHT+IFA+/CBZMI3YMQg3PDytkFs/PN2jM4YqT7TEfaU8hXhgL7z0/lU1c/vm3a3jtLX482+6cewEQ== X-Received: by 2002:a05:6808:640e:b0:3c1:7f5a:b6cc with SMTP id fg14-20020a056808640e00b003c17f5ab6ccmr157661oib.20.1708580298343; Wed, 21 Feb 2024 21:38:18 -0800 (PST) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id y12-20020aa79e0c000000b006e3e72a4f87sm8385192pfq.0.2024.02.21.21.38.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Feb 2024 21:38:17 -0800 (PST) Date: Thu, 22 Feb 2024 14:38:15 +0900 (JST) Message-Id: <20240222.143815.1856873109774774353.horikyota.ntt@gmail.com> To: tndrwang@gmail.com Cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18354: Aborted transaction aborted during cleanup when temp_file_limit exceeded From: Kyotaro Horiguchi In-Reply-To: References: <18354-140864c09686b5a6@postgresql.org> <20240222.114600.1019580904613326727.horikyota.ntt@gmail.com> User-Agent: Mew version 6.8 on Emacs 27.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk At Thu, 22 Feb 2024 11:49:29 +0800, Tender Wang wrote in > Changing the behavior of tuplestore can work for this issue, but I'm not > sure if this change will affect other components which depend on > BufFile(like nodeMaterial) Right. Regarding this type of error, the best we can do is to be careful not to cause exceptions (elog/ereport(>=ERROR)) within the abort code path. This is somewhat similar to the case of the interaction between malloc() and signal handler. First I tried to skip flushing in BufFileClose based on transaction state and isInterXact state. However, that didn't seem that simple. We could provide some flag to signal we're in the state where we cannot error out, which BufFileClose refers to. That in turn can cause other issues. I mentioned that I haven't checked for the similar potential issues BufFileClose can cause, but if nodeMaterial is that, the new function could be usable for that. regards. -- Kyotaro Horiguchi NTT Open Source Software Center