| PostgreSQL 8.0.0 中文文件(轉譯自 PostgreSQL 中國 製作的簡體中文版本) | ||||
|---|---|---|---|---|
| Prev | Fast Backward | Appendix E. 版本訊息 | Fast Forward | Next |
發佈日期: 2004-03-08
這個版本包含自 7.4.1 以來的各種補丁。
對於執行 7.4.X 的用戶,不需要轉儲/重載。不過,轉儲/重載是修復在 7.4.X 版本的系統資料表裡面的兩個錯誤的最簡單的方法。 使用 7.4.2 的 initdb 然後走一遍轉儲/initdb/重載序列將自動修復這些問題。
這兩個錯誤中更嚴重的是資料類型 anyarray 的對齊標籤是錯誤的; 這個有問題是因為 pg_statistic 系統資料表使用 anyarray 字串。 這個標籤錯誤可能導致規劃器在規劃涉及使用雙精度對齊的字串(比如 float8 和 timestamp)的 WHERE 子句的時候估計錯誤甚至是崩潰。我們強烈建議所有安裝都修復這個錯誤,要麼是透過 initdb,要麼是使用下面介紹的手工修復方法。
弱一些的錯誤是系統視圖 pg_settings 應該標誌為公共的更新訪問, 以允許 UPDATE pg_settings 用於 SET 的替代。 這個也可以透過 initdb 或者手工修復,不過除非您想使用 UPDATE pg_settings,否則不是必須的。
如果您不想做 initdb,下面的步驟可以修復 pg_statistic。 以資料庫超級用戶身份,做下面的操作:
-- 清除 pg_statistic 裡的舊資料: DELETE FROM pg_statistic; VACUUM pg_statistic; -- 這個會更新 1 行: UPDATE pg_type SET typalign = 'd' WHERE oid = 2277; -- 這個會更新 6 行: UPDATE pg_attribute SET attalign = 'd' WHERE atttypid = 2277; -- -- 這個時候您必須啟動一個新的後端以避免崩潰! -- -- 重新填充 pg_statistic: ANALYZE;
這些工作可以在一個活躍的資料庫裡處理,但是要注意在安全地重新填充 pg_statistic 之前, 所有在更改的資料庫裡執行的後端都要重啟。
要修復 pg_settings 錯誤,簡單地:
GRANT SELECT, UPDATE ON pg_settings TO PUBLIC;
上面的過程必須在一個安裝中的每個資料庫裡執行, 包括 template1,最好也包括 template0。 如果您不修補模版資料庫,那麼隨後建立的資料庫將會也包含同樣的錯誤。 template1 可以像其它資料庫那樣修補,但修補 template0 需要一些額外的步驟。 首先,從任意資料庫裡發出
UPDATE pg_database SET datallowconn = true WHERE datname = 'template0';
然後連接到 template0 然後執行上面的修復過程。最後,
-- 重新凍結 template0: VACUUM FREEZE; -- 然後保護它避免進一步的更改: UPDATE pg_database SET datallowconn = false WHERE datname = 'template0';
版本 7.4.2 包含所有版本 7.3.6 的補丁,加上下面這些修補:
Fix pg_statistics alignment bug that could crash optimizer
See above for details about this problem.
Allow non-super users to update pg_settings
Fix several optimizer bugs, most of which led to "variable not found in subplan target lists" errors
Avoid out-of-memory failure during startup of large multiple index scan
Fix multibyte problem that could lead to "out of memory" error during COPY IN
Fix problems with SELECT INTO / CREATE TABLE AS from tables without OIDs
Fix problems with alter_table regression test during parallel testing
Fix problems with hitting open file limit, especially on OS X (Tom)
Partial fix for Turkish-locale issues
initdb will succeed now in Turkish locale, but there are still some inconveniences associated with the i/I problem.
Make pg_dump set client encoding on restore
Other minor pg_dump fixes
Allow ecpg to again use C keywords as column names (Michael)
Added ecpg WHENEVER NOT_FOUND to SELECT/INSERT/UPDATE/DELETE (Michael)
Fix ecpg crash for queries calling set-returning functions (Michael)
Various other ecpg fixes (Michael)
Fixes for Borland compiler
Thread build improvements (Bruce)
Various other build fixes
Various JDBC fixes