2013-10-05 47 views
1

我正在这个Heroku tutorial和我有一个关于autovacuum过程的问题。目前还没有表格或数据,并且自动清理发射器挂了半个多小时。以下是cmd窗口。Postgresql:日志:自动清理启动器挂起(显然)

我找到了一个类似的question here,但找不到答案。有谁知道发生了什么事?

作为总结:LOG: autovacuum launcher started光标在最后一行下闪烁,但没有什么是happenning半小时以上的最后一行之后。

C:\Users\a>initdb pg 
The files belonging to this database system will be owned by user "a". 
This user must also own the server process. 

The database cluster will be initialized with locale "English_United States.1252 
". 
The default database encoding has accordingly been set to "WIN1252". 
The default text search configuration will be set to "english". 

Data page checksums are disabled. 

initdb: directory "pg" exists but is not empty 
If you want to create a new database system, either remove or empty 
the directory "pg" or run initdb 
with an argument other than "pg". 

C:\Users\a>postgres -D pg & 
LOG: database system was interrupted; last known up at 2013-10-05 13:46:39 EDT 
LOG: database system was not properly shut down; automatic recovery in progress 

LOG: record with zero length at 0/17704F8 
LOG: redo is not required 
LOG: database system is ready to accept connections 
LOG: autovacuum launcher started 

编辑

正如bma的意见建议,我删除了pg目录和项目目录,我又做了同样的步骤,我得到了相同的结果:LOG: autovacuum launcher started和它挂起。我错了什么?


编辑

我打开了一个新的命令窗口,并启动了REPL那里,我能够执行

C:\Users\a\CLOJURE\shouter>lein repl 

user=> (require '[clojure.java.jdbc :as sql]) 
nil 

但下一个命令提供了以下错误:

user=> (sql/with-connection (System/getenv "DATABASE_URL") 
    #_=>   (sql/create-table :testing [:data :text])) 


user=> IllegalArgumentException db-spec null is missing a required parameter cl 
ojure.java.jdbc/get-connection (jdbc.clj:192) 

我该如何解决这个问题?


编辑

原来, '出口' 是UNIX和Windows中我需要使用 '设置'。请参阅related question

+2

是不是只是日志输出?除非有别的事情要记录,为什么会这样呢?你能看到自动清理过程是否正在运行?看起来你的步骤在那里,它看起来像你需要删除“pg”目录并重试你的步骤 - 我猜这至少是你第二次尝试这些步骤与相同的目录名为“ PG”。 – bma

+0

你说得对,这是第二次。我想我不明白'postgres -D pg&'的作用。我甚至找不到“D”代表什么?我如何删除“pg”目录? – Zeynel

+0

我在这里找到了一些信息https://forum.linode.com/viewtopic.php?p=49670,但我仍然不明白发生了什么... – Zeynel

回答

2

发生什么事是你直接用pg目录启动postgres,并看到日志输出。最好在Windows上将它作为服务安装,并使用默认的数据目录。这是正常的安装程序所做的。

然而,你现在的方法只会运行分贝,直到你关闭终端窗口,它将死在哪一点(因此在开始恢复)。你没有挂过程。这只是日志输出。