PostgreSQL Weekly News – February 26 2012

== PostgreSQL Weekly News – February 26 2012 ==

Point releases 9.1.3, 9.0.7, 8.4.11 and 8.3.18 will be out soon. Get
ready to upgrade!

PGDay DC 2012 will be held on March 30.

PGDay Austin 2012 will be held March 28.

== PostgreSQL Jobs for February ==

== PostgreSQL Local ==

PGDay NYC will be held April 2, 2012 at Lighthouse International in
New York City.

PGCon 2012 will be held 17-18 May 2012, in Ottawa at the University of
Ottawa. It will be preceded by two days of tutorials on 15-16 May 2012.

PGDay France will be in Lyon on June 7, 2012.

== PostgreSQL in the News ==

Planet PostgreSQL:

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, German language
to, Italian language to Spanish language

== Reviews ==

== Applied Patches ==

Andrew Dunstan pushed:

- Fix a couple of cases of JSON output. First, as noted by Itagaki
Takahiro, a datum of type JSON doesn’t need to be escaped. Second,
ensure that numeric output not in the form of a legal JSON number is
quoted and escaped.

- Fix typo, noticed by Will Crawford.

- Correctly handle NULLs in JSON output. Error reported by David

Tom Lane pushed:

- Don’t reject threaded Python on FreeBSD. According to Chris Rees,
this has worked for awhile, and the current FreeBSD port is removing
the test anyway.

- Don’t clear btpo_cycleid during _bt_vacuum_one_page. When
“vacuuming” a single btree page by removing LP_DEAD tuples, we are
not actually within a vacuum operation, but rather in an ordinary
insertion process that could well be running concurrently with a
vacuum. So clearing the cycleid is incorrect, and could cause the
concurrent vacuum to miss removing tuples that it needs to remove.
This is a longstanding bug introduced by commit
e6284649b9e30372b3990107a082bc7520325676 of 2006-07-25. I believe
it explains Maxim Boguk’s recent report of index corruption, and
probably some other previously unexplained reports. In 9.0 and up
this is a one-line fix; before that we need to introduce a flag to
tell _bt_delitems what to do.

- Cosmetic cleanup for commit a760893dbda9934e287789d54bbd3c4ca3914ce0.
Mostly, fixing overlooked comments.

- Draft release notes for 9.1.3, 9.0.7, 8.4.11, 8.3.18.

- Allow MinGW builds to use standardly-named OpenSSL libraries. In
the Fedora variant of MinGW, the openssl libraries have their normal
names, not libeay32 and libssleay32. Adjust configure probes to
allow that, per bug #6486. Tomasz Ostrowski

- Stamp 9.1.3, 9.0.7, 8.4.11, 8.3.18.

- Fix the general case of quantified regex back-references. Cases
where a back-reference is part of a larger subexpression that is
quantified have never worked in Spencer’s regex engine, because he
used a compile-time transformation that neglected the need to check
the back-reference match in iterations before the last one. (That
was okay for capturing parens, and we still do it if the regex has
*only* capturing parens … but it’s not okay for backrefs.) To make
this work properly, we have to add an “iteration” node type to the
regex engine’s vocabulary of sub-regex nodes. Since this is a
moderately large change with a fair risk of introducing new bugs of
its own, apply to HEAD only, even though it’s a fix for a
longstanding bug.

- Avoid repeated creation/freeing of per-subre DFAs during regex
search. In nested sub-regex trees, lower-level nodes created DFAs
and then destroyed them again before exiting, which is a bit dumb
considering that the recursive search is likely to call those nodes
again later. Instead cache each created DFA until the end of
pg_regexec(). This is basically a space for time tradeoff, in that
it might increase the maximum memory usage. However, in most regex
patterns there are not all that many subre nodes, so not that many
DFAs — and in any case, the peak usage occurs when reaching the
bottom recursion level, and except for alternation cases that’s
going to be the same anyway.

