浏览代码

Merge pull request #1982 from valyala/master

fasthttp-postgresql: cleanup: removed 'synchronous_commit=off' from db setup
Mike Smith 9 年之前
父节点
当前提交
ee4c6b0e66
共有 1 个文件被更改,包括 0 次插入9 次删除
  1. 0 9
      frameworks/Go/fasthttp-postgresql/server.go

+ 0 - 9
frameworks/Go/fasthttp-postgresql/server.go

@@ -291,15 +291,6 @@ func initDatabase(dbHost string, dbUser string, dbPass string, dbName string, db
 		worldSelectStmt = mustPrepare(conn, "worldSelectStmt", "SELECT id, randomNumber FROM World WHERE id = $1")
 		worldUpdateStmt = mustPrepare(conn, "worldUpdateStmt", "UPDATE World SET randomNumber = $1 WHERE id = $2")
 		fortuneSelectStmt = mustPrepare(conn, "fortuneSelectStmt", "SELECT id, message FROM Fortune")
-
-		// Disable synchronous commit for the current db connection
-		// as a performance optimization.
-		// See http://www.postgresql.org/docs/current/static/runtime-config-wal.html
-		// for details.
-		if _, err := conn.Exec("SET synchronous_commit TO OFF"); err != nil {
-			log.Fatalf("Error when disabling synchronous commit")
-		}
-
 		return nil
 	}