PostgreSQL Weekly News – March 07 2010
== PostgreSQL Weekly News – March 07 2010 ==
Bug fix updates for PostgreSQL 7.4 through 8.4 will be out soon. Get
ready to upgrade!
The San Francisco PostgreSQL Users’ Group will be having a Test Fest
Saturday April 3, 11am to 6pm. There will be live video. Help make
this a world-wide event!
== PostgreSQL Product News ==
MicroOLAP Database Designer 1.2.10 for PostgreSQL released.
The PGCon 2010 Schedule is now available.
PostgreSQLfr will have a booth at SolutionsLinux 2010 in Paris,
France March 16-18, 2010. Volunteers, please contact Stephane
Schildknecht at sas AT postgresql DOT fr, or the general PostgreSQLfr
address at bureau AT postgresql DOT fr. More information on the
== PostgreSQL 9.0 Feature of the Week ==
EXPLAIN output can be formatted as XML, JSON, and YAML, making machine
parsing much simpler. The traditional text format is still the
== PostgreSQL Local ==
BWPUG will be meeting in Falls Church, VA, USA on March 10, 2010 at
The German Language PostgreSQL User Group has a booth at Chemnitz Linuxdays
2010 on March 13 and 14, 2010 in Chemnitz, Germany. Andreas (ads)
Scherbaum will be giving a talk on PostgreSQL 9.0 and a workshop on
JDCon East will take place March 25-28, 2010 in Philadelphia, PA, USA.
Linuxfest Northwest 2010 will take place in Bellingham, Washington,
USA on April 24 and 25. Session, Booth and Sponsorship are available.
Andreas (ads) Scherbaum will be teaching a “PostgreSQL for Corporate
Use” course at the adult education center in Magdeburg, Germany May
3-7, 2010. Details below:
PgCon 2010 will be held May 20-21 2010 in Ottawa with tutorials before
on the 18th and 19th.
The CfP for OSBridge is open! OSBridge will be June 1-4, 2010 in
OSCON will take place in Portland, Oregon July 19-23, 2010.
== PostgreSQL in the News ==
Planet PostgreSQL: http://planet.postgresql.org/
PostgreSQL Weekly News is brought to you this week by David Fetter
Submit news and announcements by Sunday at 3:00pm Pacific time.
Please send English language ones to firstname.lastname@example.org, German language
to email@example.com, Italian language to firstname.lastname@example.org.
== Applied Patches ==
Tom Lane committed:
– Back-patch today’s memory management fixups in contrib/xml2. Prior
to 8.3, these changes are not critical for compatibility with core
Postgres, since core had no libxml2 calls then. However there is
still a risk if contrib/xml2 is used along with libxml2
functionality in Perl or other loadable modules. So back-patch to
all versions. Also back-patch addition of regression tests. I’m
not sure how many of the cases are interesting without the
interaction with core xml code, but a silly regression test is still
better than none at all.
– Remove xmlCleanupParser calls from contrib/xml2. These are
unnecessary and probably dangerous. I don’t see any immediate risk
situations in the core XML support or contrib/xml2 itself, but there
could be issues with external uses of libxml2, and in any case it’s
an accident waiting to happen.
– In pgsql/src/port/copydir.c, buildfarm still unhappy, so I’ll bet
it’s EACCES not EPERM.
– Fix contrib/xml2 so regression test still works when it’s built
without libxslt. This involves modifying the module to have a
stable ABI, that is, the xslt_process() function still exists even
without libxslt. It throws a runtime error if called, but doesn’t
prevent executing the CREATE FUNCTION call. This is a good thing
anyway to simplify cross-version upgrades.
– In pgsql/src/pl/plpgsql/src/gram.y, cause plpgsql to throw an error
if “INTO rowtype_var” is followed by a comma. Per bug #5352, this
helps to provide a useful error message if the user tries to do
something presently unsupported, namely use a rowtype variable as a
member of a multiple-item INTO list.
– In pgsql/src/pl/plpgsql/src/gram.y, instead of trying (and failing)
to allow <<label>> at the end of a DECLARE section, throw an error
message saying explicitly that the label must go before DECLARE.
Per investigation of a recent pgsql-novice question, this code did
not work as intended in any modern PG version, maybe not ever.
Allowing such a thing would only create ambiguity anyway, so it
seems better to remove it than fix it.
– Export xml.c’s libxml-error-handling support so that contrib/xml2
can use it too, instead of duplicating the functionality (badly). I
renamed xml_init to pg_xml_init, because the former seemed just a
bit too generic to be safe as a global symbol. I considered
likewise renaming xml_ereport to pg_xml_ereport, but felt that the
reference to ereport probably made it sufficiently PG-centric
– Make contrib/xml2 use core xml.c’s error handler, when available
(that is, in versions >= 8.3). The core code is more robust and
efficient than what was there before, and this also reduces risks
involved in swapping different libxml error handler settings.
Before 8.3, there is still some risk of problems if add-on modules
such as Perl invoke libxml without setting their own error handler.
Given the lack of reports I’m not sure there’s a risk in practice,
so I didn’t take the step of actually duplicating the core code into
older contrib/xml2 branches. Instead I just tweaked the existing
code to ensure it didn’t leave a dangling pointer to short-lived
memory when throwing an error.
– Fix a couple of places that would loop forever if attempts to read a
stdio file set ferror() but never set feof(). This is known to be
the case for recent glibc when trying to read a directory as a file,
and might be true for other platforms/cases too. Per report from Ed
L. (There is more that we ought to do about his report, but this is
one easily identifiable issue.)
– In pgsql/src/backend/libpq/hba.c, when reading pg_hba.conf and
similar files, do not treat @file as an inclusion unless (1) the @
isn’t quoted and (2) the filename isn’t empty. This guards against
unexpectedly treating usernames or other strings in “flat files” as
inclusion requests, as seen in a recent trouble report from Ed L.
The empty-filename case would be guaranteed to misbehave anyway,
because our subsequent path-munging behavior results in trying to
read the directory containing the current input file. I think this
might finally explain the report at
http://archives.postgresql.org/pgsql-bugs/2004-05/msg00132.php of a
crash after printing “authentication file token too long, skipping”,
since I was able to duplicate that message (though not a crash) on a
platform where stdio doesn’t refuse to read directories. We never
got far in investigating that problem, but now I’m suspicious that
the trigger condition was an @ in the flat password file.
Back-patch to all active branches since the problem can be
demonstrated in all branches except HEAD. The test case, creating a
user named “@”, doesn’t cause a problem in HEAD since we got rid of
the flat password file. Nonetheless it seems like a good idea to
not consider quoted @ as a file inclusion spec, so I changed HEAD
– In pgsql/src/backend/catalog/aclchk.c, fix warning messages in
restrict_and_check_grant() to include the column name when warning
about column-level privileges. This is more useful than before and
makes the apparent duplication complained of by Piyush Newe not so
duplicate. Also fix lack of quote marks in a related message text.
Back-patch to 8.4, where column-level privileges were introduced.
– Update time zone data files to tzdata release 2010c: DST law changes
in Bangladesh, Mexico, Paraguay.
Magnus Hagander committed:
– In pgsql/src/backend/libpq/hba.c, it’s clearly now pointless to do
backwards compatible parsing of this, since we released a version
without it, so remove the comment that says we might want to do
– Add –psqlrc=FILENAME parameter to psql, to process an explicitly
named file instead of ~/.psqlrc on startup.
– Revert patch for –psqlrc=FILENAME in psql.
Heikki Linnakangas committed:
– Fix numericlocale psql option when used with a null string and latex
and troff formats; a null string must not be formatted as a numeric.
The more exotic formats latex and troff also incorrectly formatted
all strings as numerics when numericlocale was on. Backpatch to 8.1
where numericlocale option was added. This fixes bug #5355 reported
by Andy Lester.
– In pgsql/src/bin/psql/print.c, fix translation of strings in psql \d
output (translation in headers worked, but not in cells).
– Fix pg_dump of ACLs of foreign servers. The command to grant/revoke
privileges of foreign servers is “GRANT … ON *FOREIGN* SERVER
– In pgsql/src/backend/parser/parse_coerce.c, fix IsBinaryCoercible to
not confuse a cast using in/out functions with binary compatibility.
Backpatch to 8.4 where INOUT casts were introduced.
Andrew Dunstan committed:
– In pgsql/src/tools/msvc/Solution.pm, add XSLT defines for MSVC
– In pgsql/src/tools/msvc/Solution.pm, backpatch MSVC build fix for
– In pgsql/src/tools/msvc/vcregress.pl, do not run regression tests
for contrib/xml2 on MSVC unless building with XML.
– In pgsql/src/tools/msvc/Solution.pm, add missing library and include
dir for XSLT in MSVC builds.
– In pgsql/src/tools/msvc/Solution.pm, make iconv work like other
optional libraries for MSVC.
Peter Eisentraut committed:
– In pgsql/doc/src/sgml/keywords.sgml, update keywords list for 9.0.
Bruce Momjian committed:
– Document the effect of max_standby_delay on increasing the delay of
data from master to slave, and discourage its use during
slave/master keep-xid-alive connections.
– In pgsql/doc/src/sgml/config.sgml, adjust max_standby_delay
documentation to be clearer, and mention that two adjacent
long-running queries have much less than max_standby_delay before
query cancel is possible.
– In pgsql/src/backend/utils/adt/xml.c, pgindent run on xml.c in 8.3
branch, per request from Tom Lane.
– In pgsql/doc/src/sgml/ref/create_function.sgml, restructure CREATE
FUNCTION “NOTES” section to be shorter; move items into proper
sections, per suggestion from Tom Lane.
– In pgsql/doc/src/sgml/ref/create_function.sgml, fix SGML markup.
– Document that “Q” is ignored by to_date and to_timestamp. Add C
comment about the behavior. Document that quotes in to_date,
to_timestamp, to_number skip input characters.
– In pgsql/src/bin/pg_dump/pg_dump.c, add C comment about DDL changes
possibly causing pg_dump errors.
Michael Meskes committed:
– In case the connection magically disappears libecpg only returns an
internal error sqlstate. This change makes it return a correct
== Rejected Patches (for now) ==
No one was disappointed this week 🙂
== Pending Patches ==
Magnus Hagander sent in a patch to fix a crash issue with psql and GSS
Bruce Momjian sent in another revision of a patch to fix some issues
with to_char() on Windows.
Fujii Masao sent in three more patches to help fix corner cases in
streaming replication with pg_xlogfile_name().
Fujii Masao sent in a patch to mandate setting either restore_command
or primary_conninfo in recovery.conf.
Fujii Masao sent in a patch to correct recovery.conf.sample for
KaiGai Kohei sent in a patch to disallow renaming columns in sequence
Bruce Momjian sent in three patches fixing to_timestamp() behavior
KaiGai Kohei sent in a patch factoring out duplicate code in
CreateOpFamily() and DefineOpFamily().
Tim Bunce sent in a patch to fix a core dump in PL/Perl installcheck
Bruce Momjian sent in three revisions of a patch to fix the exit code
form psql -1 when it encounters a violation of a deferred foreign key
Comments are closed.