mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Update obsolete comment.
This commit is contained in:
parent
b34aa3372f
commit
21e2544aa7
@ -91,7 +91,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/sort/tuplesort.c,v 1.58 2006/02/19 05:54:06 tgl Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/sort/tuplesort.c,v 1.59 2006/02/19 19:59:53 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -324,8 +324,7 @@ struct Tuplesortstate
|
|||||||
#define USEMEM(state,amt) ((state)->availMem -= (amt))
|
#define USEMEM(state,amt) ((state)->availMem -= (amt))
|
||||||
#define FREEMEM(state,amt) ((state)->availMem += (amt))
|
#define FREEMEM(state,amt) ((state)->availMem += (amt))
|
||||||
|
|
||||||
/*--------------------
|
/*
|
||||||
*
|
|
||||||
* NOTES about on-tape representation of tuples:
|
* NOTES about on-tape representation of tuples:
|
||||||
*
|
*
|
||||||
* We require the first "unsigned int" of a stored tuple to be the total size
|
* We require the first "unsigned int" of a stored tuple to be the total size
|
||||||
@ -357,16 +356,13 @@ struct Tuplesortstate
|
|||||||
*
|
*
|
||||||
* We count space allocated for tuples against the workMem limit, plus
|
* We count space allocated for tuples against the workMem limit, plus
|
||||||
* the space used by the variable-size arrays memtuples and memtupindex.
|
* the space used by the variable-size arrays memtuples and memtupindex.
|
||||||
* Fixed-size space (primarily the LogicalTapeSet I/O buffers) is not
|
* Fixed-size space is not counted; it's small enough to not be interesting.
|
||||||
* counted.
|
|
||||||
*
|
*
|
||||||
* Note that we count actual space used (as shown by GetMemoryChunkSpace)
|
* Note that we count actual space used (as shown by GetMemoryChunkSpace)
|
||||||
* rather than the originally-requested size. This is important since
|
* rather than the originally-requested size. This is important since
|
||||||
* palloc can add substantial overhead. It's not a complete answer since
|
* palloc can add substantial overhead. It's not a complete answer since
|
||||||
* we won't count any wasted space in palloc allocation blocks, but it's
|
* we won't count any wasted space in palloc allocation blocks, but it's
|
||||||
* a lot better than what we were doing before 7.3.
|
* a lot better than what we were doing before 7.3.
|
||||||
*
|
|
||||||
*--------------------
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2407,6 +2403,7 @@ readtup_datum(Tuplesortstate *state, int tapenum, unsigned int len)
|
|||||||
sizeof(tuplen)) != sizeof(tuplen))
|
sizeof(tuplen)) != sizeof(tuplen))
|
||||||
elog(ERROR, "unexpected end of data");
|
elog(ERROR, "unexpected end of data");
|
||||||
|
|
||||||
|
/* if pass-by-ref data type, must recompute the Datum pointer */
|
||||||
if (!tuple->isNull && !state->datumTypeByVal)
|
if (!tuple->isNull && !state->datumTypeByVal)
|
||||||
tuple->val = PointerGetDatum(((char *) tuple) +
|
tuple->val = PointerGetDatum(((char *) tuple) +
|
||||||
MAXALIGN(sizeof(DatumTuple)));
|
MAXALIGN(sizeof(DatumTuple)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user