Minor comment fixups

Started by Jeff Davisover 13 years ago2 messages
#1Jeff Davis
pgsql@j-davis.com
1 attachment(s)

I noticed a couple comments that look wrong to me. Patch attached.

Regards,
Jeff Davis

Attachments:

commentfixes.difftext/x-patch; charset=ISO-8859-1; name=commentfixes.diffDownload
*** a/src/backend/commands/tablecmds.c
--- b/src/backend/commands/tablecmds.c
***************
*** 8784,8792 **** copy_relation_data(SMgrRelation src, SMgrRelation dst,
  	pfree(buf);
  
  	/*
! 	 * If the rel isn't temp, we must fsync it down to disk before it's safe
! 	 * to commit the transaction.  (For a temp rel we don't care since the rel
! 	 * will be uninteresting after a crash anyway.)
  	 *
  	 * It's obvious that we must do this when not WAL-logging the copy. It's
  	 * less obvious that we have to do it even if we did WAL-log the copied
--- 8784,8791 ----
  	pfree(buf);
  
  	/*
! 	 * If the rel is WAL-logged, must fsync before commit.	We use heap_sync
! 	 * to ensure that the toast table gets fsync'd too.
  	 *
  	 * It's obvious that we must do this when not WAL-logging the copy. It's
  	 * less obvious that we have to do it even if we did WAL-log the copied
*** a/src/backend/storage/file/reinit.c
--- b/src/backend/storage/file/reinit.c
***************
*** 337,343 **** ResetUnloggedRelationsInDbspaceDir(const char *dbspacedirname, int op)
  			copy_file(srcpath, dstpath);
  		}
  
- 		/* Done with the first pass. */
  		FreeDir(dbspace_dir);
  	}
  }
--- 337,342 ----
#2Robert Haas
robertmhaas@gmail.com
In reply to: Jeff Davis (#1)
Re: Minor comment fixups

On Mon, Aug 27, 2012 at 11:21 PM, Jeff Davis <pgsql@j-davis.com> wrote:

I noticed a couple comments that look wrong to me. Patch attached.

Thanks, committed. But I updated the parenthesized comment in the
first fix instead of removing it. Let me know if you see an issue
with that.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company