Re: Reducing WaitEventSet syscall churn

2021-02-28 Thread Thomas Munro
On Sat, Feb 27, 2021 at 2:48 PM Thomas Munro wrote: > Here's the alternative patch set, with no change to existing error > message behaviour. I'm going to commit this version and close this CF > item soon if there are no objections. Pushed. That leaves just walreceiver and postgres_fdw in need

Re: Reducing WaitEventSet syscall churn

2021-02-26 Thread Thomas Munro
On Tue, Jan 5, 2021 at 6:10 PM Thomas Munro wrote: > For point 2, the question I am raising is: why should users get a > special FATAL message in some places and not others, for PM death? > However, if people are attached to that behaviour, we could still > achieve goal 1 without goal 2 by

Re: Reducing WaitEventSet syscall churn

2021-01-04 Thread Thomas Munro
On Fri, Jul 31, 2020 at 9:42 AM Thomas Munro wrote: > On Thu, Jul 30, 2020 at 5:50 PM Thomas Munro wrote: > > I pushed those three patches, but will wait for more discussion on the rest. > > And here's a rebase, to make cfbot happy. And again. To restate the two goals of the remaining patches:

Re: Reducing WaitEventSet syscall churn

2020-07-30 Thread Thomas Munro
On Thu, Jul 30, 2020 at 5:50 PM Thomas Munro wrote: > I pushed those three patches, but will wait for more discussion on the rest. And here's a rebase, to make cfbot happy. From a760053ac6fea1b9a829e9a170902a555863ce66 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Mon, 24 Feb 2020 23:51:09

Re: Reducing WaitEventSet syscall churn

2020-07-29 Thread Thomas Munro
On Tue, Jul 14, 2020 at 6:51 PM Thomas Munro wrote: > In the meantime, here's a rebase of the more straightforward patches > in the stack. These are the ones that deal only with fixed sets of > file descriptors, and they survive check-world on Linux, > Linux+EXEC_BACKEND (with ASLR disabled) and

Re: Reducing WaitEventSet syscall churn

2020-07-14 Thread Thomas Munro
On Sun, Jul 12, 2020 at 7:22 AM Tom Lane wrote: > [...complaints about 0005 and 0006...] We already have > PGEVT_CONNRESET and PGEVT_CONNDESTROY as application-visible connection > state change events, and I don't see why those aren't sufficient. I think Horiguchi-san's general idea of using

Re: Reducing WaitEventSet syscall churn

2020-07-11 Thread Tom Lane
Daniel Gustafsson writes: >> On 13 Mar 2020, at 08:21, Kyotaro Horiguchi wrote: >> The attached are: >> 0001-0004 Not changed >> 0005 Fix interface of PQregisterEventProc >> 0006 Add new libpq event for this use. >> 0007 Another version of "0006 Reuse a WaitEventSet in >> libpqwalreceiver.c"

Re: Reducing WaitEventSet syscall churn

2020-07-02 Thread Daniel Gustafsson
> On 13 Mar 2020, at 08:21, Kyotaro Horiguchi wrote: > The attached are: > 0001-0004 Not changed > 0005 Fix interface of PQregisterEventProc > 0006 Add new libpq event for this use. > 0007 Another version of "0006 Reuse a WaitEventSet in > libpqwalreceiver.c" based on libpq event. >

Re: Reducing WaitEventSet syscall churn

2020-03-29 Thread Kyotaro Horiguchi
At Fri, 13 Mar 2020 16:21:13 +0900 (JST), Kyotaro Horiguchi wrote in > > 0007: "Use a WaitEventSet for postgres_fdw." > > Continues.. At Thu, 27 Feb 2020 12:17:45 +1300, Thomas Munro wrote in > 0007: "Use a WaitEventSet for postgres_fdw." > > Create a single WaitEventSet and use it for

Re: Reducing WaitEventSet syscall churn

2020-03-13 Thread Kyotaro Horiguchi
Hello. At Tue, 10 Mar 2020 08:19:24 +0900 (JST), Kyotaro Horiguchi wrote in me> I'l continue reviewing in later mail. me> me> > 0005: "libpq: Add PQsocketChangeCount to advertise socket changes." me> At Thu, 27 Feb 2020 12:17:45 +1300, Thomas Munro wrote in > On Sat, Feb 8, 2020 at

Re: Reducing WaitEventSet syscall churn

2020-03-09 Thread Kyotaro Horiguchi
Hello. I looked this. At Thu, 27 Feb 2020 12:17:45 +1300, Thomas Munro wrote in > On Sat, Feb 8, 2020 at 10:15 AM Thomas Munro wrote: > > > > Here are some patches to get rid of frequent system calls. > > Here's a new version of this patch set. It gets rid of all temporary > WaitEventSets

Re: Reducing WaitEventSet syscall churn

2020-02-26 Thread Thomas Munro
On Sat, Feb 8, 2020 at 10:15 AM Thomas Munro wrote: > > > Here are some patches to get rid of frequent system calls. Here's a new version of this patch set. It gets rid of all temporary WaitEventSets except a couple I mentioned in another thread[1]. WaitLatch() uses CommonWaitSet, and calls to

Re: Reducing WaitEventSet syscall churn

2020-02-07 Thread Thomas Munro
On Sat, Feb 8, 2020 at 10:00 AM Thomas Munro wrote: > On Tue, Jan 21, 2020 at 1:45 PM Thomas Munro wrote: > > Here are some patches to get rid of frequent system calls. > > Here is one more case that I was sitting on because I wasn't sure how > to do it: walreceiver.c. To make that work, libpq

Re: Reducing WaitEventSet syscall churn

2020-02-07 Thread Thomas Munro
On Tue, Jan 21, 2020 at 1:45 PM Thomas Munro wrote: > Here are some patches to get rid of frequent system calls. Here is one more case that I was sitting on because I wasn't sure how to do it: walreceiver.c. To make that work, libpq needs to be able to tell you when the socket has changed,

Reducing WaitEventSet syscall churn

2020-01-20 Thread Thomas Munro
Hi, Here are some patches to get rid of frequent system calls. 0001 changes all qualifying WaitLatch() calls to use a new function WaitMyLatch() that reuses a common WaitEventSet. That's for callers that only want to wait for their own latch or an optional timeout, with automatic