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 1mXTZU-0007Ry-3N for pgsql-general@arkaria.postgresql.org; Mon, 04 Oct 2021 19:24:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mXTZT-0008VX-3L for pgsql-general@arkaria.postgresql.org; Mon, 04 Oct 2021 19:24:19 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXTZS-0008VP-QA for pgsql-general@lists.postgresql.org; Mon, 04 Oct 2021 19:24:18 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXTZP-0002Bk-Tt for pgsql-general@lists.postgresql.org; Mon, 04 Oct 2021 19:24:18 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8EA525C0108; Mon, 4 Oct 2021 15:24:13 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 04 Oct 2021 15:24:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=7AzRRo7QBW7cj3XfKlVDg/zae+StZtnuuBQ98fd5JXc=; b=PROfRBfB xVBwtBd95KWyZ+C8uHGfkIhn3zq8ewrRFPUhwngMCHUg319ccPhDLD518YttmdY6 WjnMaZ6349DuR+F2tJuU6FWfrhwjOSPwKfyRfMpM3ZInl2mCwkzPvg5+vLqi8U3w tqeqCzCDtkTv0te18grxnfGx3FTTypV+rz5zX6DX0HlqLg4V/U46oEsX9ASpu54h AGTpBoE65A6e9UeKYNKjslxbn+YqmPoGYNywr18TYngUE/lJliDmFzVz5mHJnWLP iuNM6fO1GZOHxuX5sUFi8jAA+qYuSu2PLO3/GwI6mGMrr5rQzONEu0l/TQiDDSVM XqomCX34Yk4iJw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudelvddgudeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggugfgjsehtke ertddttdejnecuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhr vgesrghlvhhhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpedujeevjeffje evuddutedvkeeiueeitddvieelfeekveejudefgeeuvdejhfeuleenucffohhmrghinhep vghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhr gh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 4 Oct 2021 15:24:13 -0400 (EDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id B19DC2A0803; Mon, 4 Oct 2021 16:24:10 -0300 (-03) Date: Mon, 4 Oct 2021 16:24:10 -0300 From: Alvaro Herrera To: Mike Yeap Cc: pgsql-general@lists.postgresql.org Subject: Re: Postgres PANIC when it could not open file in pg_logical/snapshots directory Message-ID: <202110041924.rrlgg7yoxncb@alvherre.pgsql> 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 2021-Jun-22, Mike Yeap wrote: > I have a Postgres version 11.11 configured with both physical replication > slots (for repmgr) as well as some logical replication slots (for AWS > Database Migration Service (DMS)). This morning, the server went panic with > the following messages found in the log file: > > 2021-06-22 04:56:35.314 +08 [PID=19457 application="[unknown]" > user_name=dms database=** host(port)=**(48360)] PANIC: could not open file > "pg_logical/snapshots/969-FD606138.snap": Operation not permitted Hmm, isn't this strange? open(3) is not documented to return EPERM, which is what this error string maps to. You should definitely not mess with the PG data dir; if you do, it's your problem when things break. In this case you may not be messing with the data dir yourself, but perhaps you kernel is buggy or you have some security module that prevents the operation from working properly, or something. -- Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/