Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qwO5E-00BOdH-Nx for pgsql-admin@arkaria.postgresql.org; Fri, 27 Oct 2023 14:45:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qwO5D-00GMM4-Ay for pgsql-admin@arkaria.postgresql.org; Fri, 27 Oct 2023 14:45:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qwO5D-00GMLw-00 for pgsql-admin@lists.postgresql.org; Fri, 27 Oct 2023 14:45:07 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qwO5A-003A04-7A for pgsql-admin@lists.postgresql.org; Fri, 27 Oct 2023 14:45:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 39REj2Tj1552284; Fri, 27 Oct 2023 10:45:02 -0400 From: Tom Lane To: Ron cc: pgsql-admin@lists.postgresql.org Subject: Re: Rollback after "Connection timed out"? In-reply-to: References: Comments: In-reply-to Ron message dated "Fri, 27 Oct 2023 09:40:43 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1552282.1698417902.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Fri, 27 Oct 2023 10:45:02 -0400 Message-ID: <1552283.1698417902@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Ron writes: > On Server_A, I ran: > psql --host=blarge mydb -c "ALTER TABLE blah ..." > After about 2 hours, it displayed this message: > Could not receive data from server: Connection timed out > Connection to server was lost > And yet the ALTER TABLE (it's heavily inheritance-partitioned) is still > running on blarge.  Is it still working, or is it rolling back (which I'd > expect to be fast)? It will probably run to completion if you leave it alone. The server would only notice loss of connection when it next tries to send something to the client, which (barring error/notice messages) would be the command completion report. For next time, you might want to think about reducing the TCP keepalive interval settings. regards, tom lane