Return-Path: postarch
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA13660; Mon, 6 Jul 92 23:32:22 -0700
Message-Id: <9207070632.AA13660@postgres.Berkeley.EDU>
From: postarch (Postgres Mailing Archive)
Subject: Re: Hashjoin
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
Reply-To: hong@postgres.berkeley.edu
In-Reply-To: Your message of "Mon, 06 Jul 92 21:07:59 PDT."
             <9207070407.AA12567@postgres.Berkeley.EDU> 
Date: Mon, 06 Jul 92 23:32:13 PDT

you write:
> 
> In the current version of postgres, it seems that Postgres aborts the query
> and complains out of memery rather than creates temporary overflow files, whe
 +n
> postgres does join operation on two large files. In another words, postgres
> does join operation only in memory rather than creating temporary files on
> disk when overflow occurs. Am I right? What about in the next release?
> 
> Thanks in advance for any respones.
> 
> --Shengsong Ni

No.  Postgres does have an implementation of hybrid hashjoin.  In other words,
we do create temporary files on disk when there is not enough memory to hold
the entire smaller join relation.  The problem with the current release of 
Postgres is that the planner may generate a hashjoin plan even though there 
may not be enough memory to make the hashjoin possible.  When the executor 
detects that the available memory size is below the hashjoin threshold, 
it aborts the transaction.  This problem has been fixed in the upcoming 
version 4.

-- Wei Hong
