Re: Add ps display while waiting for wal in read_local_xlog_page_guts

From: "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, sirisha chamarthi <sirichamarthi22(at)gmail(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Add ps display while waiting for wal in read_local_xlog_page_guts
Date: 2023-04-13 06:05:27
Message-ID: b2481960-4c1b-9811-3ec0-c2ab2f47de9c@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 4/13/23 4:29 AM, Tom Lane wrote:
> sirisha chamarthi <sirichamarthi22(at)gmail(dot)com> writes:
>> pg_create_logical_replication_slot can take longer than usual on a standby
>> when there is no activity on the primary. We don't have enough information
>> in the pg_stat_activity or process title to debug why this is taking so
>> long. Attached a small patch to update the process title while waiting for
>> the wal in read_local_xlog_page_guts.

Thanks for the patch!

> Any thoughts on introducing a new
>> wait event too?
>
> set_ps_display is a fairly expensive operation on a lot of platforms,
> so I'm concerned about the overhead this proposal would add. However,
> getting rid of that pg_usleep in favor of a proper wait event seems
> like a good idea.
>

+1 for adding a proper wait event.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2023-04-13 06:12:44 Re: Partial aggregates pushdown
Previous Message Drouvot, Bertrand 2023-04-13 06:02:48 Re: Add ps display while waiting for wal in read_local_xlog_page_guts