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 1m0620-0003ET-E3 for pgsql-general@arkaria.postgresql.org; Sun, 04 Jul 2021 17:35:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m061w-0006UH-GH for pgsql-general@arkaria.postgresql.org; Sun, 04 Jul 2021 17:35: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 1m061v-0006U8-7x for pgsql-general@lists.postgresql.org; Sun, 04 Jul 2021 17:35:44 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m061m-0002qI-By for pgsql-general@lists.postgresql.org; Sun, 04 Jul 2021 17:35:42 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id F14105C0071; Sun, 4 Jul 2021 13:35:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Sun, 04 Jul 2021 13:35:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=r 1zRPNSv8y/yKRupDUStWGTW+X2nxRFcWL/aQftrAqA=; b=sB7jQjUspYpwGEVdd L7cFbYbdYQ5GztmQsMFQXYr5G/pJi/hQ5/yL+9tgZq7yYsZFXjqGJbq0oUMZAbTt Q7M6Xm1RjOIcVBSl+FfykMQiAZ2lvOXWo8bY4bMF5glXBAKa6+w7PIvndFo2qfi9 NcclvxIoD7sKkJr4XIApVXeDapdexvbzjkXOLm4oG7aRbR+rDl5XRMZEE5hDlNwl ef2CQc3KpJOahNBfqkYG+KWNDtbxFVZdI3ALXms4XUkRRb2lNkft31lP4REjVusG tDSjFmizFiqLNkMoBZYIyIKUzEHGHgdjyzhcm+Rpn08rLcfdnJ48ohnePn2NJlcz zxd9A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=r1zRPNSv8y/yKRupDUStWGTW+X2nxRFcWL/aQftrA qA=; b=TW8j9xdi4c9jx3enYuLAMtf6421f92eBF+pLZj+4sMBm30dE0SPNXvEjS 9/49GjFuYzIl3xQPYwbuW4AZ4zKr0LERvkLG1kTbYax7j/sURp98thc+QY4yzbOR CNFT1ovEvwxie9WCfSH7BsXyTFJ1jID1DghtfbMlJwsl7unFsKdknYxL34xLxVVN 4q6WeS2d0YxtdLv5TjqHDzAfGK+aVDxWbKPkKehPVPNLF2fpa15Hbo6OxqymNdpT XruG8paEJ6woo6vyUnCGScG1RbdF7xKlb4L8jbh3EamAGX51lwH/aCsxXG+sobpI cLmCWp15/RQM45zw4MoP0esxZKGIA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeejvddguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesth ekredttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdr khhlrghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeduudefje etveffhefgudehtdfhvdetkeeiueehfeevveduteekleeuheegudehhfenucffohhmrghi nhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrg hrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdr tghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 4 Jul 2021 13:35:29 -0400 (EDT) Subject: Re: Damaged (during upgrade?) table, how to repair? To: "W.P." , pgsql-general@lists.postgresql.org References: <7a242c24-6bc7-2800-a857-6fbe8633382b@wp.pl> <0c827ef91e60470588d5ff4fe4394abb2ec8509d.camel@cybertec.at> <7775fcc7-b41a-394f-3c58-8960b23dee40@wp.pl> From: Adrian Klaver Message-ID: <2b4db53d-6420-e152-b4d4-9718d0f7c12e@aklaver.com> Date: Sun, 4 Jul 2021 10:35:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 7/4/21 9:33 AM, W.P. wrote: > 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. To be clear the 1TB disk is working where and with what OS? > > > 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). For future reference you can could have gone from 9.5 -> 11 without the intermediate upgrades. Also where were you installing Postgres from the Fedora or Postgres repos? > > > Now I did my crazy move, removed battery and power while "suspend to > RAM". OS (F24! @ 1TB) don't start anymore (beyond "emergency"). I will reserve comment on that move. Still in future it would be prudent to do a pg_dump and stash the backup somewhere off machine before you do that sort of experiment. > > I use now this upgraded disc (500GB), copying files for daily work from > 1TB one attached to OPi4. What I understand from the above is you are copying files from the 1TB disk to the 500GB disc to work with on the 500GB disk/machine. Am I correct? > > 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 that case you will be using 9.5 pg_dump(all) to do the dump, Assuming it works it is not guaranteed that it will restore forward to Postgres 11. >> >> 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? The default for a source compile install is /usr/local/pgsql(https://www.postgresql.org/docs/11/install-procedure.html). I would stick with that if for no other reason then helping identifying your package and source clusters. > > >>> >>> (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. So those where the intermediate updates as you hopped through the OS/Postgres versions. > > > Laurent > > > -- Adrian Klaver adrian.klaver@aklaver.com