aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/file/fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/file/fd.c')
-rw-r--r--src/backend/storage/file/fd.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c
index faa73061cf3..0fd1bbde5b0 100644
--- a/src/backend/storage/file/fd.c
+++ b/src/backend/storage/file/fd.c
@@ -251,8 +251,10 @@ static AllocateDesc *allocatedDescs = NULL;
static long tempFileCounter = 0;
/*
- * Array of OIDs of temp tablespaces. When numTempTableSpaces is -1,
- * this has not been set in the current transaction.
+ * Array of OIDs of temp tablespaces. (Some entries may be InvalidOid,
+ * indicating that the current database's default tablespace should be used.)
+ * When numTempTableSpaces is -1, this has not been set in the current
+ * transaction.
*/
static Oid *tempTableSpaces = NULL;
static int numTempTableSpaces = -1;
@@ -2670,6 +2672,9 @@ closeAllVfds(void)
* unless this function is called again before then. It is caller's
* responsibility that the passed-in array has adequate lifespan (typically
* it'd be allocated in TopTransactionContext).
+ *
+ * Some entries of the array may be InvalidOid, indicating that the current
+ * database's default tablespace should be used.
*/
void
SetTempTablespaces(Oid *tableSpaces, int numSpaces)
@@ -2709,7 +2714,10 @@ TempTablespacesAreSet(void)
* GetTempTablespaces
*
* Populate an array with the OIDs of the tablespaces that should be used for
- * temporary files. Return the number that were copied into the output array.
+ * temporary files. (Some entries may be InvalidOid, indicating that the
+ * current database's default tablespace should be used.) At most numSpaces
+ * entries will be filled.
+ * Returns the number of OIDs that were copied into the output array.
*/
int
GetTempTablespaces(Oid *tableSpaces, int numSpaces)