== PostgreSQL Weekly News – May 27 2012 ==
== PostgreSQL Weekly News – May 27 2012 ==
PostgreSQL Day Argentina 2012 will be held on November 13th in Bernal,
Buenos Aires, at the National University of Quilmes. It will cover
topics for PostgreSQL users, developers and contributors, as well as
decision and policy makers. For more information about the
conference, please see the website at
== PostgreSQL Jobs for May ==
== PostgreSQL Local ==
PGDay France will be in Lyon on June 7, 2012.
PostgreSQL conference China 2012 will be on June 14-17, 2012 in Beijing.
PostgreSQL Session will be held on October 4th, 2012, in Paris,
France. More information at:
PostgreSQL Conference Europe 2012 will be in Prague, Czech Republic
on October 23-26. The call for papers is open.
== 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. Spanish language
== Reviews ==
== Applied Patches ==
Tom Lane pushed:
- Document that we deviate from ISO 8601 by not using ‘T’ on output.
Per discussion, we should explain that we follow RFC 3339 and not
really the letter of the ISO 8601 spec for timestamp output format.
Mostly Brendan Jurd’s wording, though I tweaked it to clarify that
we do take ‘T’ on input. Minor additional copy-editing and
- Adjust documentation of ALTER TABLE CLUSTER ON for more consistency.
- Update woefully-obsolete comment. The accurate info about what’s in
a lock file has been in miscadmin.h for some time, so let’s just
make this comment point there instead of maintaining a duplicative
- Move postmaster’s RemovePgTempFiles call to a less randomly chosen
place. There is no reason to do this as early as possible in
postmaster startup, and good reason not to do it until we have
completely created the postmaster’s lock file, namely that it might
contribute to pg_ctl thinking that postmaster startup has timed out.
(This would require a rather unusual amount of time to be spent
scanning temp file directories, but we have at least one field
report of it happening reproducibly.) Back-patch to 9.1. Before
that, pg_ctl didn’t wait for additional info to be added to the lock
file, so it wasn’t a problem. Note that this is not a complete fix
to the slow-start issue in 9.1, because we still had
identify_system_timezone being run during postmaster start in 9.1.
But that’s at least a reasonably well-defined delay, with an easy
workaround if needed, whereas the temp-files scan is not so
predictable and cannot be avoided.
- Ensure that seqscans check for interrupts at least once per page.
If a seqscan encounters many consecutive pages containing only dead
tuples, it can remain in the loop in heapgettup for a long time, and
there was no CHECK_FOR_INTERRUPTS anywhere in that loop. This meant
there were real-world situations where a query would be effectively
uncancelable for long stretches. Add a check placed to occur once
per page, which should be enough to provide reasonable response time
without adding any measurable overhead. Report and patch by Merlin
Moncure (though I tweaked it a bit). Back-patch to all supported
- Fix array overrun in regex code. zaptreesubs() was coded to
unconditionally reset a capture subre’s corresponding pmatch
entry. However, in regexes without backrefs, that array is
caller-supplied and might not have as many entries as the regex has
capturing parens. So check the array length and do nothing if there
is no corresponding entry, much as subset() does. Failure to check
this resulted in a stack clobber in the case reported by Marko
Kreen. This bug appears to have been latent in the regex library
from the beginning. It was not exposed because find() called
dissect() not cdissect(), and the dissect() code path didn’t ever
call zaptreesubs() (formerly zapmem()). When I unified dissect()
and cdissect() in commit 4dd78bf37aa29d04b3f358b08c4a2fa43cf828e7,
the problem was exposed. Now that I’ve seen this, I’m rather
suspicious that we might need to back-patch it; but will refrain for
now, for lack of evidence that the case can be hit in the previous
- Use binary search instead of brute-force scan in findNamespace().
The previous coding presented a significant bottleneck when dumping
databases containing many thousands of schemas, since the total time
spent searching would increase roughly as O(N
) in the number of
objects. Noted by Jeff Janes, though I rewrote his proposed patch
to use the existing findObjectByOid infrastructure. Since this is a
longstanding performance bug, backpatch to all supported versions.
- Fix string truncation to be multibyte-aware in text_name and
bpchar_name. Previously, casts to name could generate
invalidly-encoded results. Also, make these functions match
namein() more exactly, by consistently using palloc0() instead of
ad-hoc zeroing code. Back-patch to all supported branches. Karl
Schnaitter and Tom Lane
- Prevent synchronized scanning when systable_beginscan chooses a
heapscan. The only interesting-for-performance case wherein we
force heapscan here is when we're rebuilding the relcache init file,
and the only such case that is likely to be examining a catalog big
enough to be syncscanned is RelationBuildTupleDesc. But the
early-exit optimization in that code gets broken if we start the
scan at a random place within the catalog, so that allowing syncscan
is actually a big deoptimization if pg_attribute is large (at least
for the normal case where the rows for core system catalogs have
never been changed since initdb). Hence, prevent syncscan here.
Per my testing pursuant to complaints from Jeff Frost and Greg
Sabino Mullane, though neither of them seem to have actually hit
this specific problem. Back-patch to 8.3, where syncscan was
Peter Eisentraut pushed:
- pg_ctl: Sort signal list in --help output. The list was neither
logical nor numerical nor alphabetical. Let's go with alphabetical.
- libpq: Add missing file to GETTEXT_FILES list. For the record,
fe-print.c is also missing, but it's sort of deprecated, and the
string internationalization there has some issues, and it doesn't
seem worth fixing that. So let's leave that out.
- Add small example about pg_archivecleanup -x option. Every time I
read this I had doubts about whether the argument to the -x option
should include the dot (yes). A small example should clarify this.
- pg_standby: Remove tabs from string literals. And align a bit
better with the rest of the debug output.
- Update SQL key word list to SQL:2011. For space reasons, drop
SQL:1999 and SQL:2003. Only keep the latest two and SQL-92 for
- PL/Perl: Avoid compiler warning from clang. Use
SvREFCNT_inc_simple_void() instead of SvREFCNT_inc() to avoid
warning about unused return value.
- Suppress -Wunused-result warning about write(). This is related to
aa90e148ca70a235897b1227f1a7cd1c66bc5368, but this code is only used
under -DLINUX_OOM_ADJ, so it was apparently overlooked then.
- Update SQL features list. Set E081 Basic Privileges to supported,
since by the letter of it, we support it, even though not all
possible forms of USAGE privileges are implemented.
- psql: Remove notice about readline from --version output. This was
from a time when readline support wasn't standard. And it doesn't
help analyzing current line editing library problems.
Robert Haas pushed:
- Repair out-of-date information in src/backend/storage/buffer/README.
In commit d526575f893c1a4e05ebd307e80203536b213a6d, we changed
things so that buffer usage counts are incremented when the buffer
is pinned, rather than when it is unpinned, but the README file
didn't get the memo. Report by Amit Kapila.
- Prevent pg_basebackup when integer_datetimes flag doesn't match.
Magnus Hagander, reviewed by Fujii Masao, with slight wording
changes by me.
- Release note improvements. Document some more things as
incompatibilities, and improve wording of another item. Noah Misch
- Fix error message for COMMENT/SECURITY LABEL ON COLUMN xxx IS 'yyy'
When the column name is an unqualified name, rather than
table.column, the error message complains about too many dotted
names, which is wrong. Report by Peter Eisentraut based on
examination of the sepgsql regression test output, but the problem
also affects COMMENT. New wording as suggested by Tom Lane.
Bruce Momjian pushed:
- Remove reviewers from 9.2 release notes; improve attributions.
- 9.2 release notes: GiST index improvements are for all geometric
index types, per Alexander Korotkov.
- Fix reindexdb manual page to say --maintenance-db controls what is
reindexed, not vacuumed (typo). Per report from Thomas REISS
- Fix markup for HISTORY generation.
- Add 9.2 release note authorship mentions for Heikki and Alexander
Korotkov, per Alexander Korotkov.
- Improve wording of 9.2 clog release note item.
- Mention Peter Geoghegan as primary author of pg_stat_statements
- Adjust pg_upgrade to output a separate log file for pg_ctl output on
Windows, to avoid opening a file by multiple processes.
- Remove PL/Perl null array 9.2 release note item, per Andrew Dunstan
- Change pg_stat_statements order of release note items, per Peter
- Clarify 9.2 release notes items about pg_stat_statements, to better
document fix of double counting and read/write count addition, per
- On Windows, have pg_upgrade use different two files to log pg_ctl
start/stop output, to fix file share error reported by Edmund Horner
- Have pg_upgrade only use one extra log file for Win32, not two.
- Add pg_update C comment about problems with plpython_call_handler().
- Add C comment explaining why we can't exclude checking functions in
the pg_catalog schema, even though they are not explicitly dumped
(they are implicitly dumped, e.g. create language plperl).
- Improve pg_upgrade C comment.
Magnus Hagander pushed:
- Add missing PQfinish() calls. Fujii Masao
- Fix base backup streaming xlog from standby. When backing up from a
standby server, the backup process will not automatically switch
xlog segment. So we must accept a partially transferred xlog file in
this case, but rename it into position anyway. In passing, merge
the two callbacks for segment end and stop stream into a single
callback, since their implementations were close to identical, and
rename this callback to reflect that it stops streaming rather than
continues it. Patch by Magnus Hagander, review by Fujii Masao
- Fix handling of pg_stat_statements.stat temporary file. Write the
file to a temporary name and then rename() it into the permanent
name, to ensure it can't end up half-written and corrupt in case of
a crash during shutdown. Unlink the file after it has been read so
it's removed from the data directory and not included in base
backups going to replication slaves.
- Make pg_recievexlog by default loop on connection failures. Avoids
the need for an external script in the most common scenario.
Behavior can be overridden using the -n/--noloop commandline
== Rejected Patches (for now) ==
No one was disappointed this week
== Pending Patches ==
Alexander Korotkov sent in another revision of the patch to add
conversion from pg_wchar to multibyte.
Gurjeet Singh sent in a patch to add a new syntax allowing joining
multiple CREATE INDEX statements with commas, that signifying that the
indexes are to be created all in one pass.
Heikki Linnakangas sent in a patch to speed up the new buffering GiST
Andrew Dunstan sent in a patch to fix a problem with pg_dump and
Marti Raudsepp sent in a patch to mark as "skipped" sorts of 0 or 1
tuple in EXPLAIN.
Fujii Masao sent in a patch to add a pg_size_pretty(int) function.
Pavel Stehule sent in a patch to add a "shell" output format for psql
which optimizes the output for use by the shell.
Comments are closed.