Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lcIWN-0001Tx-8w for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Apr 2021 02:04:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lcIVq-0003c0-HJ for pgsql-bugs@arkaria.postgresql.org; Fri, 30 Apr 2021 02:04:14 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lcIVq-0003bn-Ay for pgsql-bugs@lists.postgresql.org; Fri, 30 Apr 2021 02:04:14 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lcIVi-00073b-T4 for pgsql-bugs@postgresql.org; Fri, 30 Apr 2021 02:04:11 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 6C17325F74C55 for ; Thu, 29 Apr 2021 19:04:05 -0700 (MST) Date: Thu, 29 Apr 2021 19:04:05 -0700 (MST) From: chenyanfei To: pgsql-bugs@postgresql.org Message-ID: <1619748245262-0.post@n3.nabble.com> Subject: syslogger file descriptor question 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 When I start the postgres with -l parameter, I find the logger process redirect to the specified log file. The fd:1 and fd:2 point to the log file. And If we delete the file because of the file is too big, it'll be shown as the deleted file, which cause file descriptor leak. When I delete the regular file, it will close the old file and reopen the new file when rotate the log file. Although this problem is not very serious, it has caused a lot of confusion to our customers. So I think if I redirect all to /dev/null whether have any problems. -- Sent from: https://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html