From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: Make wal_receiver_timeout configurable per subscription |
Date: | 2025-05-19 21:46:34 |
Message-ID: | aCumuj3V5geOw8YV@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, May 19, 2025 at 11:19:48AM -0400, Robert Haas wrote:
> The advantage of Fujii-san's proposal is that it is very simple to
> implement. A subscription option would indeed be better, but it would
> also be considerably more complex. Why not start simple and if someone
> wants to do the work to add something more complicated, that is fine?
Logically, adding that as an option of CREATE SUBSCRIPTION would just
be a duplication of what a connection strings are already able to do
with "options='-c foo=fooval'", isn't it?
It seems to me that the issue of downgrading wal_receiver_timeout to
become user-settable is if we're OK to allow non-superusers play with
it in the code path where it's used currently. Knowing that physical
WAL receivers are only spawned in a controlled manner by the startup
process, this does not sound like an issue.
How about logical WAL receivers, though? These are spawned by
pgoutput, but allowing wal_receiver_timeout could allow one to load
the value they want in a non-superuser context, especially in the
context of function calls (for example in the context of an index,
constraint validation, etc.). So it seems to me that the real
question is deciding if we'd be OK with that. I think that we're
actually OK here because this GUC is only used in the main apply
loops, where the GUC should be reset to its original value once we're
done applying a single logical change.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2025-05-19 21:52:52 | Re: Prevent an error on attaching/creating a DSM/DSA from an interrupt handler. |
Previous Message | Nathan Bossart | 2025-05-19 21:31:57 | Re: Statistics Import and Export |