Re: [PATCH] binary heap implementation

Andres Freund <andres@2ndquadrant.com>

From: Andres Freund <andres@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Abhijit Menon-Sen <ams@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2012-11-21T18:04:54Z
Lists: pgsql-hackers
On 2012-11-21 12:54:30 -0500, Robert Haas wrote:
> On Wed, Nov 21, 2012 at 9:46 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> > I guess I'll take another whack at it.
> 
> New version attached.

I think the assert in replace_first should be
Assert(!binaryheap_empty(heap) && heap->has_heap_property);
instead of
Assert(heap->has_heap_property);

looks good otherwise.

Thanks,

Andres

-- 
 Andres Freund	                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix memory leaks in record_out() and record_send().