我正在這個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。
是不是隻是日誌輸出?除非有別的事情要記錄,爲什麼會這樣呢?你能看到自動清理過程是否正在運行?看起來你的步驟在那裏,它看起來像你需要刪除「pg」目錄並重試你的步驟 - 我猜這至少是你第二次嘗試這些步驟與相同的目錄名爲「 PG」。 – bma
你說得對,這是第二次。我想我不明白'postgres -D pg&'的作用。我甚至找不到「D」代表什麼?我如何刪除「pg」目錄? – Zeynel
我在這裏找到了一些信息https://forum.linode.com/viewtopic.php?p=49670,但我仍然不明白髮生了什麼... – Zeynel