USING HASH considered harmful?

From: Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au>
To: pgsql-general(at)postgresql(dot)org
Cc: Mark Greenaway <mark(at)commsecure(dot)com(dot)au>
Subject: USING HASH considered harmful?
Date: 2001-08-16 23:23:13
Message-ID: 20010817092313.B28987@ws12.commsecure.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

We've just discovered a rather nasty feature of hashes, namely that
simultaneous reads & writes to a single row will deadlock if there
is a hash index on the table.

I guess this is because PG really has to lock the hash table entry in
both cases. It does, however, make HASH indices completely useless for
any table that you might want to update.

Is this a known feature?

Stephen

Responses

Browse pgsql-general by date

  From Date Subject
Next Message newsreader 2001-08-17 00:11:29 Re: why sequential scan
Previous Message Tom Lane 2001-08-16 22:32:27 Re: Killing inactive connections