| From: | "Aya Iwata (Fujitsu)" <iwata(dot)aya(at)fujitsu(dot)com> |
|---|---|
| To: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Michael Paquier <michael(at)paquier(dot)xyz> |
| Subject: | Re: BGWORKER_INTERRUPTIBLE workers are never restarted after DROP/ALTER/CREATE DATABASE |
| Date: | 2026-11-06 12:50:22 |
| Message-ID: | OS9PR01MB12439C86317C1147325396856EA762@OS9PR01MB12439.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello Parragi
Thank you for suggesting this improvement.
I agree that if the database remains after the command is executed,
the terminated bgworker should reconnect.
However, in the proposed implementation, the system would attempt to reconnect
multiple times even if the DROP operation succeeds. I think this point requires
further discussion.
If the `DROP DATABASE` command succeeds, almost all worker creators would likely
not want to reconnect. In that case, I believe this should be handled as a core
feature rather than left to an extension.
In the case of the DROP command, I think users would not want to reconnect to
the database regardless of whether it succeeds or fails. This is because I think
users whose DROP attempt failed would simply try the DROP command again.
If the database is going to be deleted anyway, they likely wouldn't want to reconnect.
On the other hand, in the case of ALTER DATABASE,
if the database ID does not change regardless of the command's result, it might
be useful for the bgworker to reconnect.
Regards,
Aya Iwata
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ilia Evdokimov | 2026-11-06 13:17:01 | Re: Show 'Rows Removed by Filter' with two fractional digits in EXPLAIN |
| Previous Message | Rushabh Lathia | 2026-11-06 12:44:03 | Re: ORDER BY ALL |