}
/*
- * Return the current fileset based BufFile size.
+ * Returns the amount of data in the given BufFile, in bytes.
*
- * Counts any holes left behind by BufFileAppend as part of the size.
+ * Returned value includes the size of any holes left behind by BufFileAppend.
* ereport()s on failure.
*/
int64
{
int64 lastFileSize;
- Assert(file->fileset != NULL);
-
/* Get the size of the last physical file. */
lastFileSize = FileSize(file->files[file->numFiles - 1]);
if (lastFileSize < 0)
}
/*
- * Append the contents of source file (managed within fileset) to
- * end of target file (managed within same fileset).
+ * Append the contents of the source file to the end of the target file.
*
* Note that operation subsumes ownership of underlying resources from
* "source". Caller should never call BufFileClose against source having
int newNumFiles = target->numFiles + source->numFiles;
int i;
- Assert(target->fileset != NULL);
Assert(source->readOnly);
Assert(!source->dirty);
- Assert(source->fileset != NULL);
if (target->resowner != source->resowner)
elog(ERROR, "could not append BufFile with non-matching resource owner");