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 1gxGHV-0007f4-OM for pgsql-general@arkaria.postgresql.org; Fri, 22 Feb 2019 19:14:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gxGHT-0004o7-G9 for pgsql-general@arkaria.postgresql.org; Fri, 22 Feb 2019 19:14:43 +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 1gxGHT-0004o0-5H for pgsql-general@lists.postgresql.org; Fri, 22 Feb 2019 19:14:43 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gxGHM-0002Sw-V8 for pgsql-general@postgresql.org; Fri, 22 Feb 2019 19:14:42 +0000 Received: by mail-lf1-x12e.google.com with SMTP id h10so2514458lfc.12 for ; Fri, 22 Feb 2019 11:14:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=hQJCzLypHiWwdKimJoJZuGrZWxaK3yXz9GQvFzu+Kz0=; b=ntazigUkOfIRVGqg2o/N12m7v0m2nGvUQfD0SZRitoPDz4Pg/wIwzG3Muor8NyRd+9 QhJjIKBYQwAtGcJ40vYBw3zEA7hAFuaKvCCNYrcZZMXzsLfF+JKdyWM74A/uJF/iBEw4 eVJQ58Xp5AehHyPKRg8NkAhBt54h/79NFCdEGPxMka6/Z4bEBk83Cjx0ZqzLoL3xkxfE kuGQNECpLzFz7lZ+eaDs34NnYq1IAiduufoRqUEhmrT8TrmsPXzqNUWSSX5NTF7txnFe cntF2+xJycm2VRyaDIrAUPO41jphpdFKeorsZIe5gQMa1fHInSBKA/+61kTfPp2zqfhg 6Tjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=hQJCzLypHiWwdKimJoJZuGrZWxaK3yXz9GQvFzu+Kz0=; b=LJyO5vwRiOJfrWNib+EpfrbXTW1NDpPgwY+R85WXapQGmvxtnGtv7z8kf5exTQG3DT 8fLFHkg10Gvh+rQ194Gnu8eDNAwBluVhyfMQt1uRDBiU3a2XNtPRWyvRIXPV8JrKLmtu Rht5pJalZi8xLCZCcwEZNRqcSmE8gIbHocRezuTZkiHxkNQPE0fRfVDRVmwyzt6qsH6e xxFnuTFN2iCUYv7UCu9KNf8Ir0OzRAONRGt/CVxla1D36rAQGB41lodeMjoREnpeAZY0 CN1xdzMJACIGzR4KZkiUP5KGx0STYJZtsbO15fO8f0z3vgxsGvTxgQRvm7gC+oJCdkEA /UwA== X-Gm-Message-State: AHQUAuaCckGUvk3h26fwfN1X4DvfpG7CXrzdx9cPRWJ/pQLn1WTJ6p5Y GSeSPi0bxINif+9wuX5sez8zrjtknCc= X-Google-Smtp-Source: AHgI3Ib6LSG3Jl/zr2DhZux0uGn5GJuT7V+XO1gal3BaPDE33lGvYhmBhC447W0+geaUdFuCYcA8Vw== X-Received: by 2002:ac2:520f:: with SMTP id a15mr3384994lfl.110.1550862875541; Fri, 22 Feb 2019 11:14:35 -0800 (PST) Received: from seb ([185.89.15.66]) by smtp.gmail.com with ESMTPSA id h12sm798013lfc.54.2019.02.22.11.14.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Feb 2019 11:14:34 -0800 (PST) From: Sergey Burladyan To: pgsql-general@postgresql.org Subject: Re: Running from 9.6 backups sometimes fails with fatal error References: <87a7ipe3xx.fsf@gmail.com> Date: Fri, 22 Feb 2019 22:14:32 +0300 In-Reply-To: <87a7ipe3xx.fsf@gmail.com> (Sergey Burladyan's message of "Thu, 21 Feb 2019 15:11:54 +0300") Message-ID: <8736ofeiuf.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I started trying to debug backup with minimal WALs for achieve consistency, it is from 'server 2' and it only needs 20 WAL files. It error was: ERROR: xlog flush request 44B/7E5DAB28 is not satisfied --- flushed only to 44B/7305B560 CONTEXT: writing block 0 of relation base/16506/16891_vm === backup_label === START WAL LOCATION: 44B/6002F280 (file 000000010000044B00000060) CHECKPOINT LOCATION: 44B/7305B4F0 BACKUP METHOD: streamed BACKUP FROM: standby START TIME: 2019-02-13 03:19:54 MSK LABEL: pg_basebackup base backup === controldata === Database cluster state: in archive recovery pg_control last modified: Wed 13 Feb 2019 03:19:54 AM MSK Latest checkpoint location: 44B/7305B4F0 Latest checkpoint's REDO location: 44B/6002F280 Latest checkpoint's REDO WAL file: 000000010000044B00000060 Time of latest checkpoint: Wed 13 Feb 2019 02:19:36 AM MSK Minimum recovery ending location: 44B/7305B560 I scan all *_vm files in DB 16506 for pages with LSN bigger than 'Minimum recovery ending location' and find three files: base/16506/190024_vm 0000000 44B/9411F5C0 base/16506/190005_vm 0000000 44B/94121DE8 base/16506/16891_vm 0000000 44B/7E5DAB28 Then I parse (pg_xlogdump) all this 20 WALs, needed for consistency and search for this three oid, for 190024 and 190005 I found VISIBLE WAL record: === $ grep 190024 wals-text | grep VISIBLE === rmgr: Heap2 len (rec/tot): 64/ 8256, tx: 0, lsn: 44B/651EDAE8, prev 44B/651EDA58, desc: VISIBLE cutoff xid 752732359 flags 1, blkref #0: rel 1663/16506/190024 fork vm blk 0 FPW, blkref #1: rel 1663/16506/190024 blk 0 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 44B/6B19A6E8, prev 44B/6B19A658, desc: VISIBLE cutoff xid 752734764 flags 1, blkref #0: rel 1663/16506/190024 fork vm blk 0, blkref #1: rel 1663/16506/190024 blk 0 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 44B/71194D40, prev 44B/71194CB0, desc: VISIBLE cutoff xid 752737874 flags 1, blkref #0: rel 1663/16506/190024 fork vm blk 0, blkref #1: rel 1663/16506/190024 blk 0 === $ grep 190005 wals-text | grep VISIBLE === rmgr: Heap2 len (rec/tot): 64/ 8256, tx: 0, lsn: 44B/651F3728, prev 44B/651F36C8, desc: VISIBLE cutoff xid 752732355 flags 1, blkref #0: rel 1663/16506/190005 fork vm blk 0 FPW, blkref #1: rel 1663/16506/190005 blk 0 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 44B/6B19AE80, prev 44B/6B19AE20, desc: VISIBLE cutoff xid 752732667 flags 1, blkref #0: rel 1663/16506/190005 fork vm blk 0, blkref #1: rel 1663/16506/190005 blk 0 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 44B/6B19CF10, prev 44B/6B19AEC0, desc: VISIBLE cutoff xid 752734752 flags 1, blkref #0: rel 1663/16506/190005 fork vm blk 0, blkref #1: rel 1663/16506/190005 blk 1 rmgr: Heap2 len (rec/tot): 59/ 59, tx: 0, lsn: 44B/711954D8, prev 44B/71195478, desc: VISIBLE cutoff xid 752737869 flags 1, blkref #0: rel 1663/16506/190005 fork vm blk 0, blkref #1: rel 1663/16506/190005 blk 0 But I did not find in parsed WALs anything about vm fork for 16891. Is it OK, or is something wrong here? PS: I try to remove all problematic visibility maps, with page LSN bigger than 'Minimum recovery ending location') and start backup without it. Without it postgres started successfully. -- Sergey Burladyan