PostgreSQL Weekly News – August 07 2011
== PostgreSQL Weekly News – August 07 2011 ==
Consistent State and the US PostgreSQL Association will be holding a
training day October 21, 2011.
PostgreSQL Conference Europe 2011 will be held on October 18-21 in the
Casa 400 Hotel in Amsterdam, The Netherlands. 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 Local ==
PGDay Porto Alegre will be on August 19, 2011 in Porto Alegre, RS, Brazil.
Postgres Open 2011, a conference focused on disruption of the database
industry through PostgreSQL, will take place September 14-16, 2011 in
Chicago, Illinois at the Westin Michigan Avenue hotel.
PG-Day Denver 2011 will be held on Friday, October 21st, 2011 at
the Auraria Campus near downtown Denver, Colorado.
PostgreSQL Conference West (#PgWest) will be held September 27th-30th,
2011 at the San Jose Convention center in San Jose, California, USA.
PostgreSQL Conference Europe 2011 will be held on October 18-21 in
pgbr will be in Sao Paulo, Brazil November 3-4, 2011.
PGConf.DE 2011 is the German-speaking PostgreSQL Conference and will
take place on November 11th in the Rheinisches Industriemuseum in
Oberhausen, Germany. 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 email@example.com, German language
to firstname.lastname@example.org, Italian language to email@example.com. Spanish language
== Reviews ==
== Applied Patches ==
Robert Haas pushed:
- Minor stylistic corrections.
- Make pgbench use erand48() rather than random(). glibc renders
random() thread-safe by wrapping a futex lock around it; testing
reveals that this limits the performance of pgbench on machines with
many CPU cores. Rather than switching to random_r(), which is only
available on GNU systems and crashes unless you use undocumented
alchemy to initialize the random state properly, switch to our
built-in implementation of erand48(), which is both thread-safe and
concurrent. Since the list of reasons not to use the operating
system’s erand48() is getting rather long, rename ours to
pg_erand48() (and similarly for our implementations of lrand48() and
srand48()) and just always use those. We were already doing this on
Cygwin anyway, and the glibc implementation is not quite
thread-safe, so pgbench wouldn’t be able to use that either. Per
discussion with Tom Lane.
- Teach psql to display comments on languages and casts. The output
of dL (list languages) is fairly narrow, so we just always display
the comment. dC (list casts) can get fairly wide, so we only
display comments if the new dC+ option is specified. Josh
- Create VXID locks “lazily” in the main lock table. Instead of
entering them on transaction startup, we materialize them only when
someone wants to wait, which will occur only during CREATE INDEX
CONCURRENTLY. In Hot Standby mode, the startup process must also be
able to probe for conflicting VXID locks, but the lock need never be
fully materialized, because the startup process does not use the
normal lock wait mechanism. Since most VXID locks never need to
touch the lock manager partition locks, this can significantly
reduce blocking contention on read-heavy workloads. Patch by me.
Review by Jeff Davis.
- Tweak PQresStatus() to avoid a clang compiler warning. The previous
test for status < 0 test is in fact testing nothing if the compiler
considers an enum to be an unsigned data type. clang doesn’t like
tautologies, so do this instead. Report by Peter Geoghegan, fix as
suggested by Tom Lane.
- Modestly improve pgbench’s checking for invalid ranges. The old
check against MAX_RANDOM_VALUE is clearly irrelevant since getrand()
no longer calls random(). Instead, check whether min and max are
close enough together to avoid an overflow inside getrand(), as
suggested by Tom Lane. This is still somewhat silly, because we’re
using atoi(), which doesn’t check for overflow anyway and (at least
on my system) will cheerfully return 0 when given “4294967296″. But
that’s a problem for another commit.
- Allow per-column foreign data wrapper options. Shigeru Hanada, with
fairly minor editing by me.
Heikki Linnakangas pushed:
- Avoid integer overflow when LIMIT + OFFSET >= 2
. This fixes bug
#6139 reported by Hitoshi Harada.
Tom Lane pushed:
- Fix incorrect initialization of ProcGlobal->startupBufferPinWaitBufId.
It was initialized in the wrong place and to the wrong value. With
bad luck this could result in incorrect query-cancellation failures
in hot standby sessions, should a HS backend be holding pin on
buffer number 1 while trying to acquire a lock.
- Move CheckRecoveryConflictDeadlock() call to a safer place. This
kluge was inserted in a spot apparently chosen at random: the lock
manager's state is not yet fully set up for the wait, and in
particular LockWaitCancel hasn't been armed by setting lockAwaited,
so the ProcLock will not get cleaned up if the ereport is thrown.
This seems to not cause any observable problem in trivial test
cases, because LockReleaseAll will silently clean up the debris; but
I was able to cause failures with tests involving subtransactions.
Fixes breakage induced by commit c85c941470efc44494fd7a5f426ee85fc65c268c.
Back-patch to all affected branches.
- Reduce PG_SYSLOG_LIMIT to 900 bytes. The previous limit of 1024 was
set on the assumption that all modern syslog implementations have
line length limits of 2KB or so. However, this is false, as at
least Solaris and sysklogd truncate at only 1KB. 900 seems to leave
enough room for the max likely length of the tacked-on prefixes, so
let's go with that. As with the previous change, it doesn't seem
wise to back-patch this into already-released branches; but it
should be OK to sneak it into 9.1. Noah Misch
- Fix thinko in documentation of local_preload_libraries. Somebody
added a cross-reference to shared_preload_libraries, but wrote the
wrong variable name when they did it (and didn't bother to make it a
link either). Spotted by Christoph Anton Mitterer.
- Clean up ill-advised attempt to invent a private set of Node tags.
Somebody thought it'd be cute to invent a set of Node tag numbers
that were defined independently of, and indeed conflicting with, the
main tag-number list. While this accidentally failed to fail so
far, it would certainly lead to trouble as soon as anyone wanted to,
say, apply copyObject to these node types. Clang was already
complaining about the use of makeNode on these tags, and I think
quite rightly so. Fix by pushing these node definitions into the
mainstream, including putting replnodes.h where it belongs.
Bruce Momjian pushed:
- In documentaiton, clarify which commands have reduced WAL volume for
wal_level = minimum. Backpatch to 9.1 and 9.0.
- Fix markup for recent wal_level clarification. Backpatch to 9.1 and 9.0.
Andrew Dunstan pushed:
- Restore the primacy of postgres.h in plpython.c. To avoid having
the python headers hijack various definitions, we now include them
after all the system headers we want, having first undefined some of
the things they want to define. After that's done we restore the
things they scribbled on that matter, namely our snprintf and
vsnprintf macros, if we're using them.
Peter Eisentraut pushed:
- Fix a whitespace issue with the man pages There is what may actually
be a mistake in our markup. The problem is in a situation like
<command>FOO</command> is ...
there is strictly speaking a line break before "FOO". In the HTML
output, this does not appear to be a problem, but in the man page
output, this shows up, so you get double blank lines at odd places.
So far, we have attempted to work around this with an XSL hack, but
that causes other problems, such as creating run-ins in places like
<acronym>SQL</acronym> <command>COPY</command> So fix the problem
properly by removing the extra whitespace. I only fixed the
problems that affect the man page output, not all the places.
- Rename "Example" sections to "Examples" in dblink chapter. For
consistency with other man pages.
- Remove whitespace from end of lines
- Add "Compatibility" section to ALTER EXTENSION reference page Almost
all other pages have one; this one must have been forgotten.
== Rejected Patches (for now) ==
No one was disappointed this week :-)
== Pending Patches ==
Heikki Linnakangas sent in two revisions of a patch to fix some issues
with GiST's interaction with Hot Standby.
Dean Rasheed sent in two revisions of a patch to trim the memory AFTER
Timothy D. F. Lewis and Josh Kupershmidt traded revisions of the patch
to help with vacuuming large objects.
Kevin Grittner sent in another patch intended to fix bug #6123.
Alexander Korotkov sent in three revisions of a patch to speed up GiST
Alvaro Herrera sent in two more revisions of a patch to catalogue NOT
Phil Sorber sent in patches to correct some infelicities in
pg_dumpall's handling of ROLEs.
Tom Lane sent in two revisions of a patch intended to fix a data
corruption issue reported by David Gould on large (32-core, 512G main
memory), highly-loaded systems.
Robert Haas and Josh Kupershmidt traded patches to further refine the
display of object comments in psql.
Zoltan Boszormenyi sent in another revision of a patch to create and
use cross-column stastics.
Peter Geoghegan sent in two more patches to clean up some infelicities
exposed by the Clang compiler.
Jeff Janes sent in a patch to fix a speed issue with larger numbers of
cores first uncovered by mosbench.
Jun Ishiduka sent in another revision of the patch to allow doing a
base backup from a Hot Standby.
Alex Hunsaker sent in a patch to fix some infelicities in PL/Perl(U)'s
Comments are closed.