Re: Insert performance

From: Csaba Nagy <nagy(at)ecircle-ag(dot)com>
To: Carlos Moreno <moreno_pg(at)mochima(dot)com>
Cc: postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Insert performance
Date: 2007-03-06 16:02:24
Message-ID: 1173196944.9058.25.camel@coppola.muc.ecircle.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

I only know to answer your no. 2:
> 2) What about the issue with excessive locking for foreign keys when
> inside a transaction? Has that issue disappeared in 8.2? And if not,
> would it affect similarly in the case of multiple-row inserts?

The exclusive lock is gone already starting with 8.0 IIRC, a
non-exclusive lock on the parent row is used instead. Thing is that this
is still too strong ;-)

The proper lock would be one which only prevents modification of the
parent key, other updates would be safe on the same row.

In any case, the current behavior is much better than what was before.

Cheers,
Csaba.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2007-03-06 16:40:53 Re:
Previous Message Carlos Moreno 2007-03-06 15:55:41 Re: Insert performance