From: lz ma <ma100@hotmail.com>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Would postgresql add a pg_sleep_backend() method
Date: Thu, 3 Nov 2022 11:43:44 +0000
Message-ID: <TYWP286MB3002665D92D54B7EB10F42EBF2389@TYWP286MB3002.JPNP286.PROD.OUTLOOK.COM> (raw)
Postgresql already pg_cancel_backend and pg_terminate_backend which will stop a backend.
Sometimes the system is busy (e.g. disk IO) for a long time, but I don’t want to stop each backend
If postgres has a sleep method, I may let some pid just sleep a few times, so disk busy may decend
and the most import backend may run faster.
Backend1 -----disk busy 99% Backend1 -----disk busy 99%
Backend2 -----disk bush 99% pg_sleep_backend(1, 10min) Backend2 -----disk busy 0%
Backend3 -----disk bush 99% pg_sleep_backend(1, 11min) Backend3 -----disk busy 0%
Backend4 -----disk bush 99% pg_sleep_backend(1, 12min) Backend4 -----disk busy 0%
从 Windows 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>发送
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: ma100@hotmail.com
Subject: Re: Would postgresql add a pg_sleep_backend() method
In-Reply-To: <TYWP286MB3002665D92D54B7EB10F42EBF2389@TYWP286MB3002.JPNP286.PROD.OUTLOOK.COM>
References: <TYWP286MB3002665D92D54B7EB10F42EBF2389@TYWP286MB3002.JPNP286.PROD.OUTLOOK.COM>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox