pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: weird hash plan cost, starting with pg10
Date: Mon, 13 Apr 2020 09:53:46 -0400
Message-ID: <22914.1586786026@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMbWs49UkT4pyPHSX=26DV+ucCAL1K7pPJo6F-C7ejRYC8eSkA@mail.gmail.com>
References: <20200323165059.GA24950@alvherre.pgsql>
	<18131.1584982859@sss.pgh.pa.us>
	<CA+hUKGKC3Wzkq3bB0fpYx3H=AZWG6GnU5BcsuEaCYdwQbEY3vA@mail.gmail.com>
	<CA+hUKGKoxhHo07+CoQs30dyM1rtCaRxndhDK1RfBvLvNFcwjoQ@mail.gmail.com>
	<CAMbWs4_+CLFi+mgEkVk7u0YW0DK6y4TWLe6Hrt5pTfYh2jipRg@mail.gmail.com>
	<CAMbWs4-oR+V1AtR7j8Nv85-n1eEng6Z4NmHvcJLEpsb69x5JMw@mail.gmail.com>
	<4751e4df-5f98-657e-fb88-c039dd1e7a31@postgrespro.ru>
	<31321.1586549487@sss.pgh.pa.us>
	<CAMbWs49UkT4pyPHSX=26DV+ucCAL1K7pPJo6F-C7ejRYC8eSkA@mail.gmail.com>

Richard Guo <guofenglinux@gmail.com> writes:
> At first I was wondering if we need to check whether HashState.hashtable
> is not NULL in ExecShutdownHash() before we decide to allocate save
> space for HashState.hinstrument. And then I convinced myself that that's
> not necessary since HashState.hinstrument and HashState.hashtable cannot
> be both NULL there.

Even if the hashtable is null at that point, creating an all-zeroes
hinstrument struct is harmless.

			regards, tom lane





view thread (15+ messages)  latest in thread

Message-ID: <22914.1586786026@sss.pgh.pa.us>
Permalink:  ../22914.1586786026@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/22914.1586786026@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, guofenglinux@gmail.com, k.knizhnik@postgrespro.ru, thomas.munro@gmail.com, alvherre@2ndquadrant.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: weird hash plan cost, starting with pg10
  In-Reply-To: <22914.1586786026@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