public inbox for [email protected]  
help / color / mirror / Atom feed
Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate
9+ messages / 4 participants
[nested] [flat]

* Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate
@ 2025-07-15 16:08 Tom Lane <[email protected]>
  2025-07-15 16:22 ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Erik Dobák <[email protected]>
  2025-07-15 16:27 ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate David G. Johnston <[email protected]>
  0 siblings, 2 replies; 9+ messages in thread

From: Tom Lane @ 2025-07-15 16:08 UTC (permalink / raw)
  To: Erik Dobák <[email protected]>; +Cc: David G. Johnston <[email protected]>; [email protected]

=?UTF-8?Q?Erik_Dob=C3=A1k?= <[email protected]> writes:
> On Tue, 15 Jul 2025, 16:35 David G. Johnston, <[email protected]>
> wrote:
>> Can you replicate this on a supported version of PostgreSQL?

> 14.18 is afaik supported. it is runn:ng on 14.8. so yes i could replicate
> this on a supported version.

I think what David is actually wondering about is "Qlik Data Gateway
Data Movement".  That is not our code, and if it's using a custom
logical-replication plugin then the plugin seems like the likely
thing to blame.  We have not heard reports of this happening with
our stock replication code.

			regards, tom lane






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

* Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate
  2025-07-15 16:08 Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
@ 2025-07-15 16:22 ` Erik Dobák <[email protected]>
  2025-07-15 18:27   ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
  1 sibling, 1 reply; 9+ messages in thread

From: Erik Dobák @ 2025-07-15 16:22 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: David G. Johnston <[email protected]>; [email protected]

On Tue, 15 Jul 2025, 18:08 Tom Lane, <[email protected]> wrote:

> =?UTF-8?Q?Erik_Dob=C3=A1k?= <[email protected]> writes:
> > On Tue, 15 Jul 2025, 16:35 David G. Johnston, <
> [email protected]>
> > wrote:
> >> Can you replicate this on a supported version of PostgreSQL?
>
> > 14.18 is afaik supported. it is runn:ng on 14.8. so yes i could replicate
> > this on a supported version.
>
> I think what David is actually wondering about is "Qlik Data Gateway
> Data Movement".  That is not our code, and if it's using a custom
> logical-replication plugin then the plugin seems like the likely
> thing to blame.  We have not heard reports of this happening with
> our stock replication code.
>
>                         regards, tom lane
>

hi Tom,

not sure what you mean by "plugin".

dgdm is connecting to an untempered postgres db = standard postres db
installation afaik.

did not know about plugins in postgres. how would one check if there is
some?

E

>


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

* Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate
  2025-07-15 16:08 Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
  2025-07-15 16:22 ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Erik Dobák <[email protected]>
@ 2025-07-15 18:27   ` Tom Lane <[email protected]>
  2025-07-15 18:38     ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Erik Dobák <[email protected]>
  0 siblings, 1 reply; 9+ messages in thread

From: Tom Lane @ 2025-07-15 18:27 UTC (permalink / raw)
  To: Erik Dobák <[email protected]>; +Cc: David G. Johnston <[email protected]>; [email protected]

=?UTF-8?Q?Erik_Dob=C3=A1k?= <[email protected]> writes:
> did not know about plugins in postgres. how would one check if there is
> some?

Check the pg_replication_slots view on the publisher for the slot(s)
being used for Qlik replication.  If the "plugin" column says
something other than "pgoutput" then a nonstandard plugin is being
used.

			regards, tom lane






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

* Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate
  2025-07-15 16:08 Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
  2025-07-15 16:22 ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Erik Dobák <[email protected]>
  2025-07-15 18:27   ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
@ 2025-07-15 18:38     ` Erik Dobák <[email protected]>
  2026-02-25 09:08       ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Anthonin Bonnefoy <[email protected]>
  0 siblings, 1 reply; 9+ messages in thread

From: Erik Dobák @ 2025-07-15 18:38 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: David G. Johnston <[email protected]>; [email protected]

nice thanks i will study that.
E

On Tue, 15 Jul 2025, 20:27 Tom Lane, <[email protected]> wrote:

> =?UTF-8?Q?Erik_Dob=C3=A1k?= <[email protected]> writes:
> > did not know about plugins in postgres. how would one check if there is
> > some?
>
> Check the pg_replication_slots view on the publisher for the slot(s)
> being used for Qlik replication.  If the "plugin" column says
> something other than "pgoutput" then a nonstandard plugin is being
> used.
>
>                         regards, tom lane
>


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

* Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate
  2025-07-15 16:08 Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
  2025-07-15 16:22 ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Erik Dobák <[email protected]>
  2025-07-15 18:27   ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
  2025-07-15 18:38     ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Erik Dobák <[email protected]>
@ 2026-02-25 09:08       ` Anthonin Bonnefoy <[email protected]>
  0 siblings, 0 replies; 9+ messages in thread

From: Anthonin Bonnefoy @ 2026-02-25 09:08 UTC (permalink / raw)
  To: Erik Dobák <[email protected]>; +Cc: Tom Lane <[email protected]>; David G. Johnston <[email protected]>; [email protected]

Hi,

This is likely related to the issue I've reported[1]: A logical
walsender may be stuck at 100% CPU during shutdown, trying to read an
incomplete FPI_FOR_HINT record and blocking the shutdown sequence. By
stopping the logical replication's target, the impacted walsender
exited, unblocking the shutdown.

There are similar reports of failover being stuck on projects like patroni[2].

I've provided a way to reproduce the issue in the linked thread, along
with a tentative patch.

Regards,
Anthonin Bonnefoy

[1]: https://www.postgresql.org/message-id/flat/CAO6_Xqo3co3BuUVEVzkaBVw9LidBgeeQ_2hfxeLMQcXwovB3GQ%40mai...
[2]: https://github.com/patroni/patroni/issues/3522






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

* Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate
  2025-07-15 16:08 Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
@ 2025-07-15 16:27 ` David G. Johnston <[email protected]>
  2025-07-15 18:00   ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
  1 sibling, 1 reply; 9+ messages in thread

From: David G. Johnston @ 2025-07-15 16:27 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: Erik Dobák <[email protected]>; [email protected] <[email protected]>

On Tuesday, July 15, 2025, Tom Lane <[email protected]> wrote:

> =?UTF-8?Q?Erik_Dob=C3=A1k?= <[email protected]> writes:
> > On Tue, 15 Jul 2025, 16:35 David G. Johnston, <
> [email protected]>
> > wrote:
> >> Can you replicate this on a supported version of PostgreSQL?
>
> > 14.18 is afaik supported. it is runn:ng on 14.8. so yes i could replicate
> > this on a supported version.
>
> I think what David is actually wondering about is "Qlik Data Gateway
> Data Movement".  That is not our code, and if it's using a custom
> logical-replication plugin then the plugin seems like the likely
> thing to blame.  We have not heard reports of this happening with
> our stock replication code.
>
>
>

No, I meant the reported 14.8 PG version.

The observed behavior of the server seems like a bug no matter how
well-coded or not the software trying to make the connecting is.  The
server should be able to close and disallow clients no matter what they are
doing.

David J.


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

* Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate
  2025-07-15 16:08 Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
  2025-07-15 16:27 ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate David G. Johnston <[email protected]>
@ 2025-07-15 18:00   ` Tom Lane <[email protected]>
  2025-07-15 18:28     ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate David G. Johnston <[email protected]>
  2025-07-15 18:32     ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Erik Dobák <[email protected]>
  0 siblings, 2 replies; 9+ messages in thread

From: Tom Lane @ 2025-07-15 18:00 UTC (permalink / raw)
  To: David G. Johnston <[email protected]>; +Cc: Erik Dobák <[email protected]>; [email protected] <[email protected]>

"David G. Johnston" <[email protected]> writes:
> The observed behavior of the server seems like a bug no matter how
> well-coded or not the software trying to make the connecting is.  The
> server should be able to close and disallow clients no matter what they are
> doing.

We will SIGKILL recalcitrant children during an "immediate" shutdown.
"Fast" shutdown is not defined to do that, and should not do so
because it'd imply having to do an unclean restart later.

I just tested logical replication both ways between current master and
v14 branch tip, and in either case the publishing server stops pretty
much instantaneously after "pg_ctl stop -m fast".  So I don't see
anything broken about our code, and I remain of the opinion that Qlik
is probably at fault.

			regards, tom lane






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

* Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate
  2025-07-15 16:08 Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
  2025-07-15 16:27 ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate David G. Johnston <[email protected]>
  2025-07-15 18:00   ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
@ 2025-07-15 18:28     ` David G. Johnston <[email protected]>
  1 sibling, 0 replies; 9+ messages in thread

From: David G. Johnston @ 2025-07-15 18:28 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: Erik Dobák <[email protected]>; PostgreSQL Bug List <[email protected]>

On Tue, Jul 15, 2025, 11:00 Tom Lane <[email protected]> wrote:

>
> I just tested logical replication both ways between current master and
> v14 branch tip, and in either case the publishing server stops pretty
> much instantaneously after "pg_ctl stop -m fast".  So I don't see
> anything broken about our code, and I remain of the opinion that Qlik
> is probably at fault.
>

Ok, yeah.  Looking more closely the reconnection attempt in the log doesn't
look related to this so those hung connections are not playing nicely when
told to go away.  Which indeed in fast mode we have to rely upon.

David J.


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

* Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate
  2025-07-15 16:08 Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
  2025-07-15 16:27 ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate David G. Johnston <[email protected]>
  2025-07-15 18:00   ` Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
@ 2025-07-15 18:32     ` Erik Dobák <[email protected]>
  1 sibling, 0 replies; 9+ messages in thread

From: Erik Dobák @ 2025-07-15 18:32 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: David G. Johnston <[email protected]>; [email protected]

On Tue, 15 Jul 2025, 20:00 Tom Lane, <[email protected]> wrote:

> "David G. Johnston" <[email protected]> writes:
> > The observed behavior of the server seems like a bug no matter how
> > well-coded or not the software trying to make the connecting is.  The
> > server should be able to close and disallow clients no matter what they
> are
> > doing.
>
> We will SIGKILL recalcitrant children during an "immediate" shutdown.
> "Fast" shutdown is not defined to do that, and should not do so
> because it'd imply having to do an unclean restart later.
>
> I just tested logical replication both ways between current master and
> v14 branch tip, and in either case the publishing server stops pretty
> much instantaneously after "pg_ctl stop -m fast".  So I don't see
> anything broken about our code, and I remain of the opinion that Qlik
> is probably at fault.
>
>                         regards, tom lane
>
thank you Tom,

based on the documentation mentioned in my initial post i was thinking that
the connections are closed during " fast" shutdown immediately.

i will forward this to Qlik then.

is there a better documentation that would explain the process of shutdown
than the link i posted above?

regards

E

>


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


end of thread, other threads:[~2026-02-25 09:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-07-15 16:08 Re: BUG #18985: fast shutdown does not close connections from qlik data gateway data movement aka. replicate Tom Lane <[email protected]>
2025-07-15 16:22 ` Erik Dobák <[email protected]>
2025-07-15 18:27   ` Tom Lane <[email protected]>
2025-07-15 18:38     ` Erik Dobák <[email protected]>
2026-02-25 09:08       ` Anthonin Bonnefoy <[email protected]>
2025-07-15 16:27 ` David G. Johnston <[email protected]>
2025-07-15 18:00   ` Tom Lane <[email protected]>
2025-07-15 18:28     ` David G. Johnston <[email protected]>
2025-07-15 18:32     ` Erik Dobák <[email protected]>

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