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 1jcAHU-0000RJ-B0 for pgsql-general@arkaria.postgresql.org; Fri, 22 May 2020 16:12:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jcAHT-0003mj-78 for pgsql-general@arkaria.postgresql.org; Fri, 22 May 2020 16:12:19 +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 1jcAHR-0003kA-9z for pgsql-general@lists.postgresql.org; Fri, 22 May 2020 16:12:18 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jcAHM-0007oc-39 for pgsql-general@postgresql.org; Fri, 22 May 2020 16:12:16 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 4E3BB5C00A5; Fri, 22 May 2020 12:12:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 22 May 2020 12:12:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=E BetLWbr2tBYSZ49NgWudTxYjxXanUk60ORSWk4cuS4=; b=QAusqqtdY1qg5xK5U N9igdWwmWIZovJNNpDHwO1rpvJQdDuVQ+eg0djfri3SJ7/tCG10akRnFvNzr/05e e1ecXLV90DJrdlKv7n3nUCzrlwXKCbI3IhWKnQ/Cs++ygk4sdvtrhV6WCiuxMS1h xd6P9bGp3SckQNepawp6T97nukFEDzeR8D4pr9Hkqx8Yx+ZAf44EMRNq4kDW3xXu vKdTLrOsnD/eReZzuRthXE2LArOGt9Wt/ZQUynYK8V1UItWkH0NxWsMc4FAAOd9B /OnzFz0Ud/wq4I2qHRgFV8MzT848oZjRRbfg2hAkqwSDnxdZ+aGUxAVCegzJ8ZUF cELBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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=fm2; bh=EBetLWbr2tBYSZ49NgWudTxYjxXanUk60ORSWk4cu S4=; b=sbAWgxhwkiVYwTsRYyRki/bEgbWZUYxnuq5QJb8gGQUXIzy2dEfFtL5uy ym1t0LtBc0XxFx2fiXkhJxwhHyugUvjqE+lLjVE41qqiTv2C2kje1lA8RbCLl6Fq vCQ3d8/cFQraxiSCe5PEjgLWZAKBq4r7yBoyBigC8CBu0ZwxDq8WLvb7BZyuyY1x 2xZOVQP9jVhH8xeM43ZxcWX5+2m8LjU96WLaKmswVBSfE92vsHYPJ5KmPb75JWZp YkCrRwuGpmTEs8GYdog5YjgZ+XmH+2PBLNHfFixMlroHDRpNPykzsQmmogNYNB4S b946UTxpTZWtmFOHnoKaC6x17ZIrA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddufedgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeegfeeuffeuffdvuedtueetieejgffhfeelffduvedu vefhffehveduteefveetgfenucffohhmrghinhepsggrtghulhgrrdhorhhgnecukfhppe ejhedrudejvddrhedrvdefudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtohhm X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 8E65C328005D; Fri, 22 May 2020 12:12:08 -0400 (EDT) Subject: Re: pg_dump crashes To: Nico De Ranter Cc: pgsql-general@postgresql.org References: <38072bf3-a3dc-2a4c-21d3-a024a2dfce8b@aklaver.com> <5655d83a-85ff-e8c0-0547-828aca12db39@aklaver.com> <3e14f4f4-342f-c7bf-8ec4-af348b0c8172@aklaver.com> From: Adrian Klaver Message-ID: <3be72c4c-8f8a-e01e-4338-b5bab1253332@aklaver.com> Date: Fri, 22 May 2020 09:12:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.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: Precedence: bulk On 5/22/20 8:17 AM, Nico De Ranter wrote: > > > On Fri, May 22, 2020 at 5:14 PM Adrian Klaver > wrote: > > On 5/22/20 8:05 AM, Nico De Ranter wrote: > > > > > > >     Assuming the above matches: > > > >     COPY public.file (fileid, fileindex, jobid, pathid, filenameid, > >     deltaseq, markid, lstat, md5) > > > >     the '????????????????????' would be for the md5 field. I'm > going to say > >     that is important. > > > > > > But that would be content of the database only. The should matter > for > > the application but not for a dump of the database, right? > > Also what does: > > \d public.file > > show? > > In particular are there any triggers on the table? > > > bacula=# \d public.file >                                  Table "public.file" >    Column   |   Type   | Collation | Nullable |               Default > ------------+----------+-----------+----------+-------------------------------------- >  fileid     | bigint   |           | not null | > nextval('file_fileid_seq'::regclass) >  fileindex  | integer  |           | not null | 0 >  jobid      | integer  |           | not null | >  pathid     | integer  |           | not null | >  filenameid | integer  |           | not null | >  deltaseq   | smallint |           | not null | 0 >  markid     | integer  |           | not null | 0 >  lstat      | text     |           | not null | >  md5        | text     |           | not null | > Indexes: >     "file_pkey" PRIMARY KEY, btree (fileid) >     "file_jobid_idx" btree (jobid) >     "file_jpfid_idx" btree (jobid, pathid, filenameid) > > > > Following up on the max(bigint), I tried > >    SELECT md5 FROM public.file where fileid >2087994666; > > and got > >    ERROR:  compressed data is corrupted > > So it does look like those entries are killing it.  Now for the > million-dollar question: how do I get them out? This is a Bacula table and I'm guessing you are using: https://www.bacula.org/9.6.x-manuals/en/main/Configuring_Director.html#11585 signature=MD5 An MD5 signature will be computed for all files saved. Adding this option generates about 5% extra overhead for each file saved. In addition to the additional CPU time, the MD5 signature adds 16 more bytes per file to your catalog. We strongly recommend that this option or the SHA1 option be specified as a default for all files. Maybe you can ask the Bacula folks how that is actually calculated and test that on row, to see if you can overwrite the bad data. > > Nico > > -- > -- Adrian Klaver adrian.klaver@aklaver.com