- Merge dissect() into cdissect() to remove a pile of near-duplicate
code. The “uncomplicated” case isn’t materially less complicated
than the full case, certainly not enough so to justify duplicating
nearly 500 lines of code. The only extra work being done in the
full path is zaptreesubs, which is very cheap compared to everything
else being done here, and besides that I’m less than convinced that
it’s not needed in some cases even without backrefs.

- Remove useless “retry memory” logic within regex engine. Apparently
some primordial version of Spencer’s engine needed cdissect() and
child functions to be able to continue matching from a previous
position when re-called. That is dead code, though, since trivial
inspection shows that cdissect can never be entered without having
previously done zapmem which resets the relevant retry counter. I
have also verified experimentally that no case in the Tcl regression
tests reaches cdissect with a nonzero retry value. Accordingly,
remove that logic. This doesn’t really save any noticeable number
of cycles in itself, but it is one step towards making dissect() and
cdissect() equivalent, which will allow removing hundreds of lines
of near-duplicated code. Since struct subre’s “retry” field is no
longer particularly related to any kind of retry, rename it to “id”.
As of this commit it’s only used for identifying a subre node in
debug printouts, so you might think we should get rid of the field
entirely; but I have a plan for another use.

- Fix some more bugs in GIN’s WAL replay logic. In commit
4016bdef8aded77b4903c457050622a5a1815c16 I fixed a bunch of
ginxlog.c bugs having to do with not handling XLogReadBuffer
failures correctly. However, in ginRedoUpdateMetapage and
ginRedoDeleteListPages, I unaccountably thought that failure to read
the metapage would be impossible and just put in an elog(PANIC)
call. This is of course wrong: failure is exactly what will happen
if the index got dropped (or rebuilt) between creation of the WAL
record and the crash we’re trying to recover from. I believe this
explains Nicholas Wilson’s recent report of these errors getting
reached. Also, fix memory leak in forgetIncompleteSplit. This
wasn’t of much concern when the code was written, but in a
long-running standby server page split records could be expected to
accumulate indefinitely. Back-patch to 8.4 — before that, GIN
didn’t have a metapage.

Peter Eisentraut pushed:

- pg_regress: Add application name setting. Set the PGAPPNAME
environment variable in pg_regress so that it identifies itself as
such instead of “psql”.

- Add parameters for controlling locations of server-side SSL files.
This allows changing the location of the files that were previously
hard-coded to server.crt, server.key, root.crt, root.crl.
server.crt and server.key continue to be the default settings and
are thus required to be present by default if SSL is enabled. But
the settings for the server-side CA and CRL are now empty by
default, and if they are set, the files are required to be present.
This replaces the previous behavior of ignoring the functionality if
the files were not found.

- Fix build without OpenSSL. This is a fixup for commit

- Remove inappropriate quotes, and adjust wording for consistency.

- Translation updates

- Add some enumeration commas, for consistency

- Put Debian package list back in alphabetical order

- Remove useless const qualifier. Claiming that the typevar argument
to DefineCompositeType() is const was a plain lie. A similar case
in DefineVirtualRelation() was already changed in passing in commit
1575fbcb. Also clean up the now unnecessary casts that used to cast
away the const.

- Remove useless cast

Magnus Hagander pushed:

- Avoid double close of file handle in syslogger on win32. This
causes an exception when running under a debugger or in particular
when running on a debug version of Windows. Patch from MauMau

- Make each pg_stat_ view into it’s own table in the documentation
This makes it easier to match a column name with the description of
it, and makes it possible to add more detailed documentation in the
future. This patch does not add that extra documentation at this
point, only the structure required for it. Modeled on the changes
already done to pg_stat_activity.

- Merge the list of statistics functions into the view documentation
Most people won’t read them individually anyway, it’s an easy way to
find them, and it’s a lot of duplicated information if they are kept
in two different places.

- Fix some typos and correct wording in the monitoring docs patch Thom

Simon Riggs pushed:

- Correctly initialise shared recoveryLastRecPtr in recovery.
Previously we used ReadRecPtr rather than EndRecPtr, which was not a
serious error but caused pg_stat_replication to report incorrect
replay_location until at least one WAL record is replayed. Fujii

