summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorVadim B. Mikheev2000-11-30 08:46:26 +0000
committerVadim B. Mikheev2000-11-30 08:46:26 +0000
commit81c8c244b26011a071c89b43a38bba7039226019 (patch)
treea0602e39901d870d1fe4275a96c70a8450710882 /src/backend/commands
parentb16516b887f058782d67c90103148544f8adbd8f (diff)
No more #ifdef XLOG.
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/dbcommands.c6
-rw-r--r--src/backend/commands/vacuum.c23
2 files changed, 6 insertions, 23 deletions
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 95f302d93e4..6e8e27a7485 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.69 2000/11/18 03:36:48 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.70 2000/11/30 08:46:22 vadim Exp $
*
*-------------------------------------------------------------------------
*/
@@ -153,13 +153,11 @@ createdb(const char *dbname, const char *dbpath,
elog(ERROR, "database path may not contain single quotes");
/* ... otherwise we'd be open to shell exploits below */
-#ifdef XLOG
/* Force dirty buffers out to disk, to ensure source database is
* up-to-date for the copy. (We really only need to flush buffers
* for the source database...)
*/
BufferSync();
-#endif
/*
* Close virtual file descriptors so the kernel has more available for
@@ -255,13 +253,11 @@ createdb(const char *dbname, const char *dbpath,
/* Close pg_database, but keep lock till commit */
heap_close(pg_database_rel, NoLock);
-#ifdef XLOG
/* Force dirty buffers out to disk, so that newly-connecting backends
* will see the new database in pg_database right away. (They'll see
* an uncommitted tuple, but they don't care; see GetRawDatabaseInfo.)
*/
BufferSync();
-#endif
}
diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c
index 3aeae1409bd..5f2e193d052 100644
--- a/src/backend/commands/vacuum.c
+++ b/src/backend/commands/vacuum.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.173 2000/11/16 22:30:19 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.174 2000/11/30 08:46:22 vadim Exp $
*
*-------------------------------------------------------------------------
@@ -47,11 +47,9 @@
#include <sys/resource.h>
#endif
-#ifdef XLOG
#include "access/xlog.h"
-XLogRecPtr log_heap_move(Relation reln,
- ItemPointerData from, HeapTuple newtup);
-#endif
+extern XLogRecPtr log_heap_move(Relation reln,
+ ItemPointerData from, HeapTuple newtup);
static MemoryContext vac_context = NULL;
@@ -1492,7 +1490,6 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
newtup.t_data = (HeapTupleHeader) PageGetItem(ToPage, newitemid);
ItemPointerSet(&(newtup.t_self), destvacpage->blkno, newoff);
-#ifdef XLOG
{
XLogRecPtr recptr =
log_heap_move(onerel, tuple.t_self, &newtup);
@@ -1505,7 +1502,6 @@ repair_frag(VRelStats *vacrelstats, Relation onerel,
PageSetLSN(ToPage, recptr);
PageSetSUI(ToPage, ThisStartUpID);
}
-#endif
if (((int) destvacpage->blkno) > last_move_dest_block)
last_move_dest_block = destvacpage->blkno;
@@ -1655,7 +1651,6 @@ failed to add item with len = %lu to page %u (free space %lu, nusd %u, noff %u)"
~(HEAP_XMIN_COMMITTED | HEAP_XMIN_INVALID | HEAP_MOVED_IN);
tuple.t_data->t_infomask |= HEAP_MOVED_OFF;
-#ifdef XLOG
{
XLogRecPtr recptr =
log_heap_move(onerel, tuple.t_self, &newtup);
@@ -1665,7 +1660,6 @@ failed to add item with len = %lu to page %u (free space %lu, nusd %u, noff %u)"
PageSetLSN(ToPage, recptr);
PageSetSUI(ToPage, ThisStartUpID);
}
-#endif
cur_page->offsets_used++;
num_moved++;
@@ -1786,19 +1780,12 @@ failed to add item with len = %lu to page %u (free space %lu, nusd %u, noff %u)"
if (num_moved > 0)
{
-#ifdef XLOG
- RecordTransactionCommit();
-#else
/*
* We have to commit our tuple' movings before we'll truncate
* relation, but we shouldn't lose our locks. And so - quick hack:
- * flush buffers and record status of current transaction as
- * committed, and continue. - vadim 11/13/96
+ * record status of current transaction as committed, and continue.
*/
- FlushBufferPool();
- TransactionIdCommit(myXID);
- FlushBufferPool();
-#endif
+ RecordTransactionCommit();
}
/*