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 1ncsFy-0007T1-QW for pgsql-general@arkaria.postgresql.org; Fri, 08 Apr 2022 17:18: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 1ncsFw-0005yY-PW for pgsql-general@arkaria.postgresql.org; Fri, 08 Apr 2022 17:18:44 +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 1ncsFw-0005yP-BK for pgsql-general@lists.postgresql.org; Fri, 08 Apr 2022 17:18:44 +0000 Received: from mx3.wp.pl ([212.77.101.10]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ncsFt-0000qw-R5 for pgsql-general@lists.postgresql.org; Fri, 08 Apr 2022 17:18:43 +0000 Received: (wp-smtpd smtp.wp.pl 30745 invoked from network); 8 Apr 2022 19:18:38 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1649438318; bh=ReWsPTZU6GKTj5XsY2zSwk3MkX3hwTTJLVT6finHFpg=; h=Subject:To:From; b=nJK+MmbQdnHYKx2/BhH/X1tEkBHrKloTkGMHqRiVSMWLZPBf0xGAMP+pYnMyOu4EI gY+TZltCxo/kMzmeEWdWvHk4yOuHoCH2tyMW/4HswP1JSmJj823sH/r7w7z0lMDsBO 31bV1C2GQdWIsJIML6VgHgZnfz1nl1z8sMjqZDP0= Received: from afqw167.neoplus.adsl.tpnet.pl (HELO [192.168.1.200]) (laurentp@wp.pl@[178.42.178.167]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 8 Apr 2022 19:18:38 +0200 Subject: Re: Problem with PG 11 database on OrangePi3 (ARMBIAN, ARM64) after disk disrupion (problem with USB disk connection) To: pgsql-general@lists.postgresql.org References: <9ff52fa7-a125-1225-0e23-c22f034ceb91@wp.pl> <5f2de1ce-4b22-59d1-178e-71cb6a3bfc02@wp.pl> <4a3ef3ed-7591-2195-e3a9-d7ff5e0331b6@wp.pl> <425a7834-a132-2ef8-e199-ea6c088b3ac6@aklaver.com> <8eb675fa-f4cc-361a-23c5-76657450d6e7@wp.pl> From: "W.P." Message-ID: <0b607694-8fb2-7250-4188-67672c787cd6@wp.pl> Disposition-Notification-To: "W.P." Date: Fri, 8 Apr 2022 19:18:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <8eb675fa-f4cc-361a-23c5-76657450d6e7@wp.pl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: pl X-WP-MailID: 670651ef75ca2705de9a23b492ab35ff X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000009 [APM0] List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > If it is experimental you could try pg_resetwal: >> >> https://www.postgresql.org/docs/11/app-pgresetwal.html >> > > Found this, had to use -f (program hint), but no luck. Same error. > > Is there anything else? > Problem stille here: during restore (from pg_dumpall on 11 on i386) server on OPi crashed during CREATE INDEX phase. Some indexes and triggers are missing. SQL file has 16GB... How can I prevent this in future (1), and (2) how to repair (maybe doing dump/restore again?) the "slave" database? I'd like to have a replica of my DB on laptop, especially after seeing unrecoverable crash on OPi... Laurent > [BTW my "logical restore" runs already 9h... still making indexes, DB > is not very large, on i386 ~50GB] > > > Laurent > > >> Read all the way through for the ifs/ands/buts. >> >>> If it is not possible to get rid ("somehow") of this "replication >>> error", I will do a "logic restore" -> I have similar database on my >>> laptop, so I'll get a pg_dumpall from this one, then recreate fresh >>> DB on OPi and restore from SQL. >>> >>> >>> It looks that DATA in PG DB is protected by various mechanisms very >>> well, but "dictionary data" (in this case replication data) is not >>> (as much). And in my case ext4 recovery mechanisms failed. >>> >>> This makes me logical replication more appealing. >>> >>> >>> Laurent >>> >>> >>> >> >> > > >