From: Ashutosh Bapat <ashutosh.bapat....@gmail.com> > Using pg_cancel_backend() and pg_terminate_backend() a DBA can cancel > running query from any backend or terminate a backend. For either to > work the backend needs to be interruptible. IIRC, Robert had made an > effort to make postgres_fdw interruptible few years back.
Yeah, I know those functions. Sawada-san was talking about Ctrl + C, so I responded accordingly. Also, how can the DBA find sessions to run those functions against? Can he tell if a session is connected to or running SQL to a given foreign server? Can he terminate or cancel all session with one SQL command that are stuck in accessing a particular foreign server? Furthermore, FDW is not cancellable in general. So, I don't see a point in trying hard to make only commit be cancelable. Regards Takayuki Tsunakawa