Re: Terminate the idle sessions - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Terminate the idle sessions
Date
Msg-id CA+hUKGLEXUiAd=FZ4Gd1KVyO9P1fjR4AkOd3wrAVq47bfi1Fbg@mail.gmail.com
Whole thread Raw
In response to Re: Terminate the idle sessions  (Li Japin <japinli@hotmail.com>)
Responses Re: Terminate the idle sessions
List pgsql-hackers
On Mon, Aug 31, 2020 at 2:40 PM Li Japin <japinli@hotmail.com> wrote:
> Could you give the more details about the test instructions?

Hi Japin,

Sure.  Because I wasn't trying to get reliable TPS number or anything,
I just used a simple short read-only test with one connection, like
this:

pgbench -i -s10 postgres
pgbench -T60 -Mprepared -S postgres

Then I looked for the active backend and ran strace -c -p XXX for a
few seconds and hit ^C to get the counters.  I doubt the times are
very accurate, but the number of calls is informative.

If you do that on a server running with -c statement_timeout=10s, you
see one setitimer() per transaction.  If you also use -c
idle_session_timeout=10s at the same time, you see two.



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [PATCH v1] explicit_bzero.c: using explicit_memset on NetBSD
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: Terminate the idle sessions