| PostgreSQL 7.4 文檔 | ||||
|---|---|---|---|---|
| Prev | Fast Backward | Appendix E. 版本信息 | Fast Forward | Next |
發布日期: 1999-06-09
這個版本標志著開發隊伍對從伯克利繼承過來的代碼的掌握和理解 達到了一個新的階段。 你將看到現在我們更容易增加新的特性, 這些得益于我們全世界開發隊伍的不斷壯大和經驗的不斷豐富。
下面是一些最引人注意的改變的簡介:
這個東西廢止了我們老式的表級別的鎖, 取而代之的是一個比大多數商用數據庫系統都先進的鎖系統。 在傳統的系統裡,每行的修改是先鎖住,直到提交, 以此避免被其他用戶讀取。MVCC 利用 PostgreSQL 天生 的多版本特性允許讀者在寫活動中讀取連貫的數據。 寫入者繼續使用緊湊的 pg_log 事務系統。所有這些都是 在不需要為每行分配一個鎖(象傳統的數據庫系統那樣)的情況下進行的。 因此,原則上我們不再受制于簡單 的表級別鎖;我們有比行級別鎖更好的技術。
pg_dump 利用了新的 MVCC 特性, 可以在數據庫保持在線和可以執行查詢的情況下, 進行一次持續的數據傾倒 /備份。
我們現在有了真正的數字數據類型,可以由用戶定義精度。
我們保證臨時表在一次數據庫會話過程中唯一,並且在會話結束時刪除。
我們現在有了 CASE,INTERSECT 和 EXCEPT 語句。 我們有了新的 LIMIT/OFFSET,SET TRANSACTION ISOLATION LEVEL,SELECT ... FOR UPDATE 和一個改進了的 LOCK TABLE 命令。
感謝我們隊伍裡的許多聰明的頭腦,我們繼續給 PostgreSQL 提速。 我們加速了存儲器分配,優化,表聯合以及行傳輸 過程。
我們繼續擴展我們的移植列表,這回包括了 WinNT/ix86 和 NetBSD/arm32。
大多數接口有了新的版本,現有的功能也被改進了。
在這個文檔裡所有地方都有新的和更新了的內容。 新的 FAQ已經包含了 SGI 和 AIX 平台的內容。 教程 裡包含了來自Stefan Simkovics 的關于 SQL 的介紹性信息。 對于用戶手冊, 我們包括了關于 postmaster 和更多工具程序的參考 內容,還有一個描述日期時間詳細特性的附件。 管理員手冊包含了一個 Tom Lane 的新的關于錯誤分析的章節。 程序員手冊 包括了 Stefan 寫的查詢處理的描述, 以及通過匿名 CVS 和 CVSup獲取 PostgreSQL 源碼樹的詳細內容。
要想從以前的 PostgreSQL 版本遷移到新的版本, 我們需要進行一次用 pg_dump 進行傾倒/恢復的工作. 不能用 pg_upgrade 升級到這個版本,因為和以前版本相比, 表在磁盤上的(存儲)結構已經經過修改了。
新的多版本並行控制(MVCC)特性在多用戶環境裡可能有一些不同的表現。 閱讀並理解下面段落,確保你現有 的應用將表現出你所希望的特性。
因為不管事務的隔離級別是什麼,6.5 裡的讀動作不鎖定數據, 一個事務讀的數據可能被其他事務覆蓋。換句話說,如果 SELECT 返回了一行並不意味著該行在被返回的時候 (也就是說在語句或者事務開始後的某個時間) 真正存在, 也不意味著在當前事務做提交或者回卷之前該行被保護免于被 並行事務刪除或者修改。
要保證一行的確實存在或者保護它免于被並行更新,我們必須使用 SELECT FOR UPDATE 或 一個合適的 LOCK TABLE 語句。我們在從以前的 PostgreSQL 和其他環境移植應用時必須考慮這一點。
如果你正用 contrib/refint.* 觸發器保證參考完整性, 你就必須記住上面幾條。 現在還需要額外的技巧。一個方法是: 如果一個事務準備更新/刪除一個主鍵時,使用 LOCK parent_table IN SHARE ROW EXCLUSIVE MODE 命令,如果一個事務準備更新/插入一個外鍵時使用 LOCK parent_table IN SHARE MODE命令。
注意: 要注意如果你運行一個處于 SERIALIZABLE 模式下的事務, 在該事務裡,你必須在執行任何 DML (SELECT/INSERT/DELETE/UPDATE/FETCH/COPY_TO) 語句之前執行上面提到的 LOCK 命令。
這些不便將在今後我們實現了讀污染(未提交)數據的能力 (不管什麼隔離級別)和真正的參考完整性後消失。
修補
---------
Fix text<->float8 and text<->float4 conversion functions(Thomas)
Fix for creating tables with mixed-case constraints(Billy)
Change exp()/pow() behavior to generate error on underflow/overflow(Jan)
Fix bug in pg_dump -z
Memory overrun cleanups(Tatsuo)
Fix for lo_import crash(Tatsuo)
Adjust handling of data type names to suppress double quotes(Thomas)
Use type coercion for matching columns and DEFAULT(Thomas)
Fix deadlock so it only checks once after one second of sleep(Bruce)
Fixes for aggregates and PL/pgsql(Hiroshi)
Fix for subquery crash(Vadim)
Fix for libpq function PQfnumber and case-insensitive names(Bahman Rafatjoo)
Fix for large object write-in-middle, no extra block, memory consumption(Tatsuo)
Fix for pg_dump -d or -D and quote special characters in INSERT
Repair serious problems with dynahash(Tom)
Fix INET/CIDR portability problems
Fix problem with selectivity error in ALTER TABLE ADD COLUMN(Bruce)
Fix executor so mergejoin of different column types works(Tom)
Fix for Alpha OR selectivity bug
Fix OR index selectivity problem(Bruce)
Fix so \d shows proper length for char()/varchar()(Ryan)
Fix tutorial code(Clark)
Improve destroyuser checking(Oliver)
Fix for Kerberos(Rodney McDuff)
Fix for dropping database while dirty buffers(Bruce)
Fix so sequence nextval() can be case-sensitive(Bruce)
Fix !!= operator
Drop buffers before destroying database files(Bruce)
Fix case where executor evaluates functions twice(Tatsuo)
Allow sequence nextval actions to be case-sensitive(Bruce)
Fix optimizer indexing not working for negative numbers(Bruce)
Fix for memory leak in executor with fjIsNull
Fix for aggregate memory leaks(Erik Riedel)
Allow username containing a dash GRANT permissions
Cleanup of NULL in inet types
Clean up system table bugs(Tom)
Fix problems of PAGER and \? command(Masaaki Sakaida)
Reduce default multisegment file size limit to 1GB(Peter)
Fix for dumping of CREATE OPERATOR(Tom)
Fix for backward scanning of cursors(Hiroshi Inoue)
Fix for COPY FROM STDIN when using \i(Tom)
Fix for subselect is compared inside an expression(Jan)
Fix handling of error reporting while returning rows(Tom)
Fix problems with reference to array types(Tom,Jan)
Prevent UPDATE SET oid(Jan)
Fix pg_dump so -t option can handle case-sensitive tablenames
Fixes for GROUP BY in special cases(Tom, Jan)
Fix for memory leak in failed queries(Tom)
DEFAULT now supports mixed-case identifiers(Tom)
Fix for multisegment uses of DROP/RENAME table, indexes(Ole Gjerde)
Disable use of pg_dump with both -o and -d options(Bruce)
Allow pg_dump to properly dump GROUP permissions(Bruce)
Fix GROUP BY in INSERT INTO table SELECT * FROM table2(Jan)
Fix for computations in views(Jan)
Fix for aggregates on array indexes(Tom)
Fix for DEFAULT handles single quotes in value requiring too many quotes
Fix security problem with non-super users importing/exporting large objects(Tom)
Rollback of transaction that creates table cleaned up properly(Tom)
Fix to allow long table and column names to generate proper serial names(Tom)
增強
------------
Add "vacuumdb" utility
Speed up libpq by allocating memory better(Tom)
EXPLAIN all indexes used(Tom)
Implement CASE, COALESCE, NULLIF expression(Thomas)
New pg_dump table output format(Constantin)
Add string min()/max() functions(Thomas)
Extend new type coercion techniques to aggregates(Thomas)
New moddatetime contrib(Terry)
Update to pgaccess 0.96(Constantin)
Add routines for single-byte "char" type(Thomas)
Improved substr() function(Thomas)
Improved multibyte handling(Tatsuo)
Multiversion concurrency control/MVCC(Vadim)
New Serialized mode(Vadim)
Fix for tables over 2gigs(Peter)
New SET TRANSACTION ISOLATION LEVEL(Vadim)
New LOCK TABLE IN ... MODE(Vadim)
Update ODBC driver(Byron)
New NUMERIC data type(Jan)
New SELECT FOR UPDATE(Vadim)
Handle "NaN" and "Infinity" for input values(Jan)
Improved date/year handling(Thomas)
Improved handling of backend connections(Magnus)
New options ELOG_TIMESTAMPS and USE_SYSLOG options for log files(Massimo)
New TCL_ARRAYS option(Massimo)
New INTERSECT and EXCEPT(Stefan)
New pg_index.indisprimary for primary key tracking(D'Arcy)
New pg_dump option to allow dropping of tables before creation(Brook)
Speedup of row output routines(Tom)
New READ COMMITTED isolation level(Vadim)
New TEMP tables/indexes(Bruce)
Prevent sorting if result is already sorted(Jan)
New memory allocation optimization(Jan)
Allow psql to do \p\g(Bruce)
Allow multiple rule actions(Jan)
Added LIMIT/OFFSET functionality(Jan)
Improve optimizer when joining a large number of tables(Bruce)
New intro to SQL from S. Simkovics' Master's Thesis (Stefan, Thomas)
New intro to backend processing from S. Simkovics' Master's Thesis (Stefan)
Improved int8 support(Ryan Bradetich, Thomas, Tom)
New routines to convert between int8 and text/varchar types(Thomas)
New bushy plans, where meta-tables are joined(Bruce)
Enable right-hand queries by default(Bruce)
Allow reliable maximum number of backends to be set at configure time
(--with-maxbackends and postmaster switch (-N backends))(Tom)
GEQO default now 10 tables because of optimizer speedups(Tom)
Allow NULL=Var for MS-SQL portability(Michael, Bruce)
Modify contrib check_primary_key() so either "automatic" or "dependent"(Anand)
Allow psql \d on a view show query(Ryan)
Speedup for LIKE(Bruce)
Ecpg fixes/features, see src/interfaces/ecpg/ChangeLog file(Michael)
JDBC fixes/features, see src/interfaces/jdbc/CHANGELOG(Peter)
Make % operator have precedence like /(Bruce)
Add new postgres -O option to allow system table structure changes(Bruce)
Update contrib/pginterface/findoidjoins script(Tom)
Major speedup in vacuum of deleted rows with indexes(Vadim)
Allow non-SQL functions to run different versions based on arguments(Tom)
Add -E option that shows actual queries sent by \dt and friends(Masaaki Sakaida)
Add version number in start-up banners for psql(Masaaki Sakaida)
New contrib/vacuumlo removes large objects not referenced(Peter)
New initialization for table sizes so non-vacuumed tables perform better(Tom)
Improve error messages when a connection is rejected(Tom)
Support for arrays of char() and varchar() fields(Massimo)
Overhaul of hash code to increase reliability and performance(Tom)
Update to PyGreSQL 2.4(D'Arcy)
Changed debug options so -d4 and -d5 produce different node displays(Jan)
New pg_options: pretty_plan, pretty_parse, pretty_rewritten(Jan)
Better optimization statistics for system table access(Tom)
Better handling of non-default block sizes(Massimo)
Improve GEQO optimizer memory consumption(Tom)
UNION now suppports ORDER BY of columns not in target list(Jan)
Major libpq++ improvements(Vince Vielhaber)
pg_dump now uses -z(ACL's) as default(Bruce)
backend cache, memory speedups(Tom)
have pg_dump do everything in one snapshot transaction(Vadim)
fix for large object memory leakage, fix for pg_dumping(Tom)
INET type now respects netmask for comparisons
Make VACUUM ANALYZE only use a readlock(Vadim)
Allow VIEWs on UNIONS(Jan)
pg_dump now can generate consistent snapshots on active databases(Vadim)
源代碼樹修改
-------------------
Improve port matching(Tom)
Portability fixes for SunOS
Add NT/Win32 backend port and enable dynamic loading(Magnus and Daniel Horak)
New port to Cobalt Qube(Mips) running Linux(Tatsuo)
Port to NetBSD/m68k(Mr. Mutsuki Nakajima)
Port to NetBSD/sun3(Mr. Mutsuki Nakajima)
Port to NetBSD/macppc(Toshimi Aoki)
Fix for tcl/tk configuration(Vince)
Removed CURRENT keyword for rule queries(Jan)
NT dynamic loading now works(Daniel Horak)
Add ARM32 support(Andrew McMurry)
Better support for HPUX 11 and UnixWare
Improve file handling to be more uniform, prevent file descriptor leak(Tom)
New install commands for plpgsql(Jan)