Re: weird hash plan cost, starting with pg10 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: weird hash plan cost, starting with pg10
Date
Msg-id 22914.1586786026@sss.pgh.pa.us
Whole thread Raw
In response to Re: weird hash plan cost, starting with pg10  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: weird hash plan cost, starting with pg10  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: WAL usage calculation patch
Next
From: Peter Eisentraut
Date:
Subject: wrong relkind error messages