($INBOX_DIR/description missing)  
help / color / mirror / Atom feed
From: Kyotaro Horiguchi <[email protected]>
Subject: [PATCH 7/7] Add a comment to ATExecSetTableSpace.
Date: Mon, 25 Mar 2019 20:39:21 +0900

We use heap_register_sync() stuff to control WAL-logging and file sync
on bulk insertion, but we cannot use it because the function lacks the
ability to handle forks explicitly. Add a comment to explain that.
---
 src/backend/commands/tablecmds.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 242311b0d7..c7c7bcb308 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -11594,7 +11594,13 @@ ATExecSetTableSpace(Oid tableOid, Oid newTableSpace, LOCKMODE lockmode)
 	RelationInvalidateWALRequirements(rel);
 	RelationCreateStorage(newrnode, rel->rd_rel->relpersistence);
 
-	/* copy main fork */
+	/*
+	 * copy main fork
+	 *
+	 * You might think that we could use heap_register_sync() to control file
+	 * sync and WAL-logging, but we cannot because the sutff lacks the ability
+	 * to handle each fork explicitly.
+	 */
 	copy_relation_data(rel->rd_smgr, dstrel, MAIN_FORKNUM,
 					   rel->rd_rel->relpersistence);
 
-- 
2.16.3


----Next_Part(Mon_Mar_25_21_32_04_2019_838)----





view thread (16+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [PATCH 7/7] Add a comment to ATExecSetTableSpace.
  In-Reply-To: <no-message-id-1883692@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox