Tom Lane d958f6d19b postgres_fdw: re-issue cancel requests a few times if necessary.
Despite the best efforts of commit 0e5c82380, we're still seeing
occasional failures of postgres_fdw's query_cancel test in the
buildfarm.  Investigation suggests that its 100ms timeout is
still not enough to reliably ensure that the remote side starts
the query before receiving the cancel request --- and if it
hasn't, it will just discard the request because it's idle.

We discussed allowing a cancel request to kill the next-received
query, but that would have wide and perhaps unpleasant side-effects.
What seems safer is to make postgres_fdw do what a human user would
likely do, which is issue another cancel request if the first one
didn't seem to do anything.  We'll keep the same overall 30 second
grace period before concluding things are broken, but issue additional
cancel requests after 1 second, then 2 more seconds, then 4, then 8.
(The next one in series is 16 seconds, but we'll hit the 30 second
timeout before that.)

Having done that, revert the timeout in query_cancel.sql to 10 ms.
That will still be enough on most machines, most of the time, for
the remote query to start; but now we're intentionally risking the
race condition occurring sometimes in the buildfarm, so that the
repeat-cancel code path will get some testing.

As before, back-patch to v17.  We might eventually contemplate
back-patching this further, and/or adding similar logic to dblink.
But given the lack of field complaints to date, this feels like
mostly an exercise in test case stabilization, so v17 is enough.

Discussion: https://postgr.es/m/colnv3lzzmc53iu5qoawynr6qq7etn47lmggqr65ddtpjliq5d@glkveb4m6nop
2025-02-25 19:41:19 +00:00
2025-02-07 16:53:29 +00:00
2025-02-18 08:23:36 +00:00
2024-09-25 20:45:09 +01:00
2019-12-18 09:13:13 +01:00
2025-01-07 20:43:59 +00:00
2020-02-10 20:47:50 +01:00
2025-01-07 20:43:59 +00:00

Percona Server for PostgreSQL

Percona Server for PostgreSQL is a free, enhanced, fully compatible, open source, drop-in replacement for the PostgreSQL Database Management System with enterprise-grade features. It requires no changes to PostgreSQL applications or code.

PostgreSQL is an advanced object-relational database management system that supports an extended subset of the SQL standard, including transactions, foreign keys, subqueries, triggers, user-defined types and functions. This distribution also contains C language bindings.

Copyright and license information can be found in the file COPYRIGHT.

General documentation about this version of Percona Server for PostgreSQL can be found at https://docs.percona.com/postgresql/17/. In particular, information about building PostgreSQL from the source code can be found at https://docs.percona.com/postgresql/17/installing.html.

Submit a bug report or a feature request

If you find a bug in Percona Server for PostgreSQL, you can submit a report to the project's Jira issue tracker

As a general rule of thumb, please try to create a bug report that is:

Reproducible - include the steps on how to reproduce the issue

Specific - include as much detail as possible, such as which version, which environment, etc.

Unique - do not duplicate existing tickets

Scoped to a single issue - only one issue per report

Description
he World's Most Advanced Open Source Relational Database.
Readme 744 MiB
Languages
C 85.3%
PLpgSQL 6%
Perl 4.4%
Yacc 1.2%
Meson 0.7%
Other 2.2%