Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSpKF-0005Fd-Sb for pgsql-performance@arkaria.postgresql.org; Mon, 20 May 2019 20:56:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hSpKD-0001JB-6g for pgsql-performance@arkaria.postgresql.org; Mon, 20 May 2019 20:56:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSpKC-0001J4-QY for pgsql-performance@lists.postgresql.org; Mon, 20 May 2019 20:56:00 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hSpK9-0000vp-Q2 for pgsql-performance@postgresql.org; Mon, 20 May 2019 20:56:00 +0000 Received: by mail-wr1-x444.google.com with SMTP id m3so3136533wrv.2 for ; Mon, 20 May 2019 13:55:57 -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:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nuqP3+mbzpz7QZgxTT6ewvWpr9eciIpb9ArbfV4lwCE=; b=OB2BMRkbiHRn46jy7I28T9m5+ILykUxJ4BUc3rP/wFGLGzOLJvMVnHnbDfbFsIX78E D8W73R8Ng8Vf3sTyAMuIeIfxtzgI+S8mG0Vxy7xUOjqmLDDPwuyAuD4jFO6MlSXr3Vsw 6UJWoqugiZfhfI/0BwgniKeGjcQSbqYG80CcH3pzbvDvyoQOInFLpBCDf2hy5+eoKAH5 o8NQQaIIeYENgLF8PoTIm1+uFBrV+98UH38vHCGsZrRlI0WNq806+AvDheOAEJSyxeO0 nIbBG8LNgwPlzhbmxzyfJIRSFtjtqpo+iqpA441OLLkbIR4b7JeMzYLJm+rApRtb34Sn GuRw== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=nuqP3+mbzpz7QZgxTT6ewvWpr9eciIpb9ArbfV4lwCE=; b=GcR3vN2VHfDmrcsZZzb+Rl+13E3mfHCKG/EDdv86kTYuojtxwSrjFjhxC56rni09hC VAyEwNYdufR7kybJOTz8EUeEzavzWwsnkwyMbNvG4otUB1giZ7ao536gcabdAwfXz9sx YzoByMaNr5PYpUySB8Rva4fI89Y74m1FE2gBrYRV4TfsRNRc/YwDkY8F4UURK/vvN+Hv 6M45dsbLiCHSfTqRdvgcYIQhx7MwhR1lZ04sdLsyiGt8L7jadVDHvqtkrfGZwHYgHa/H xhz/q95s+QVIocTvkZeb70Omjp9gv9gpWtG1L4O5moX4GXnyT6FdvC4arNCJhq6ixtQ2 fL9Q== X-Gm-Message-State: APjAAAWwzB9hYDcJ3LvsiQ/40X10A/GYotbDST7ICD4WA5N+xgfy3eGn OPjd7mgXl6WMBwEw+CRMiRbFrA== X-Google-Smtp-Source: APXvYqzuIgQXV0M+Jdu2ry7EOTJ36nSNb3EpVNSVBUXs5cejJepXYyYPh/bpbt7n5xrEF6MllPUXvg== X-Received: by 2002:adf:fb47:: with SMTP id c7mr32233168wrs.116.1558385755974; Mon, 20 May 2019 13:55:55 -0700 (PDT) Received: from localhost (ip-86-49-243-43.net.upcbroadband.cz. [86.49.243.43]) by smtp.gmail.com with ESMTPSA id x2sm6563822wrs.39.2019.05.20.13.55.54 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 20 May 2019 13:55:54 -0700 (PDT) Date: Mon, 20 May 2019 22:55:53 +0200 From: Tomas Vondra To: Bimal Cc: Greg Clough , Mariel Cherkassky , "pgsql-performance@postgresql.org" Subject: Re: Trying to handle db corruption 9.6 Message-ID: <20190520205553.f5fst3zleabczf7t@development> References: <1909968146.4951657.1558369245203@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <1909968146.4951657.1558369245203@mail.yahoo.com> User-Agent: NeoMutt/20180716-1444-295967 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, May 20, 2019 at 04:20:45PM +0000, Bimal wrote: > I had ran into same issue about year back, luckily I had standby to > quickly promote. But, I wish there was better a documentation on how to > handle WAL log fill up and resetting them. pg_resetxlog is not a tool to deal with "WAL fill up". It's a last resort option to deal with corrupted WAL, and can easily make matters worse when used without due consideration. That seems to be the case here, unfortunately. On a properly behaving system, running out of disk space for pg_xlog results in database shutdown. If you also get corrupted WAL, you have bigger problems, I'm afraid. Also, data corruption issues are one-off events, mostly unique. That makes it rather difficult (~impossible) to write docs about recovering from them. And it's why there are no magic tools. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services