PostgreSQL 2008年4月第2周新闻综述 -- 2008/04/13
From PostgreSQL 中文维基, PostgreSQL 中文站, PostgreSQL 中国社区, PostgreSQL Chinese community
[编辑] PostgreSQL相关软件新闻
check_postgres 1.4.2版本发布,详情可浏览:http://bucardo.org/nagios/
Npgsql 2第三测试版本发布,详情可浏览:http://pgfoundry.org/projects/npgsql/
pg_bulkload-2.3.0版本发布,详情可浏览:http://pgbulkload.projects.postgresql.org/
pgpool-II 2.1 第二测试版本发布,详情可浏览:http://pgfoundry.org/projects/pgpool/
pg_top(以前名称叫ptop) 3.6.2第三测试版本发布,http://ptop.projects.postgresql.org/
SkyTools 2.1.6 版本发布,详情可浏览:http://pgfoundry.org/projects/skytools/
[编辑] PostgreSQL四月相关工作机会
详情可浏览:http://archives.postgresql.org/pgsql-jobs/2008-04/threads.php
[编辑] PostgreSQL 各地新闻
俄罗斯2008互联网技术大会将于4/14--15日在莫斯科举行,详情可浏览:http://rit2008.ru
意大利PostgreSQL用户协会将出席“PostgreSQL,公共部门的一个免费的数据库“活动,该活动于Sardinia的Pula举行,这也是意大利公共部门对免费软件所举行的一个主要宣传活动,详情可浏览:http://www.paal2008.it/
第九届开源免费软件论坛(FISL)将于2008/4/17--19在巴西的Porto Alegre举行,详情可浏览:https://fisl.softwarelivre.org/9.0/
2008年巴西PostgreSQL日将于4/22 在Campinas举行,详情可浏览:http://www.dextra.com.br/dia-postgresql.htm
企业数据库2008年会将于4/24--25在莫斯科举行,详情可浏览:http://citforum.ru/seminars/cbd2008/
PGCon 2008年度大会将于05/20--23在渥太华举行,详情可浏览:http://www.pgcon.org/2008/
PostgreSQL日将在开源大会(OSCON)之前于波特兰举行,详情可浏览:http://pugs.postgresql.org/taxonomy/term/53
犹他州2008开源软件大会自6/1起开放注册,这个第二次的年度大会将于2008/08/28--30日在Salt Lake举行,详情可浏览:http://2008.utosc.com/
[编辑] PostgreSQL其他新闻
PostgreSQL网志站点:http://www.planetpostgresql.org/
PostgreSQL技巧站点,目前主要为一些存档文章和很少的更新:http://www.varlena.com/GeneralBits/
PostgreSQL本周新闻综述是由David Fetter带给我们大家的,谢谢他的工作。
如果您想提交一些新闻或是软件发布稿等内容可在每周星期天的下午3:00(太平洋时区)前,英文版的内容可发送至david@fetter.org,德文版本的内容可发送至pwn@pgug.de,意大利语版本的内容可发至pwn@itpug.org
[编辑] 本周打入系统的补丁
Peter Eisentraut 打入系统的补丁:
- Implement a few changes to how shared libraries and dynamically loadable modules are built. Foremost, it creates a solid
distinction between these two types of targets based on what had already been implemented and duplicated in ad hoc ways before. Specifically, dynamically loadable modules no longer get a soname. The numbers previously set in the makefiles were dummy numbers anyway, and the presence of a soname upset a few packaging tools, so it is nicer not to have one. The cumbersome detour taken on installation (build a libfoo.so.0.0.0 and then override the rule to install foo.so instead) is removed. Lots of duplicated code simplified.
- In pgsql/src/Makefile.shlib, always define stlib, since some platforms need it for building modules. Should fix build failures on AIX.
- In pgsql/src/Makefile.shlib, on cygwin and win32, don't override the shlib name when building a module. Should fix regression test failures on those platforms.
Magnus Hagander 打入系统的补丁:
- In pgsql/src/tools/msvc/config.pl, make integer_datetimes the default on msvc as well, to have the same default as other platforms.
- In pgsql/src/interfaces/libpq/fe-lobj.c, make parameters in implementation have same const:ness as the ones in the prototype. Silences msvc build warning.
- Create wrapper pgwin32_safestat() and redefine stat() to it on win32, because the stat() function in the runtime cannot be trusted
to always update the st_size field. Per report and research by Sergey Zubkovsky.
Tom Lane 打入系统的补丁:
- In pgsql/src/backend/utils/adt/tsvector_op.c, fix tsvector_update_trigger() to be domain-friendly: it needs to allow all the columns it works with to be domains over the expected type, not just exactly the expected type. In passing, fix ts_stat() the same way. Per report from Markus Wollny.
- Replace "amgetmulti" AM functions with "amgetbitmap", in which the whole indexscan always occurs in one call, and the results are
returned in a TIDBitmap instead of a limited-size array of TIDs. This should improve speed a little by reducing AM entry/exit overhead, and it is necessary infrastructure if we are ever to support bitmap indexes. In an only slightly related change, add support for TIDBitmaps to preserve (somewhat lossily) the knowledge that particular TIDs reported by an index need to have their quals rechecked when the heap is visited. This facility is not really used yet; we'll need to extend the forced-recheck feature to plain indexscans before it's useful, and that hasn't been coded yet. The intent is to use it to clean up 8.3's horrid @@@ kluge for text search with weighted queries. There might be other uses in future, but that one alone is sufficient reason. Heikki Linnakangas, with some adjustments by me.
- Fix several datatype input functions that were allowing unused bytes in their results to contain uninitialized, unpredictable values.
While this was okay as far as the datatypes themselves were concerned, it's a problem for the parser because occurrences of the "same" literal might not be recognized as equal by datumIsEqual (and hence not by equal()). It seems sufficient to fix this in the input functions since the only critical use of equal() is in the parser's comparisons of ORDER BY and DISTINCT expressions. Per a trouble report from Marc Cousin. Patch all the way back. Interestingly, array_in did not have the bug before 8.2, which may explain why the issue went unnoticed for so long.
- Add some debug support code to try to catch future mistakes in the area of input functions that include garbage bytes in their results.
Provide a compile-time option RANDOMIZE_ALLOCATED_MEMORY to make palloc fill returned blocks with variable contents. This option also makes the parser perform conversions of literal constants twice and compare the results, emitting a WARNING if they don't match. (This is the code I used to catch the input function bugs fixed in the previous commit.) For the moment, I've set it to be activated automatically by --enable-cassert.
- A quick try at un-breaking the Cygwin build. Whether it needs the
pgwin32_safestat remains to be determined, but in any case the current code is not tolerable.
- Create new routines systable_beginscan_ordered,
systable_getnext_ordered, systable_endscan_ordered that have API similar to systable_beginscan etc (in particular, the passed-in scankeys have heap not index attnums), but guarantee ordered output, unlike the existing functions. For the moment these are just very thin wrappers around index_beginscan/index_getnext/etc. Someday they might need to get smarter; but for now this is just a code refactoring exercise to reduce the number of direct callers of index_getnext, in preparation for changing that function's API. In passing, remove index_getnext_indexitem, which has been dead code for quite some time, and will have even less use than that in the presence of run-time-lossy indexes.
- Clean up a few places where Datums were being treated as pointers
without going through DatumGetPointer or some other "official" conversion macro. Not actually a bug, since Datum the same size as pointer is the only supported case at the moment, but good cleanup for the future. Gavin Sherry.
- Turn the -i/--ignore-version options of pg_dump and pg_dumpall into
no-ops: the server version check is now always enforced. Relax the version check to allow a server that is of pg_dump's own major version but a later minor version; this is the only case that -i was at all safe to use in. pg_restore already enforced only a very weak version check, so this is really just a documentation change for it. Per discussion.
- Phase 2 of project to make index operator lossiness be determined at
runtime instead of plan time. Extend the amgettuple API so that the index AM returns a boolean indicating whether the indexquals need to be rechecked, and make that rechecking happen in nodeIndexscan.c (currently the only place where it's expected to be needed; other callers of index_getnext are just erroring out for now). For the moment, GIN and GIST have stub logic that just always sets the recheck flag to TRUE --- I'm hoping to get Teodor to handle pushing that control down to the opclass consistent() functions. The planner no longer pays any attention to amopreqcheck, and that catalog column will go away in due course.
- Since createplan.c no longer cares whether index operators are
lossy, it has no particular need to do get_op_opfamily_properties() while building an indexscan plan. Postpone that lookup until executor start. This simplifies createplan.c a lot more than it complicates nodeIndexscan.c, and makes things more uniform since we already had to do it that way for RowCompare expressions. Should be a bit faster too, at least for plans that aren't re-used many times, since we avoid palloc'ing and perhaps copying the intermediate list data structure.
Bruce Momjian committed:
- In FAQ, remove mention of the Berkeley origins of the alias
"Postgres" --- seems unnecessary to mention in the FAQ, per discussion on IRC.
- Revert sentence removal from nickname in FAQ.
- Revert README cleanups.
- Small wording improvements for source code READMEs.
- Update text FAQ.
- In pgsql/doc/src/sgml/backup.sgml, document that continuous
archiving backup can be used for cases where you can't get a simultaneous snapshot.
- Add TODO URLs moved from open items queue.
- Fix main README typo. Brendan Jurd.
- In TODO, update URLs for dead space map.
- Add TODO: "Support procedures, which return no value."
- Update TODO wording to read: "Allow calling of a procedure outside a
SELECT that can control the transaction state."
Michael Meskes committed:
- In ecpg, PGTYPEStimestamp_sub should use the values and not the
pointers to substract.
Alvaro Herrera committed:
- Mention pg_backend_pid() in the system information section in
addition to the monitoring section. Jim Nasby
- In pgsql/doc/src/sgml/plperl.sgml, remove mention of DBD::PgSPI,
which is unmaintained and generally unnecessary.
Marc Fournier committed:
- Add a global cvsignore know, currently just with objfiles.txt in it.
[编辑] Rejected Patches (for now)
Andrew Chernow's libpq Win32 mutex performance patch. Needs revisions.
Bruce Momjian's patch which allows adminstrators to terminate sessions with SIGTERM. It doesn't handle the case where UDFs trap SIGTERM.
[编辑] Pending Patches
Magnus Hagander sent in a patch which implements wal_sync_method as an enum.
Alvaro Herrera sent in another revision of his patch to turn ActiveSnapshot from a global pointer to a stack.
Zoltan Boszormenyi sent in another revision of his patch to implement TRUNCATE TABLE with IDENTITY.
Gregory Stark sent in a patch which lets people see EXPLAIN progress information.
David Fetter sent in a patch which lets psql's \dT see the elements of enums.
Laurenz Albe sent in another revision of his patch to improve shutdown during online backup.
Sibte Abbas sent in another revision of his psql slash# command patch.
Andrew Chernow sent in three more revisions of his patch to libpq which adds a pqtypes hook API.
Brendan Jurd sent in a patch to implement a printTable API for psql and friends.
