他のバージョンの文書 15 | 14 | 13 | 12 | 11 | 10 | 9.6 | 9.5 | 9.4 | 9.3 | 9.2 | 9.1 | 9.0 | 8.4 | 8.3 | 8.2 | 8.1 | 8.0 | 7.4 | 7.3 | 7.2

A.16. リリース 6.5

リリース日: 1999-06-09

このリリースは、開発チームが、バークレイから継承したソースコードに熟達した段階であることを示します。大きな機能を簡単に追加できるようになったことが判るでしょう。全世界にわたる開発チームの規模と経験が増えたおかげです。

以下に、より注目すべき変更点を簡単に説明します。

多版型同時実行制御(MVCC)

これは、古いテーブルレベルロックを取り去り、ほとんどの商用データベースシステムよりも優れたロックシステムで置き換えます。伝統的なシステムでは、変更された各行はコミットされるまでは、他のユーザから読み込まれないように、ロックされます。MVCC はPostgreSQL 固有の多版性を使用して、書き込み活動中のデータに対する読み込み側からの一貫性のある読み込みを可能にします。書き込み側は、小さめの pg_log トランザクションシステムを継続して使用することができます。これによって、伝統的なデータベースシステムのような、各行に対するロックの割り当てを行うことなく、すべてを行うことができます。ですから、基本的には、単純なテーブルレベルのロックによって制限することはなくなります。行レベルのロックよりも多少優れたものを持つことになりました。

pg_dump によるホットバックアップ

pg_dump は新しい MVCC 機能を使用して、問い合わせを実行できるオンライン状態のデータベースに対する、完全なデータベースのダンプ/バックアップができるようになりました。

数値データ型

ユーザ指定の精度を持つ、本当の数値データ型を持つようになりました。

一時テーブル

一時テーブルはデータベースセッションにおいて一意な名前を持つこと、および、セッション終了時に削除されることが保証されます。

新しい SQL 機能

CASE、INTERSECT、EXCEPT 文をサポートするようになりました。新しく LIMIT/OFFSET、SET TRANSACTION ISOLATION LEVEL、SELECT ... FOR UPDATE を用意しました。また、LOCK TABLE コマンドを改良しました。

高速化

チーム内の才能による、PostgreSQL の高速化を継続して行いました。メモリ割り当て、最適化、テーブルの結合、行転送ルーチンを高速化しました。

Ports

移植リストの拡張を継続して行いました。今回は Windows NT/ix86NetBSD/arm32 を含めました。

インタフェース

ほとんどのインタフェースは新しいバージョンになり、既存の機能は改良されました。

文書

文書全体に対して、新規のもの、更新されたものがあります。 SGIAIX プラットフォーム用のFAQ が新しく配布されました。 Tutorial は Stefan Simkovics による SQL の入門情報です。ユーザガイド には、postmaster からより多くのユーティリティプログラムまでを範囲とするリファレンスページがあります。またその付録には日付/時刻の動作の詳細があります。管理者ガイド には、Tom Lane によるトラブル対応に関する新しい章が追加されました。 プログラマガイド には、これもまた Stefan による、問い合わせ処理の説明があります。また、匿名 CVSCVSup 経由の PostgreSQL ソースツリーの入手についても説明があります。

A.16.1. バージョン 6.5 への移行方法

以前のリリースのPostgreSQL からデータを移行する場合、pg_dump によるダンプ/リストアが必要です。 pg_upgrade を使用してこのリリースにアップグレードすることは できません。テーブルのディスク上の構造がこれまでのリリースから変更されたからです。

多版型同時実行制御(MVCC) 機能は、マルチユーザ環境下においてどこか異なる動作をもたらします。以下の節を熟読して、既存のアプリケーションが必要な動作を行うことを確認して下さい。

A.16.1.1. 多版型同時実行制御

6.5 における読み込み操作はデータをロックしませんので、トランザクション隔離レベルに関係なく、あるトランザクションで読み込まれたデータは、他の操作によって変更されることがあります。言い替えると、SELECT で読み込まれた行は、返された(つまり、文またはトランザクションの始まりから少し後の)時点に存在した行を意味し、現在のトランザクションがコミット、またはロールバックするまでの間、同時に実行されるトランザクションによる更新や削除から保護される行であることは意味しません。

行が実際に存在することを確実にする、または、同時に行われる更新から保護するためには、SELECT FOR UPDATE または、適切な LOCK TABLE 文を使用しなければなりません。これは、 PostgreSQL の以前のリリース、もしくは、他の環境からアプリケーションを移植する場合には考慮しなければなりません。

contrib/refint.* トリガを参照整合性のために使用している場合は、上のことに注意して下さい。今のところ更に技術を追加しなければなりません。1 つの方法は、トランザクションがプライマリキーを更新、削除する時に LOCK parent_table IN SHARE ROW EXCLUSIVE MODE コマンドを使用し、トランザクションが外部キーを更新、挿入する時に、 LOCK parent_table IN SHARE MODE コマンドを使用することです。

Note: SERIALIZABLE モードでトランザクションを実行している場合、上の LOCK コマンドを、そのトランザクションで何らかの DML 文(SELECT/INSERT/DELETE/UPDATE/FETCH/COPY_TO)を実行する前に実行しなければなりません。

これらの不便な点は、ダーティー(コミットされていない)データを(隔離レベルに関係なく)読み込む機能と本当の参照整合性が実装された時になくなります。

A.16.2. 変更点

Bug Fixes
---------
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 multi-segment 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 multi-segment 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)

Enhancements
------------
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)
Multi-version 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)

Source Tree Changes
-------------------
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 HP-UX 11 and UnixWare
Improve file handling to be more uniform, prevent file descriptor leak(Tom)
New install commands for plpgsql(Jan)