Alvaro Herrera pushed:

- REASSIGN OWNED: Support foreign data wrappers and servers. This was
overlooked when implementing those kinds of objects, in commit
cae565e503c42a0942ca1771665243b4453c5770. Per report from Pawel

Bruce Momjian pushed:

- Improve wording of pg_upgrade logfile option: -l, –logfile=FILENAME
log internal activity to filen

- Update src/tools/make_ctags to avoid Exuberant tags option that has
been renamed and undocumented since 2003; instead, use the
documented option. Add comments.

- Mention original ctags option name.

Robert Haas pushed:

- Fix typo in comment. Sandro Santilli

- Make EXPLAIN (BUFFERS) track blocks dirtied, as well as those
written. Also expose the new counters through pg_stat_statements.
Patch by me. Review by Fujii Masao and Greg Smith.

- Don’t install hstore–1.0.sql any more. Since the current version
is 1.1, the 1.0 file isn’t really needed. We do need the 1.0–1.1
upgrade file, so people on 1.0 can upgrade. Per recent discussion
on pgsql-hackers.

== Rejected Patches (for now) ==

No one was disappointed this week

== Pending Patches ==

Alexander Korotkov sent in another revision of the patch to fix some
slowness and bugs in inserting cubes.

Kyotaro HORIGUCHI and Marko Kreen traded patches to create a new libpq
tuple store and speed up dblink using same.

Etsuro Fujita and Shigeru HANADA traded versions of a patch to add a
PostgreSQL FDW.

Gabriele Bartolini sent in another revision of the patch to allow
array elements to reference keys in another table.

Dimitri Fontaine sent in another revision of the patch to collect and
display accumulated AUTOVACUUM cost.

Alexander Korotkov sent in a patch to fix incorrect behaviour when
using a GiST index on points.

Jan Urbanski sent in another revision of the patch to fix potential
reference miscounts and segfaults in plpython.c.

Greg Smith sent in a patch to add a pg_test_timing tool for EXPLAIN
ANALYZE overhead.

Simon Riggs sent in another revision of the patch to assess the
overall level of freelist lwlock contention.

Greg Smith and Ants Aasma traded revisions of a patch to add timing of
buffer I/O requests.

Peter Geoghegan sent in another revision of the patch to publish
checkpoint timing and sync files summary data to pg_stat_bgwriter.

Timothy Garnett sent in a patch to make it possible to ask pg_dump to
dump tables in clustered index order.

Joachim Wieland sent in another revision of the patch to make it
possible to use pg_dump in parallel.

Daniel Farina sent in another revision of the patch to move CRC tables
to a separate include file and libpg.

KaiGai Kohei sent in another revision of the patch to add a
sepgsql_setcon() function to SE-pgsql.

Peter Eisentraut sent in a patch to fix an issue with incompatible
pointer types for different revisions of zlib.

Alex Shulgin sent in another revision of a patch to add URL support to

Daniel Farina sent in another revision of a patch inteneded to
re-normalize pg_stat_statements.

Peter Eisentraut sent in another revision of the patch to correct
misleading errors on CREATE TABLE … LIKE.

Simon Riggs sent in a patch to speed up COPY for the case of adding
committed rows.

Dimitri Fontaine sent in three more revisions of the patch to
implement command triggers.

Sergey Burladyan sent in a patch to fix a bug in psql’s indent for
inherited tables names with UTF-8

Noah Misch sent in a patch to cut down the noise in psql when there is
an error in a multi-command string.

Jeff Janes sent in a patch to reproduce and fix an issue he’s been
seeing around the “moving more work outside the WALInsertLock” patch.

Magnus Hagander sent in a patch to fix xlog location arithmetic.

Simon Riggs sent in a patch to fix certain contentions in CLOG.

Magnus Hagander sent in a patch to create a new stylesheet, assuming
the docs are built locally.

—————————(end of broadcast)—————————
-To unsubscribe from this list, send an email to:

Comments are closed.