Re: Replacement Selection - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Replacement Selection
Date
Msg-id 871wa6k660.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Replacement Selection  (<mac_man2005@hotmail.it>)
List pgsql-hackers
<mac_man2005@hotmail.it> writes:

>> The function dumptuples() heapifies the in-core tuples (divides the in-core
>> tuples into initial runs and then advances the state to TSS_BUILDRUNS).
>
> Cannot see where dumptuples() "advances the state to TSS_BUILDRUNS".
> I expected something like
>    state->status = TSS_BUILDRUNS;
> executed through dumptuples()

There's only one "state->status = TSS_BUILDRUNS" in the whole file. It's
called by inittapes which is called in one place, just before dumptuples.
Seriously, please try a bit harder before giving up.

The code in this file is quite interdependent which means you'll have to read
through the whole file (except perhaps the last section which just contains
the interface functions to feed different types of datums or tuples) to
understand any of it.

But it's quite self-contained which makes it one of the easier modules in the
system to get a functional grasp of. The hard part is understanding the
algorithm itself and working out the details of the array management.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about
EnterpriseDB'sPostgreSQL training!
 


pgsql-hackers by date:

Previous
From:
Date:
Subject: Re: Replacement Selection
Next
From: James Mansion
Date:
Subject: Re: .NET or Mono functions in PG