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 1jc7qQ-0004Vj-4k for pgsql-general@arkaria.postgresql.org; Fri, 22 May 2020 13:36:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jc7qP-0003rO-13 for pgsql-general@arkaria.postgresql.org; Fri, 22 May 2020 13:36:13 +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 1jc7qO-0003rH-PX for pgsql-general@lists.postgresql.org; Fri, 22 May 2020 13:36:12 +0000 Received: from [66.111.4.29] (helo=out5-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jc7qJ-0006Cd-Ne for pgsql-general@postgresql.org; Fri, 22 May 2020 13:36:12 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 04DF75C0144; Fri, 22 May 2020 09:35:56 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 22 May 2020 09:35:56 -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=L SvEBtsTI/kmXjfiuHU/+WUehljsuuKyoG9koxq3KUo=; b=N+9aUBYuPEeZ+Uros /Xcu+LKw+aMxqz2Xs/PpQ24/UTZr4uQwmvlDTib5wEwlCHuphsQgMCKwlNRgCtL3 UN2rtyXFGXdzY0ilL9TgLh6UK9pFTbm072PQHRHMypkgO+2oyhRWgApyvW7X/E7i i4dHEabXZEN44THyI9hGLxDkiYmPOOUztsOpqlc0H6zKm3h5qTbfF68YGJxYQ/7y oi6tlc4LUYXRCR3xl+ykD7jd+AOZwH8yYXduSQmYT4GXzyPJFDpnpXnJxV8XOz5S bE4FF0KyZ4+Bh/miji1nBFTCtYX/oFgG1Sts/0Fks3LyYEiIOhh6BbNrl/4haNCG oh1TA== 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=fm2; bh=LSvEBtsTI/kmXjfiuHU/+WUehljsuuKyoG9koxq3K Uo=; b=BUGFUs3WYf1h1dt/zzuzvnw9i5jyUMgvZE3hQn+fXsF/g4pbEExV385hc nTcNt/Q5nJWvYG2aH4YEdFRfZ5EWchAJqUCZsnWGc6r+AjsFmogMZfiaTHyJo26W fXqjKHhonV5YWN/QJ3+WIfec5p6oL5pJWS2LaFIjgXpfiHWHeo2i3KhuKjmfIYmz ZgvVH/vBArT2cSPrmsSV2MQAIJ1uAQgb+r0+5e0wL/htCaP37o2F9aY1A1HAFKn6 ypRXLwi59MN9nUjN3NSaFlRn8wTwHzEbeF+O6HAte3EIoYmYpF4AWNVBgSt9IP9B dtcw6NliaK4ZczHnaCQNS0ZgQdZ+g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddufedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthekredttdefjeenucfhrhhomheptegurhhi rghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhlrghvvghrsegrkhhlrghvvghrrdgtoh hmqeenucggtffrrghtthgvrhhnpeeivedthfeuvdehgefffeduteefueelgfeigeevleef geehveehteefheefjeetudenucffohhmrghinhepvghsrghtuhhrnhhushdrtghomhenuc fkphepjeehrddujedvrdehrddvfedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homh 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 4237D328005E; Fri, 22 May 2020 09:35:55 -0400 (EDT) Subject: Re: pg_dump crashes To: Nico De Ranter , pgsql-general@postgresql.org References: From: Adrian Klaver Message-ID: <05ef276b-5df6-81d4-d8ce-53e35443c8bb@aklaver.com> Date: Fri, 22 May 2020 06:35:54 -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 X-Host-Lookup-Failed: Reverse DNS lookup failed for 66.111.4.29 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/22/20 5:37 AM, Nico De Ranter wrote: > Hi all, > > Postgres version: 9.5 > OS: Ubuntu 18.04.4 > > I have a 144GB Bacula database that crashes the postgres daemon when I > try to do a pg_dump. > At some point the server ran out of diskspace for the database storage. > I expanded the lvm and rebooted the server. It seemed to work fine, > however when I try to dump the bacula database the postgres daemon dies > after about 37GB. > > I tried copying the database to another machine and upgrading postgres > to 11 using pg_upgrade.  The upgrade seems to work but I still get > exactly the same problem when trying to dump the database. What was the full command you used to do the pg_upgrade? > > postgres@core4:~$ pg_dumpall --cluster 11/main --file=dump.sql > pg_dump: Dumping the contents of table "file" failed: PQgetCopyData() > failed. > pg_dump: Error message from server: server closed the connection > unexpectedly > This probably means the server terminated abnormally > before or while processing the request. > pg_dump: The command was: COPY public.file (fileid, fileindex, jobid, > pathid, filenameid, deltaseq, markid, lstat, md5) TO stdout; > pg_dumpall: pg_dump failed on database "bacula", exiting > > In the logs I see: > > 2020-05-22 14:23:30.649 CEST [12768] LOG:  server process (PID 534) was > terminated by signal 11: Segmentation fault > 2020-05-22 14:23:30.649 CEST [12768] DETAIL:  Failed process was > running: COPY public.file (fileid, fileindex, jobid, pathid, filenameid, > deltaseq, markid, lstat, md5) TO stdout; > 2020-05-22 14:23:30.651 CEST [12768] LOG:  terminating any other active > server processes > 2020-05-22 14:23:30.651 CEST [482] WARNING:  terminating connection > because of crash of another server process > 2020-05-22 14:23:30.651 CEST [482] DETAIL:  The postmaster has commanded > this server process to roll back the current transaction and exit, > because another server process exited abnormally and possibly corrupted > shared memory. > 2020-05-22 14:23:30.651 CEST [482] HINT:  In a moment you should be able > to reconnect to the database and repeat your command. > 2020-05-22 14:23:30.652 CEST [12768] LOG:  all server processes > terminated; reinitializing > 2020-05-22 14:23:30.671 CEST [578] LOG:  database system was > interrupted; last known up at 2020-05-22 14:15:19 CEST > 2020-05-22 14:23:30.809 CEST [578] LOG:  database system was not > properly shut down; automatic recovery in progress > 2020-05-22 14:23:30.819 CEST [578] LOG:  redo starts at 197/D605EA18 > 2020-05-22 14:23:30.819 CEST [578] LOG:  invalid record length at > 197/D605EA50: wanted 24, got 0 > 2020-05-22 14:23:30.819 CEST [578] LOG:  redo done at 197/D605EA18 > 2020-05-22 14:23:30.876 CEST [12768] LOG:  database system is ready to > accept connections > 2020-05-22 14:29:07.511 CEST [12768] LOG:  received fast shutdown request > > > Any ideas how to fix or debug this? > > Nico > > -- > > Nico De Ranter > > Operations Engineer > > T. +32 16 38 72 10 > > > > > > > > eSATURNUS > Philipssite 5, D, box 28 > 3001 Leuven – Belgium > > > > T. +32 16 40 12 82 > F. +32 16 40 84 77 > www.esaturnus.com > > ** > > *For Service & Support :* > > Support Line Belgium: +32 2 2009897 > > Support Line International: +44 12 56 68 38 78 > > Or via email : medical.services.eu@sony.com > > > -- Adrian Klaver adrian.klaver@aklaver.com