summaryrefslogtreecommitdiff
path: root/src/backend/access/nbtree/nbtsort.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2010-08-13 20:10:54 +0000
committerRobert Haas <rhaas@postgresql.org>2010-08-13 20:10:54 +0000
commitdebcec7dc31a992703911a9953e299c8d730c778 (patch)
treedad0d10ec39eafe0cc254c17e36eb82ec822cdac /src/backend/access/nbtree/nbtsort.c
parent3f9479ef3fdf49fc22088be5268fa536cf5d4efd (diff)
downloadpostgresql-debcec7dc31a992703911a9953e299c8d730c778.tar.gz
Include the backend ID in the relpath of temporary relations.
This allows us to reliably remove all leftover temporary relation files on cluster startup without reference to system catalogs or WAL; therefore, we no longer include temporary relations in XLOG_XACT_COMMIT and XLOG_XACT_ABORT WAL records. Since these changes require including a backend ID in each SharedInvalSmgrMsg, the size of the SharedInvalidationMessage.id field has been reduced from two bytes to one, and the maximum number of connections has been reduced from INT_MAX / 4 to 2^23-1. It would be possible to remove these restrictions by increasing the size of SharedInvalidationMessage by 4 bytes, but right now that doesn't seem like a good trade-off. Review by Jaime Casanova and Tom Lane.
Diffstat (limited to 'src/backend/access/nbtree/nbtsort.c')
-rw-r--r--src/backend/access/nbtree/nbtsort.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c
index 15964e127e..e7048e7211 100644
--- a/src/backend/access/nbtree/nbtsort.c
+++ b/src/backend/access/nbtree/nbtsort.c
@@ -59,7 +59,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtsort.c,v 1.125 2010/04/28 16:10:40 heikki Exp $
+ * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtsort.c,v 1.126 2010/08/13 20:10:50 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -295,9 +295,8 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
}
/*
- * Now write the page. We say isTemp = true even if it's not a temp
- * index, because there's no need for smgr to schedule an fsync for this
- * write; we'll do it ourselves before ending the build.
+ * Now write the page. There's no need for smgr to schedule an fsync for
+ * this write; we'll do it ourselves before ending the build.
*/
if (blkno == wstate->btws_pages_written)
{