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 1sEOqE-001Gni-Mh for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Jun 2024 07:44:24 +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 1sEOqD-00FqRi-CJ for pgsql-hackers@arkaria.postgresql.org; Tue, 04 Jun 2024 07:44:21 +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 1sEOqD-00FqRa-2T for pgsql-hackers@lists.postgresql.org; Tue, 04 Jun 2024 07:44:21 +0000 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sEOq6-002GhZ-5t for pgsql-hackers@postgresql.org; Tue, 04 Jun 2024 07:44:20 +0000 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1f612d7b0f5so33189105ad.0 for ; Tue, 04 Jun 2024 00:44:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717487052; x=1718091852; darn=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=HtSzFXBQPcCeV5NnkrvD83dS8HOZSLCTbETsQd5W8zg=; b=MDGkC8TiJ3on3H47CDJnhpHumtv10MUJ/5GwLfcwZ8tEsMIQYQVlUw5bZYa1PyzhCa a+3bHKD3ocgK8iijzll0RKCMo6EPGhaGjy6/S5mKS4EIVw8rmOUbmyDyD64Zc0UZZlOG YpBWYZyQpYQk48OicMEp6p1xWBtxEoUB8VDJK6RgwIRPluKyzD9sWLlvBuCZrtBzfDCt ZwIHFnaykq9oaSRWHQOky4etckuf1EDRzWiXmN9FpW++cywrHohfQPbygmKdAZRB3Mtn Iu8ZSeCS1UZkX77nqS4EqMdLLGubwObRJLabwTHLATQue1/0NR8uoFtlVFw2RsjGHFqa VxSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717487052; x=1718091852; 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=HtSzFXBQPcCeV5NnkrvD83dS8HOZSLCTbETsQd5W8zg=; b=s39IGWdJhRItEA3200YPYiGLIai2w6x9eFM7ZlRElr7dbiKZ52lSuy8EbNLgHBSvug V4MpYoONdCKF4XJFYACu72BR1+9VDIaUM/qx1hBjoorDf5Tza71mtmFH088AOjvCU11x dB92zV8EScW+5VqDQDZaGzRvYwZ8cGKTjokzHCVdzn65H1yJVoxqtuZG33FIAx6Zum5R pZCUgKuDQw7ILVbS28Fm23ZvO/JV5BFiVSjkIPYgjpilgwTo8E63f2JnGjEGMV5Em+Am EicvdrgFXu77Wymr63kzM1B+YVGJnROVBgzw61Bs7MqY3UUfmofs8r1kLVvv2XOd6hrj cTrA== X-Gm-Message-State: AOJu0Yyq/xo76ZzjnCb9uBcFMw/J7iIoLOJZTd/QUn5w9z4aYv9kuMZp xrBesIxYYWM4SbYR0sqKoAhIosNQEVG8YwYW+PmBX3S/vGA/lv+E X-Google-Smtp-Source: AGHT+IHo/Y8mtRocW5qMdbaQSvLYRtJjAkIs/mM1FZKtH6mSM5TZ70ROar/3eYpa7HvafMnmIN7c9A== X-Received: by 2002:a17:902:cecb:b0:1f2:f8b7:60cf with SMTP id d9443c01a7336-1f69390b9b3mr31437555ad.27.1717487052271; Tue, 04 Jun 2024 00:44:12 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1f6358079bdsm74836545ad.263.2024.06.04.00.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 00:44:11 -0700 (PDT) Date: Tue, 04 Jun 2024 16:44:09 +0900 (JST) Message-Id: <20240604.164409.1964339778483522274.horikyota.ntt@gmail.com> To: songlong88@126.com Cc: pgsql-hackers@postgresql.org Subject: Re: [PATCH]A minor improvement to the error-report in SimpleLruWriteAll() From: Kyotaro Horiguchi In-Reply-To: <5b5d9c66.a708.18fbf20f618.Coremail.songlong88@126.com> References: <4b07eb8f.27a6.18faf1164a5.Coremail.songlong88@126.com> <5b5d9c66.a708.18fbf20f618.Coremail.songlong88@126.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 Tue, 28 May 2024 20:15:59 +0800 (CST), "Long Song" wrote in > > Hi, > Actually, I still wonder why only the error message > of the last failure to close the file was recorded. > For this unusual situation, it is acceptable to > record all failure information without causing > too much logging. > Was it designed that way on purpose? Note that SlruReportIOError() causes a non-local exit. To me, the point of the loop seems to be that we want to close every single file, apart from the failed ones. From that perspective, the patch disrupts that intended behavior by exiting in the middle of the loop. It seems we didn't want to bother collecting errors for every failed file in that part. regards. -- Kyotaro Horiguchi NTT Open Source Software Center