Subject: Hashjoin

From: [email-masked] (Postgres Account)
Date: Mon, 6 Jul 92 21:07:59 -0700

In the current version of postgres, it seems that Postgres aborts the query
and complains out of memery rather than creates temporary overflow files, when
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

---

From: postarch (Postgres Mailing Archive)
Date: Mon, 06 Jul 92 23:32:13 PDT

you write:
> and complains out of memery rather than creates temporary overflow files, whe
 +n
> Thanks in advance for any respones.

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