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 1m054E-000181-3X for pgsql-general@arkaria.postgresql.org; Sun, 04 Jul 2021 16:34:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m054C-0000DN-Gr for pgsql-general@arkaria.postgresql.org; Sun, 04 Jul 2021 16:34:00 +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 1m054C-0000DE-3w for pgsql-general@lists.postgresql.org; Sun, 04 Jul 2021 16:34:00 +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 1m0545-0002K1-BZ for pgsql-general@lists.postgresql.org; Sun, 04 Jul 2021 16:33:59 +0000 Received: (wp-smtpd smtp.wp.pl 17875 invoked from network); 4 Jul 2021 18:33:49 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1625416429; bh=P6OwExbY6nU9Sxo5hKqQiApk0J54uzMdLxugkiISC8Y=; h=From:Subject:To; b=ckkr3ynYlMmZpIrehdPISR3K2vtIrWHp9GTiPzjTAmC8DQMWpzTUD0UASZn65WIdu GZ5i0LZuGMtKAzLxzyytbns3hbA/ZTnFknUH0/211ArbO33VSQpxJ/aotq+mh5WAv6 sg+7HofR+okSSDamdjTZ2QefHBTbIQvBPwCRQt3Q= Received: from afqv86.neoplus.adsl.tpnet.pl (HELO [192.168.1.210]) (laurentp@wp.pl@[178.42.177.86]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 4 Jul 2021 18:33:49 +0200 From: "W.P." Subject: Re: Damaged (during upgrade?) table, how to repair? To: pgsql-general@lists.postgresql.org References: <7a242c24-6bc7-2800-a857-6fbe8633382b@wp.pl> <0c827ef91e60470588d5ff4fe4394abb2ec8509d.camel@cybertec.at> <7775fcc7-b41a-394f-3c58-8960b23dee40@wp.pl> Message-ID: Disposition-Notification-To: "W.P." Date: Sun, 4 Jul 2021 18:33:49 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-WP-MailID: b347ed27322328c4439291a002d8e6b2 X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000009 [cDM0] List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk W dniu 02.07.2021 o 21:05, Adrian Klaver pisze: > On 7/2/21 10:18 AM, W.P. wrote: >> W dniu 02.07.2021 o 17:16, Adrian Klaver pisze: > >>> >>> So you have backup of the failed machine's disk stored somewhere else? >> >> >> No, I have disc from this machine, looks not damaged (random files). >> Only problem that OS does not boot beyond "emergency mode". > > I would say your second sentence contradicts your first. Nope ;). There was 1 500GB disc, with Fedora24 and Postgres 9.5. Then copied "sector by sector" (and resized partitions, volumes, fs) to 1TB one. This was my "working" disc. For test, now I have put it (500GB) in another laptop, then upgraded F24 to F30 (step by step, once I had to do manually "pg_upgrade", ARAIR this was at PG10->PG11 step). Now I did my crazy move, removed battery and power while "suspend to RAM". OS (F24! @ 1TB) don't start anymore (beyond "emergency"). I use now this upgraded disc (500GB), copying files for daily work from 1TB one attached to OPi4. Will try, if I can achieve PG9.5 run on that "non working" one. If so, and dumpall is OK, then files on this are mainly intact (except for NetworkManager)... > > In any case, we got to this point as the upgrade(more information on > how that was done would be nice) from the 9.5 instance to 11.12 > failed. Given that there is good chance that was due to corruption of > files in the Postgres cluster on the above disc, it is very probable > that going back to that disk will repeat the problem. Still see more > below. > I did a "step-by-step" OS upgrade using dnf, and (once) manual pg_upgrade (when there was no "automatic" upgrade, db failed to start). > >> >>> >>> Otherwise how are you going to get the 9.5 instance to the new machine? >>> >> In modern Postgres I've seen there is possibility to have several >> (different versions) "clusters" on same machine. >> >> My question (for now) is how to do it? > > I'm going to say the easiest way to do this on the new machine would > be to build 9.5 from source: > > https://www.postgresql.org/docs/9.5/installation.html > > https://www.postgresql.org/ftp/source/v9.5.25/ > > This will require installing development packages on your new machine. > Ok, should be easy :) But what PREFIX should I use during configure step? "/usr/lib/postgresql/"? And what about location of config files? >> >> (I can see PG10 somewhere in /usr/pgsql/postgresql-10/ - bin, lib, >> share, postgresql-9.6 is empty). > > Where do you see the above, old machine or new machine? > 500GB disc, after system upgrade. Laurent