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 1jN4Kf-0008WR-8s for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Apr 2020 00:49:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jN4Ke-0005wD-3g for pgsql-hackers@arkaria.postgresql.org; Sat, 11 Apr 2020 00:49:12 +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 1jN4Kd-0005w5-T2 for pgsql-hackers@lists.postgresql.org; Sat, 11 Apr 2020 00:49:11 +0000 Received: from mail-qk1-x742.google.com ([2607:f8b0:4864:20::742]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jN4Kb-0002Jg-CC for pgsql-hackers@postgresql.org; Sat, 11 Apr 2020 00:49:10 +0000 Received: by mail-qk1-x742.google.com with SMTP id c63so3958953qke.2 for ; Fri, 10 Apr 2020 17:49:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=fu6l9dIF0vW+05pUEiNjNvj5WrkucnmCR8rNJ7qzah8=; b=VgomYCuUxzPYkHpQp04qpxjhondxEa4JIJSdKIdRJn35uKsLnCKqMApZia2z4eRWWH PqO1FcIwx9YT2s0JPQua5fwj6CNaSmN117GhMYg3CJh56yjqPJP8iEJ0tO/519TgYFgZ /TYAjZ9GLh9SqO4k0YfAVAdy0TsrxcLe3crAySHhWUhevVydzg1iKdn3yardpn66sBjh 8BpknY1gvaOFZJNfIS93BFfj6+/IUbUL2TPxOxa5D9wfpRa5tvK/4cjI1jPciZikrCPT rqvGW+JsYWLBif1Ykn7S4lwdfHnbr39Lwi+/KXORh4DTTePKyi55kTMF6b70ggLMX/N4 pgXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=fu6l9dIF0vW+05pUEiNjNvj5WrkucnmCR8rNJ7qzah8=; b=khRzQ4nUHWjg8yhsGS1wPJTa2BdD7G1TYoJ1Oxm2r5HQS1Aq6x+KuzEzSLo7SqfjrP moUk3lshLE5bLgr/mcN7m9LOZyNvcpt1bcepd8csvvrcmbqcv9Gvfs4/Bebs2JiI9B1l qTE3j21V/C8dNPiuFaGKNWDfa7kQ9eqYG0VgPoBM/5BoAs4NBuG0fM7s37kxLQktj/r+ 295I61i7DJJ6aVhGEM6z5vIr4fOS/ZvgRh8UEWXyqwcpor8/GZkS72DUAE0MbnG85TEv 6fGVMQeUJI4uoJJ4MaUiOCy1XspxS9HTxX58MZ9hitN2/1pjviitLpYVyK+Qg9YZjt5o TDDw== X-Gm-Message-State: AGi0PubNE5kjeVhV0Z/5zknmXiv20gSb6zPgpbd15GzEVSgjxNYQ3L5C K59nWETC3f04bFfD29YL0o2XyQ== X-Google-Smtp-Source: APiQypIG2WifE/zn1IMINrKL6DOsqvNaEqOaFYEgQ1eXAS9C+J99s5OswSm8be68NcPasKLcbFAqng== X-Received: by 2002:a05:620a:11b0:: with SMTP id c16mr6720781qkk.309.1586566147991; Fri, 10 Apr 2020 17:49:07 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id w30sm2948332qtw.21.2020.04.10.17.49.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 17:49:07 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id 418523007F5; Fri, 10 Apr 2020 20:49:05 -0400 (-04) Date: Fri, 10 Apr 2020 20:49:05 -0400 From: Alvaro Herrera To: Andres Freund Cc: Kyotaro Horiguchi , tejeswarm@hotmail.com, pgsql-hackers@postgresql.org, hexexpert@comcast.net Subject: Re: Corruption during WAL replay Message-ID: <20200411004905.GA12834@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20200330233159.af74fwkcod6y7u7k@alap3.anarazel.de> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Mar-30, Andres Freund wrote: > If we are really concerned with truncation failing - I don't know why we > would be, we accept that we have to be able to modify files etc to stay > up - we can add a pre-check ensuring that permissions are set up > appropriately to allow us to truncate. I remember I saw a case where the datadir was NFS or some other network filesystem thingy, and it lost connection just before autovacuum truncation, or something like that -- so there was no permission failure, but the truncate failed and yet PG soldiered on. I think the connection was re-established soon thereafter and things went back to "normal", with nobody realizing that a truncate had been lost. Corruption was discovered a long time afterwards IIRC (weeks or months, I don't remember). I didn't review Teja's patch carefully, but the idea of panicking on failure (causing WAL replay) seems better than the current behavior. I'd rather put the server to wait until storage is really back. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services