pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-admin@lists.postgresql.org
Subject: Re: Rollback after "Connection timed out"?
Date: Fri, 27 Oct 2023 10:45:02 -0400
Message-ID: <1552283.1698417902@sss.pgh.pa.us> (raw)
In-Reply-To: <f90c644c-790a-46a9-ae95-1a10f6423d37@gmail.com>
References: <f90c644c-790a-46a9-ae95-1a10f6423d37@gmail.com>

Ron <ronljohnsonjr@gmail.com> 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





view thread (2+ messages)

Message-ID: <1552283.1698417902@sss.pgh.pa.us>
Permalink:  ../1552283.1698417902@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1552283.1698417902@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ronljohnsonjr@gmail.com, pgsql-admin@lists.postgresql.org
  Subject: Re: Rollback after "Connection timed out"?
  In-Reply-To: <1552283.1698417902@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox