Der Originalartikel befindet sich unter:
== Wöchentlicher PostgreSQL Newsletter - 18. Mai 2008 ==
Wie erwartet, geht das Mai Commitfest wesentlich flüssiger voran als
Tatsuo Ishii hat einen Patch für WITH RECURSIVE eingesandt. Wenn dieser
Patch akzeptiert wird, wird PostgreSQL die erste FOSS Datenbank sein,
die eine direkte Unterstützung für Baumstrukturen und Graphen hat.
== PostgreSQL Produkt Neuigkeiten ==
check_postgres 1.6.1 erschienen.
Slony-I 1.2.14 erschienen.
== PostgreSQL Jobs im Mai ==
== PostgreSQL Lokal ==
PGCon 2008 wird vom 20. bis 23. Mai in Ottawa sein.
Das erste Pekinger PostgreSQL Usergroup Meeting wird am 24. Mai 2008
von 10:30 bis 15:30 Uhr stattfinden.
Die griechische PUG wird einen Stand auf der dritten Griechischen FLOSS
Konferenz vom 27.-29. Mai in Athen, NTUA, haben.
LAPUG trifft sich am 30. Mai 2008 im Cal Poly.
Non-trivial updateable views, von Keith Larson.
PGDay wird in Portland am Tag vor der OSCON stattfinden.
Der Call for Papers für die Utah Open Source Konferenz 2008 ist bis zum
1. Juni offen. Diese 2. jährliche Konferenz wird vom 28. bis 30. August
2008 in Salt Lake City, UT stattfinden.
PGCon Brasilien 2008 wird vom 26-27. September auf dem Unicamp in
== PostgreSQL in den News ==
Planet PostgreSQL: http://www.planetpostgresql.org/
General Bits, Archive und gelegentliche News Artikel:
Dieser wöchentliche PostgreSQL Newsletter wurde erstellt von David
Sende Neuigkeiten und Ankündigungen bis Sonntag, 15 Uhr Pazifischer
Zeit. Bitte sende englische Beiträge an firstname.lastname@example.org, deutsche an
email@example.com, italienische an firstname.lastname@example.org.
== Angewandte Patches ==
Alvaro Herrera committed:
- Restructure some header files a bit, in particular heapam.h, by
removing some unnecessary #include lines in it. Also, move some
tuple routine prototypes and macros to htup.h, which allows removal
of heapam.h inclusion from some .c files. For this to work, a new
header file access/sysattr.h needed to be created, initially
containing attribute numbers of system columns, for pg_dump usage.
While at it, make contrib ltree, intarray and hstore header files
more consistent with our header style.
- Put back bufmgr.h in bufpage.h -- it is needed by some macros.
Remove #include bufmgr.h from (most?) source files which already
- In pgsql/doc/src/sgml/ref/close.sgml, document that "ROLLBACK TO
savepoint" does not un-close cursors.
- Improve snapshot manager by keeping explicit track of snapshots.
There are two ways to track a snapshot: there's the "registered"
list, which is used for arbitrary long-lived snapshots; and there's
the "active stack", which is used for the snapshot that is
considered "active" at any time. This also allows users of
snapshots to stop worrying about snapshot memory allocation and
freeing, and about using PG_TRY blocks around ActiveSnapshot
assignment. This is all done automatically now. As a consequence,
this allows us to reset MyProc->xmin when there are no more
snapshots registered in the current backend, reducing the impact
that long-running transactions have on VACUUM.
- Improve psql's internal print.c code by introducing an actual print
API. Provides for better code readability, but mainly this is
infrastructure changes to allow further changes such as arbitrary
footers on printed tables. Also, the translation status of each
element in the table is more easily customized. Brendan Jurd, with
some editorialization by me.
Magnus Hagander committed:
- Convert wal_sync_method to guc enum.
- Report which WAL sync method we are trying to change to when it
fails, not which one we had before (that worked, and thus is
- In pgsql/src/backend/access/transam/xlog.c, fix breakage by the
wal_sync_method patch in installations that use O_DSYNC
(specifically this broke all the Windows buildfarm members)
- Implement error checking for pthreads calls in thread-safe mode.
They really should always succeed, but in the likely event of a
failure we would previously fall through without locking - the new
code will exit(1). Printing the error message on stderr will not
work for all applications, but it's better than nothing at all - and
our API doesn't provide a way to return the error to the caller.
Michael Meskes committed:
- In ecpg, check for non-existant connection in prepare statement
handling. Do not close files that weren't opened.
Bruce Momjian committed:
- Mark TODO as done: "Improve dead row detection during
multi-statement transactions usage."
- Mark PL/PgSQL TODO as done: "Add CASE capability to language
(already in SQL)."
- Add detection of psql pager to trigger on wide output. Also add
pager detection for wrapped lines or lines with newlines that need
pager to display.
- Mark TODO as done: "Have \l+ show database size, if permissions
- Update psql startup banner to be shorter, suggest "help" for help.
Add a few "help" entries. Move \g help entry into "General".
Update psql version mismatch warning text. Joshua D. Drake
- In pgsql/src/nls-global.mk, another fix for compiles on an empty
- In pgsql/src/bin/psql/print.c, test for output to stdout when
forcing pager for wide output.
- Use isatty() test for pager on Win32; not sure why it was disabled
for that platform.
Tom Lane committed:
- Move the "instr_time" typedef and associated macros into a new
header file portability/instr_time.h, and add a couple more macros
to eliminate some abstraction leakage we formerly had. Also update
psql to use this header instead of its own copy of nearly the same
code. This commit in itself is just code cleanup and shouldn't
change anything. It lays some groundwork for the upcoming
function-stats patch, though.
- Add support for tracking call counts and elapsed runtime for
user-defined functions. Note that because this patch changes
FmgrInfo, any external C functions you might be testing with 8.4
will need to be recompiled. Patch by Martin Pihlak, some
editorialization by me (principally, removing tracking of
- In pgsql/src/backend/optimizer/util/clauses.c, add code to
eval_const_expressions() to support const-simplification of
CoerceViaIO nodes. This improves the ability of the planner to deal
with cases where the node input is a constant. Per bug #4170.
- Support SQL/PSM-compatible CASE statement in plpgsql. Pavel Stehule
- In pgsql/src/backend/access/gin/gininsert.c, persuade GIN to react
to control-C in a reasonable amount of time while building a GIN
- Extend GIN to support partial-match searches, and extend tsquery to
support prefix matching using this facility. Teodor Sigaev and Oleg
- Update contrib for tsearch changes.
- In pgsql/contrib/pgstattuple/pgstattuple.c, suppress compiler
warning induced by recent header file refactoring.
- In pgsql/src/pl/plpgsql/src/pl_exec.c, suppress a
possibly-uninitialized-variable warning. (I'm only seeing it on
Apple's gcc and not my other machines, but still it seems worth
getting rid of.)
- In pgsql/src/bin/psql/print.c, recent patch doesn't compile without
- In pgsql/src/backend/access/transam/xlog.c, reduce unnecessary PANIC
to ERROR, improve a couple of comments.
- Add a RESTART (without parameter) option to ALTER SEQUENCE, allowing
a sequence to be reset to its original starting value. This
requires adding the original start value to the set of parameters
(columns) of a sequence object, which is a user-visible change with
potential compatibility implications; it also forces initdb. Also
add hopefully-SQL-compatible RESTART/CONTINUE IDENTITY options to
TRUNCATE TABLE. RESTART IDENTITY executes ALTER SEQUENCE RESTART
for all sequences "owned by" any of the truncated relations.
CONTINUE IDENTITY is a no-op option. Zoltan Boszormenyi
- In pgsql/src/port/pthread-win32.h, fix declarations of pthread
functions, missed in recent commit.
- Allow ALTER SEQUENCE START WITH to change the recorded start_value
of a sequence. This seems an obvious extension to the recent patch,
and it makes the code noticeably cleaner and more orthogonal.
- In pgsql/src/include/access/xlogdefs.h, remove DEFAULT_SYNC_FLAGBIT
... not used anymore.
- Fix a subtle bug exposed by recent wal_sync_method rearrangements.
Formerly, the default value of wal_sync_method was determined inside
xlog.c, but now it is determined inside guc.c. guc.c was reading
xlogdefs.h without having read <fcntl.h>, leading to wrong
determination of DEFAULT_SYNC_METHOD. Obviously xlogdefs.h needs to
include <fcntl.h> for itself to ensure stable results.
- In pgsql/src/bin/psql/print.c, fix utterly-bogus code for computing
row heights. Per crashes on spoonbill, though one wonders why it
didn't misbehave everywhere. In passing remove some unnecessary
- In pgsql/src/test/regress/pg_regress.c, improve pg_regress so that
it reports the fact if any test process exits with nonzero status.
The Windows part of this is untested ...
- In pgsql/src/interfaces/ecpg/ecpglib/Makefile, ecpglib needs to link
with libintl if it's in use. Per buildfarm results.
- In pgsql/doc/src/sgml/ref/truncate.sgml, rewrite the warning about
non-transaction-safety of TRUNCATE ... RESTART IDENTITY to be more
explicit about the possible hazards. Per gripe from Neil and
subsequent discussion. Eventually we may be able to get rid of this
warning, but for now it had better be there.
- In pgsql/src/interfaces/ecpg/compatlib/Makefile, okay, looks like
ecpg/compatlib needs -lintl too. Per buildfarm results.
- Make another try at using -Wl,--as-needed to suppress linking of
unnecessary shared libraries. We've tried this before and had
problems with libreadline not linking properly on some platforms,
but that seems to be a libreadline bug that may have been fixed by
now. In any case, it's early enough in the 8.4 devel cycle that we
can afford to have some transient breakage while we work out any
portability problems. On Darwin, we try -Wl,-dead_strip_dylibs,
which seems to be the equivalent incantation there.
Peter Eisentraut committed:
- Add localization support to ecpg. Euler Taveira de Oliveira.
- In pgsql/src/nls-global.mk, don't call rm with empty file list.
Andrew Dunstan committed:
- Add $PostgreSQL$ markers to a lot of files that were missing them.
This particular batch was just for *.c and *.h file.
- Fix ecpg regression tests broken by over-eager adding of
- In pgsql/src/bin/psql/print.c, remove old kluge put in to allow
Windows regression tests to succeed, and now found to have been made
necessary by our skipping tty detection on Windows. Now that we are
doing tty detection on Windows the kluge is unnecessary and wrong.
== Abgelehnte Patches (bis jetzt) ==
No one was disappointed this week :-)
== Eingesandte Patches ==
Andreas (ads) Scherbaum sent in another revision of his CREATE OR
REPLACE LANGUAGE patch.
Teodor Sigaev sent in two more revisions of his patch to do partial
match on GIN indexes.
Jan Urbanski sent in patch that extends VacAttrStats to allow
typanalyze functions to store statistic values as a type different
from that of the underlying column.
Heikki Linnakangas sent in a patch which changes the file size limit
in twohpase.c from its arbitrary size of 10,000,000 bytes to
Andrew Chernow sent in another revision of the libpq object hooks
Bruce Momjian update Euler Taveira de Oliveira's patch which
internationalizes lc_time and dates.
Tatsuo Ishii sent in a patch to add WITH RECURSIVE.