From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
---|---|
To: | "Imseih (AWS), Sami" <simseih(at)amazon(dot)com> |
Cc: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com> |
Subject: | Re: Track the amount of time waiting due to cost_delay |
Date: | 2024-08-20 12:48:29 |
Message-ID: | ZsSQnS9OW9EWSOk4@ip-10-97-1-34.eu-west-3.compute.internal |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On Mon, Jul 01, 2024 at 04:59:25AM +0000, Bertrand Drouvot wrote:
> Hi,
>
> On Fri, Jun 28, 2024 at 08:07:39PM +0000, Imseih (AWS), Sami wrote:
> > > 46ebdfe164 will interrupt the leaders sleep every time a parallel workers reports
> > > progress, and we currently don't handle interrupts by restarting the sleep with
> > > the remaining time. nanosleep does provide the ability to restart with the remaining
> > > time [1], but I don't think it's worth the effort to ensure more accurate
> > > vacuum delays for the leader process.
> >
> > After discussing offline with Bertrand, it may be better to have
> > a solution to deal with the interrupts and allows the sleep to continue to
> > completion. This will simplify this patch and will be useful
> > for other cases in which parallel workers need to send a message
> > to the leader. This is the thread [1] for that discussion.
> >
> > [1] https://www.postgresql.org/message-id/01000190606e3d2a-116ead16-84d2-4449-8d18-5053da66b1f4-000000%40email.amazonses.com
> >
>
> Yeah, I think it would make sense to put this thread on hold until we know more
> about [1] (you mentioned above) outcome.
As it looks like we have a consensus not to wait on [0] (as reducing the number
of interrupts makes sense on its own), then please find attached v4, a rebase
version (that also makes clear in the doc that that new field might show slightly
old values, as mentioned in [1]).
[0]: https://www.postgresql.org/message-id/flat/01000190606e3d2a-116ead16-84d2-4449-8d18-5053da66b1f4-000000%40email.amazonses.com
[1]: https://www.postgresql.org/message-id/ZruMe-ppopQX4uP8%40nathan
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Attachment | Content-Type | Size |
---|---|---|
v4-0001-Report-the-total-amount-of-time-that-vacuum-has-b.patch | text/x-diff | 8.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bertrand Drouvot | 2024-08-20 12:55:32 | Re: Restart pg_usleep when interrupted |
Previous Message | Yugo Nagata | 2024-08-20 12:30:48 | Re: define PG_REPLSLOT_DIR |