Re: Correct way to do deletes? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Correct way to do deletes?
Date
Msg-id 14616.1004392595@sss.pgh.pa.us
Whole thread Raw
In response to Correct way to do deletes?  (Bill Studenmund <wrstuden@netbsd.org>)
List pgsql-hackers
Bill Studenmund <wrstuden@netbsd.org> writes:
> In one we SearchSysCache(), simple_heap_delete(), and then
> ReleaseSysCache(). In the other we SearchSysCacheCopy(),
> simple_heap_delete, and heap_freetuple().

> Are they two parallel ways, or is one better?

I don't think it matters much anymore.  The copy approach takes a few
more cycles, though, to no good purpose since you have no need to modify
the tuple struct obtained from cache.  (When updating a tuple, copying
the cache entry and scribbling directly on the copy is sometimes more
convenient than calling heap_modifytuple to build a new tuple.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: Serious performance problem
Next
From: "Serguei Mokhov"
Date:
Subject: Re: External Database Connection