Re: Why enable_hashjoin Completely disables HashJoin - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Why enable_hashjoin Completely disables HashJoin
Date
Msg-id 1196893.1680524014@sss.pgh.pa.us
Whole thread Raw
In response to Why enable_hashjoin Completely disables HashJoin  (Quan Zongliang <quanzongliang@yeah.net>)
Responses Re: Why enable_hashjoin Completely disables HashJoin
List pgsql-hackers
Quan Zongliang <quanzongliang@yeah.net> writes:
> I found that the enable_hashjoin disables HashJoin completely.

Well, yeah.  It's what you asked for.

> Instead, it should add a disable cost to the cost calculation of 
> hashjoin.

Why?  The disable-cost stuff is a crude hack that we use when
turning off a particular plan type entirely might render us
unable to generate a valid plan.  Hash join is not in that
category.

> After disabling all three, the HashJoin path should still be chosen.

Why?

Personally, I'd get rid of disable_cost altogether if I could.
I'm not in a hurry to extend its use to more places.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
Next
From: Tomas Vondra
Date:
Subject: Re: hio.c does visibilitymap_pin()/IO while holding buffer lock