diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-06 20:22:58 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-06-06 20:22:58 +0000 |
commit | ee7ac7b11e9e6623871833729958662a4598fbc5 (patch) | |
tree | 61d4f69957d8971b497bbc0cbcc42c4742a0b352 /src/backend/commands/tablecmds.c | |
parent | 4c8495a1f2ae7a027a4b3e8fdb2aa5b21a5be1fc (diff) | |
download | postgresql-ee7ac7b11e9e6623871833729958662a4598fbc5.tar.gz postgresql-ee7ac7b11e9e6623871833729958662a4598fbc5.zip |
Modify XLogInsert API to make callers specify whether pages to be backed
up have the standard layout with unused space between pd_lower and pd_upper.
When this is set, XLogInsert will omit the unused space without bothering
to scan it to see if it's zero. That saves time in XLogInsert, and also
allows reversion of my earlier patch to make PageRepairFragmentation et al
explicitly re-zero freed space. Per suggestion by Heikki Linnakangas.
Diffstat (limited to 'src/backend/commands/tablecmds.c')
-rw-r--r-- | src/backend/commands/tablecmds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index c7669dfc58f..9981129c0eb 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.160 2005/06/05 00:38:08 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.161 2005/06/06 20:22:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -5667,14 +5667,14 @@ copy_relation_data(Relation rel, SMgrRelation dst) xlrec.node = dst->smgr_rnode; xlrec.blkno = blkno; - rdata[0].buffer = InvalidBuffer; rdata[0].data = (char *) &xlrec; rdata[0].len = SizeOfHeapNewpage; + rdata[0].buffer = InvalidBuffer; rdata[0].next = &(rdata[1]); - rdata[1].buffer = InvalidBuffer; rdata[1].data = (char *) page; rdata[1].len = BLCKSZ; + rdata[1].buffer = InvalidBuffer; rdata[1].next = NULL; recptr = XLogInsert(RM_HEAP_ID, XLOG_HEAP_NEWPAGE, rdata); |