pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Rollback after "Connection timed out"?
2+ messages / 2 participants
[nested] [flat]

* Rollback after "Connection timed out"?
@ 2023-10-27 14:40 Ron <ronljohnsonjr@gmail.com>
  2023-10-27 14:45 ` Re: Rollback after "Connection timed out"? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Ron @ 2023-10-27 14:40 UTC (permalink / raw)
  To: pgsql-admin@lists.postgresql.org

Pg 9.6.24

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)?

-- 
Born in Arizona, moved to Babylonia.





^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Rollback after "Connection timed out"?
  2023-10-27 14:40 Rollback after "Connection timed out"? Ron <ronljohnsonjr@gmail.com>
@ 2023-10-27 14:45 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2023-10-27 14:45 UTC (permalink / raw)
  To: Ron <ronljohnsonjr@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2023-10-27 14:45 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-10-27 14:40 Rollback after "Connection timed out"? Ron <ronljohnsonjr@gmail.com>
2023-10-27 14:45 ` Tom Lane <tgl@sss.pgh.pa.us>

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