<[EMAIL PROTECTED]> 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's PostgreSQL training! ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend