pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: David Rowley <dgrowleyml@gmail.com>
Cc: Peter Geoghegan <pg@bowt.ie>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Cc: Nikita Glukhov <n.gluhov@postgrespro.ru>
Cc: Andrew Dunstan <andrew@dunslane.net>
Subject: Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size
Date: Fri, 17 Jun 2022 10:33:08 -0400
Message-ID: <1221363.1655476388@sss.pgh.pa.us> (raw)
In-Reply-To: <20220617062456.ahbwho67m7c3lnr3@alap3.anarazel.de>
References: <20220616233130.rparivafipt6doj3@alap3.anarazel.de>
	<CAApHDvo3GOUK2YFJTjcECvB=0Jx==S-ywcVno9U1rZT_7r7+dg@mail.gmail.com>
	<CAH2-WznM2gGO7O0w1sWYdBV3U6RLZvRhoWEr20+dS02QV3hqjA@mail.gmail.com>
	<CAApHDvqivvMw=AgvVQA+dKEQJHxV5JVS8Nm48NZA+FT8vuuDcw@mail.gmail.com>
	<20220617052228.mjwns6ugspihamsc@alap3.anarazel.de>
	<20220617062456.ahbwho67m7c3lnr3@alap3.anarazel.de>

Andres Freund <andres@anarazel.de> writes:
> The remaining difference looks like it's largely caused by the
> enable_timeout_after(IDLE_STATS_UPDATE_TIMEOUT, ...) introduced as part of the
> pgstats patch. It's only really visible when I pin a single connection pgbench
> to the same CPU core as the server (which gives a ~16% boost here).

> It's not the timeout itself - that we amortize nicely (via 09cf1d522). It's
> that enable_timeout_after() does a GetCurrentTimestamp().

> Not sure yet what the best way to fix that is.

Maybe not queue a new timeout if the old one is still active?

BTW, it looks like that patch also falsified this comment
(postgres.c:4478):

		 * At most one of these timeouts will be active, so there's no need to
		 * worry about combining the timeout.c calls into one.

Maybe fixing that end of things would be a simpler way of buying back
the delta.

> Or we could add a timeout.c API that specifies the timeout?

Don't think that will help: it'd be morally equivalent to
enable_timeout_at(), which also has to do GetCurrentTimestamp().

			regards, tom lane





view thread (75+ messages)  latest in thread

Message-ID: <1221363.1655476388@sss.pgh.pa.us>
Permalink:  ../1221363.1655476388@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1221363.1655476388@sss.pgh.pa.us

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, dgrowleyml@gmail.com, pg@bowt.ie, n.gluhov@postgrespro.ru, andrew@dunslane.net
  Subject: Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size
  In-Reply-To: <1221363.1655476388@sss.pgh.pa.us>

* 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