Re: [PATCH] binary heap implementation - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject Re: [PATCH] binary heap implementation
Date
Msg-id 20121121051553.GA25027@toroid.org
Whole thread Raw
In response to Re: [PATCH] binary heap implementation  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 2012-11-20 22:55:52 -0500, tgl@sss.pgh.pa.us wrote:
>
> BTW, I probably missed some context upthread, but why do we have two
> fields at all?

I would also have preferred to handle the nodeMergeAppend case using a
context pointer as you suggest, but Andres needs to store two pointers
in his heap nodes.

Andres: suppose we replace binaryheap_node with just a Datum, could you
live with storing a pointer to a struct with two pointers? If so, that
would address the concerns raised.

If not, maybe we should explore Robert's earlier suggestion to make
binaryheap_node user-definable (in effect).

-- Abhijit



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] binary heap implementation
Next
From: Josh Kupershmidt
Date:
Subject: Re: Suggestion for --truncate-tables to pg_restore