Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jHBgG-0007M4-Ea for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Mar 2020 19:27:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jHBgF-0007cb-4C for pgsql-bugs@arkaria.postgresql.org; Wed, 25 Mar 2020 19:27:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jHBgE-0007Y8-Ob for pgsql-bugs@lists.postgresql.org; Wed, 25 Mar 2020 19:27:10 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jHBgC-0002AU-6f for pgsql-bugs@lists.postgresql.org; Wed, 25 Mar 2020 19:27:09 +0000 Received: by mail-wm1-x342.google.com with SMTP id m3so4234295wmi.0 for ; Wed, 25 Mar 2020 12:27:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=maR423ox3uM7WkZtwOARr+4jF6FIt1C7SgSfWTHHkAc=; b=K/vrHWQ6gSSz7GjKSg04L7oGsMsPVzKETN1kFqAM80DEydYPiCG/KMHPJEzYwgSv0D NzmRcpd+A8NvyfVrQlRm+2z42VULilEnzn1pTg+uQ5fvEUUVNNDf1dWTnHEsY5T1b2rO XxIkE/NDc/IpgHktH3RX8/Xk0scHUiBXmCcJgfThCP8/7M1FNiv4P9T8fux2fbqf9c8G C+wpwQMv8CvtSVkdmZg3IitWszqpJrDICaY4T5is8fp+I5TFHPhv0sVI6WCcK9UCLjXv MfvVfGYS8nJofWcTBUU8ES45QNsX1ZtJXEpF/XnPQtaJ/AphUH/sBnvs7x42MvM/nC3i 2D8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=maR423ox3uM7WkZtwOARr+4jF6FIt1C7SgSfWTHHkAc=; b=N4E8aqDiCOHQr4UezQo9PzrXDwm26ut9GyoxfnzbJoW7ifB761xvRin5mph2qdEAo9 NbwvE0YJFAKnQ8IZy67PhBDXtWcai4pfsJrO80QEZfFhBsrlIgj0OkU7tOUwEzlMshWW 1qmODOSDOg0pOVC++r97xBCcV4eBWYLQ053B/pwkNOd37i2A44cwNfiotjHCswOhVNdf 8rZerWemGEdOhiSxFz8xCUNhEV40HiubJ6BD13e0IcuolAPv+Fw6pP6b2wYGNuUs5wgP tK9DlLZF8TSwF7TCZjEZArkcxZkL6nzR6UcI9IBWtVq3oXbF2d0tsusydETESpAwNjyv QorQ== X-Gm-Message-State: ANhLgQ3AmQygz4S0/lWqdyRdsd5C2rAUiYyKoQmtGvf4c1SNDv3vxTUf psjqxAc5KIyurK8rQpXu7WqnpA== X-Google-Smtp-Source: ADFU+vvtqy2pZr90R9aMjEML9QPqSi+i/ouiNS9+FXTknEthSaSkGeD37i8mHbzsbHnE5/Mgm2mhbw== X-Received: by 2002:a7b:c194:: with SMTP id y20mr4726795wmi.163.1585164426855; Wed, 25 Mar 2020 12:27:06 -0700 (PDT) Received: from localhost (ip-86-49-253-141.net.upcbroadband.cz. [86.49.253.141]) by smtp.gmail.com with ESMTPSA id z21sm45494wmf.28.2020.03.25.12.27.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 12:27:06 -0700 (PDT) Date: Wed, 25 Mar 2020 20:27:04 +0100 From: Tomas Vondra To: boli9301@163.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16316: The application has lost the database connection: Message-ID: <20200325192704.ljvn4tgcjrnl76qu@development> References: <16316-19aad78ae94264dd@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <16316-19aad78ae94264dd@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On Tue, Mar 24, 2020 at 05:46:33PM +0000, PG Bug reporting form wrote: >The following bug has been logged on the website: > >Bug reference: 16316 >Logged by: bo li >Email address: boli9301@163.com >PostgreSQL version: 12.2 >Operating system: mac os 10.15 >Description: > >I used a PostgreSQL 12 to storage my data. I use python to connect my SQL >and query my SQL to export the csv file. When I want to query the table with >500MB, there will be an error that shows the The application has lost the >database connection. If I truncate this table, it's ok. I wonder how to fix >this problem. Thank you > It's impossible to answer this question, because it's impossible to say what's the root cause - it might be a failure at the application level, it might be a PostgreSQL issue, or something entirely different. You have to check if there's an error written into the PostgreSQL server log, for example. If there is some relevant info, post it here. It also helps to say which python drivers you're using, what's the exact error message you get, show some code so that we can try reproducing the issue, etc. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services