Re: Terminate the idle sessions

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Li Japin <japinli(at)hotmail(dot)com>
Cc: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "bharath(dot)rupireddyforpostgres(at)gmail(dot)com" <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Terminate the idle sessions
Date: 2020-08-31 03:43:20
Message-ID: CA+hUKGLEXUiAd=FZ4Gd1KVyO9P1fjR4AkOd3wrAVq47bfi1Fbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Aug 31, 2020 at 2:40 PM Li Japin <japinli(at)hotmail(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2020-08-31 04:49:05 Re: Terminate the idle sessions
Previous Message Michael Paquier 2020-08-31 02:48:40 Re: [PATCH v1] explicit_bzero.c: using explicit_memset on NetBSD