== PostgreSQL Weekly News - January 15 2012 ==
Commitfest 4 has begun. Start reviewing those patches!
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.
== PostgreSQL Jobs for January ==
== PostgreSQL Local ==
The fifth annual "Prague PostgreSQL Developers Day" conference,
organized by CSPUG (Czech and Slovak PostgreSQL Users Group), will be
held on February 9, 2012 in Prague. The Call for Papers is open.
Please send proposals including contact information, topic, and
expected length of session to info AT p2d2 DOT cz.
== 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 david(at)fetter(dot)org, German language
to pwn(at)pgug(dot)de, Italian language to pwn(at)itpug(dot)org(dot) Spanish language
== Applied Patches ==
Magnus Hagander pushed:
- Fix pg_basebackup for keepalive messages. Teach pg_basebackup in
streaming mode to deal with keepalive messages. Also change the
order of checks to complain at the message rather than block size
when a new message is introduced. In passing, switch to using
sizeof() instead of hardcoded sizes for WAL protocol structs.
- Fix comment language. Per comment from Heikki Linnakangas.
- Add .gitignore file for entab. Kevin Grittner
- Allow a user to kill his own queries using pg_cancel_backend().
Allows a user to use pg_cancel_queries() to cancel queries in other
backends if they are running under the same role.
pg_terminate_backend() still requires superuser permissions. Short
patch, many authors working on the bikeshed: Magnus Hagander, Josh
Kupershmidt, Edward Muller, Greg Smith.
Robert Haas pushed:
- Fix pathname in pgindent README. Kevin Grittner
- Typo fix.
- Fix broken logic in lazy_vacuum_heap. As noted by Tom Lane, the
previous coding in this area, which I introduced in commit
bbb6e559c4ea0fb4c346beda76736451dc24eb4e, was poorly tested and
caused the vacuum's second heap to go into what would have been an
infinite loop but for the fact that it eventually caused a memory
allocation failure. This version seems to work better.
Peter Eisentraut pushed:
- Add compatibility note about grant options on GRANT reference page.
Point out in the compatibility section that granting grant options
to PUBLIC is not supported by PostgreSQL. This is already mentioned
earlier, but since it concerns the information schema, it might be
worth pointing out explicitly as a compatibility issue.
- pg_dump: Dump foreign options in sorted order
- Support CREATE TABLE (LIKE ...) with foreign tables and views.
Composite types are not yet supported, because parserOpenTable()
- Fix typos
- initdb: Remove support for crypt authentication method. This was
removed from the backend a long time ago, but initdb still thought
that it was OK to use in the -A option.
- pgcrypto: Remove inappropriate const qualifier. The function in
question does not in fact ensure that the passed argument is not
changed, and the callers don't care much either.
Tom Lane pushed:
- Fix one-byte buffer overrun in contrib/test_parser. The original
coding examined the next character before verifying that there *is*
a next character. In the worst case with the input buffer right up
against the end of memory, this would result in a segfault. Problem
spotted by Paul Guyot; this commit extends his patch to fix an
additional case. In addition, make the code a tad more readable by
not overloading the usage of *tlen.
- Tweak duplicate-index-column regression test to avoid locale
sensitivity. The originally-chosen test case gives different
results in es_EC locale because of unusual rule for sorting strings
beginning with "LL". Adjust the comparison value to avoid that,
while hopefully not introducing new locale dependencies elsewhere.
Per report from Jaime Casanova.
- Fix CLUSTER/VACUUM FULL for toast values owned by recently-updated
rows. In commit 7b0d0e9356963d5c3e4d329a917f5fbb82a2ef05, I made
CLUSTER and VACUUM FULL try to preserve toast value OIDs from the
original toast table to the new one. However, if we have to copy
both live and recently-dead versions of a row that has a toasted
column, those versions may well reference the same toast value with
the same OID. The patch then led to duplicate-key failures as we
tried to insert the toast value twice with the same OID. (The
previous behavior was not very desirable either, since it would have
silently inserted the same value twice with different OIDs. That
wastes space, but what's worse is that the toast values inserted for
already-dead heap rows would not be reclaimed by subsequent ordinary
VACUUMs, since they go into the new toast table marked live not
deleted.) To fix, check if the copied OID already exists in the new
toast table, and if so, assume that it stores the desired value.
This is reasonably safe since the only case where we will copy an
OID from a previous toast pointer is when toast_insert_or_update was
given that toast pointer and so we just pulled the data from the old
table; if we got two different values that way then we have big
problems anyway. We do have to assume that no other backend is
inserting items into the new toast table concurrently, but that's
surely safe for CLUSTER and VACUUM FULL. Per bug #6393 from Maxim
Boguk. Back-patch to 9.0, same as the previous patch.
Heikki Linnakangas pushed:
- Refactor XLogInsert a bit. The rdata entries for backup blocks are
now constructed before acquiring WALInsertLock, which slightly
reduces the time the lock is held. Although I could not measure any
benefit in benchmarks, the code is more readable this way.
- Remove useless 'needlock' argument from GetXLogInsertRecPtr. It was
always passed as 'true'.
- Make superuser imply replication privilege. The idea of a privilege
that superuser doesn't have doesn't make much sense, as a superuser
can do whatever he wants through other means, anyway. So instead of
granting replication privilege to superusers in CREATE USER time by
default, allow replication connection from superusers whether or not
they have the replication privilege. Patch by Noah Misch, per
discussion on bug report #6264
- Fix poll() implementation of WaitLatchOrSocket to notice postmaster
death. When the remote end of the pipe is closed, select() reports
the fd as readable, but poll() has a separate POLLHUP return code
for that. Spotted by Peter Geoghegan.
Alvaro Herrera pushed:
- Validate number of steps specified in permutation. A permutation
that specifies more steps than defined causes isolationtester to
crash, so avoid that. Using less steps than defined should probably
not be a problem, but no spec currently does that.
- Avoid NULL pointer dereference in isolationtester
- Detect invalid permutations in isolationtester. isolationtester is
now able to continue running other permutations when it detects that
one of them is invalid, which is useful during initial development
of spec files. Author: Alexander Shulgin
Simon Riggs pushed:
- Minor but necessary improvements to WAL keepalives. Fujii Masao
- 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
Andrew Dunstan pushed:
- Improve efficiency of recent changes to plperl's sv2cstr(). Along
the way, add a missing dependency in the GNUmakefile. Alex
Hunsaker, with a slight adjustment by me.
== Rejected Patches (for now) ==
No one was disappointed this week :-)
== Pending Patches ==
Peter Eisentraut sent in a patch to make variable-length pg_catalog
fields invisible in pg_* C structs.
Joel Jacobson sent in two revisions of a patch to create call graphs
for UDF function calls inside PostgreSQL.
Joachim Wieland sent in a patch to allow master databases to send
NOTIFYs to replicas.
Robert Haas and Andrew Dunstan traded patches to add JSON types and
Ryan Kelly and Heikki Linnakangas traded patches to allow breaking out
of hung connection attempts in libpq.
KaiGai Kohei sent in a patch to add a new GUC: sepgsql.client_label,
which allows a client process to switch its privileges into another
one, as long as the system security policy allows this transition.
KaiGai Kohei sent a patch to add OAT_DROP object access hook around
the permission checks of object deletion.
David Fetter sent in a patch by Dan Scales to add double-write, which
among other things gets durability guarantees without the same
overhead as full_page_writes.
Robert Haas sent in a patch intended to ensure checkpoint writeback
via sync_file_range where this call is available.
Simon Riggs sent in another revision of the patch to allow logging
messages for archive recovery progress.
Peter Eisentraut sent in a patch to add .colnames() and .coltypes()
methods to PL/PythonU.
Peter Eisentraut sent in a patch to make psql's tab completion
preserve the case the completion was started in rather than
unconditionally upper-casing keywords.
Peter Eisentraut sent in a patch to add a command ALTER TABLE ...
Thomas Munro sent in a patch to rename sequences automatically in
cases where this makes sense.
Scott Mead sent in another revision of the patch to allow
introspecting "IDLE IN TRANSACTION" situations.
Noah Misch sent in another revision of the patch to collect frequency
statistics for arrays.
Simon Riggs sent in another revision of the patch to remove CLOG
contention caused by dirty CLOG LRU.
Kevin Grittner and Tom Lane traded patches to fix bug #6123
Robert Haas sent in a patch to measure spinning.
Simon Riggs sent in a patch to simulate CLOG contention.
Simon Riggs sent in a patch to add a new -x option for pgbench which
executes the given command once after connection of each session.
Simon Riggs sent in a patch to ensure that the correct code,
ERRCODE_READ_ONLY_SQL_TRANSACTION, be sent in all remaining cases for
illegal actions on a standby.
Fujii Masao sent in a patch to add a "write" replication mode for
Fujii Masao sent in another revision of the patch to allow taking an
online base backup from a standby.
Dimitri Fontaine sent in another revision of the patch to add triggers
Robert Haas sent in a patch to fix an issue where concurrent CREATE
TABLE/DROP SCHEMA can leave inconsistent leftovers.
Greg Smith sent in a patch to speed up dblink by creating and using a
new libpq tuple storage system.
Fujii Masao sent in a patch intended to correct an issue where
replay_location indicates an incorrect location.
Robert Haas sent in a patch which shows Heap Fetches in EXPLAIN for
Tomas Vondra sent in another revision of the patch to allow EXPLAIN
ANALYZE with rows but not timing information.
Alvaro Herrera sent in another revision of the patch to add foreign
Marco Nenciarini sent in another revision of the patch to make it
possible to enforce arrays of foreign keys.
Peter Eisentraut sent in a patch to implement specific -A (auth)
options for initdb, namely --auth-local and --auth-host.
Heikki Linnakangas sent in another revision of the patch to move work
Peter Eisentraut sent in a patch to allow GUC control of the location
of server-side SSL files.
Peter Eisentraut sent in a patch to allow using the NUL byte as a
field or record separator in psql output.
Noah Misch sent in a patch to make psql's filename completion work
with filenames that contain one or more spaces.
Noah Misch sent in a patch to fix several infelicities in psql's
handling of COPY.
Matthew Draper sent in a patch to allow SQL language functions to
reference parameters by name. And there was much rejoicing!
Peter Eisentraut sent in a patch to clean up a lot of warnings in
Jaime Casanova sent in a patch to add a pg_stats_recovery view.
Ants Aasma sent in another revision of the patch to add timing of
buffer I/O requests.
Peter Eisentraut sent in a patch to change the exit() calls in
libraries to abort()s.
Simon Riggs sent in a patch to enable keepalive on quiet systems that
Jaime Casanova sent in a patch which adds checks to pg_basebackup to
ensure that the system-set number of fields is actually there.
Greg Smith sent in a patch to add a GUC which rate-limits VACUUMs in
Simon Riggs sent in a patch to change the walrestore process so it
asynchronously executes restore_command while recovery continues
Joachim Wieland sent in another revision of the patch to parallelize
Kevin Grittner sent in another revision of the patch to add a function
which shows trigger depth.
Peter Geoghegan sent in another revision of the patch to allow group
Jeff Janes sent in a patch to calculate memory for sorts more
precisely and use it more efficiently.
Kevin Grittner sent in another revision of the patch to generalize
trigger functionality for any operation after each row of any table
with a primary key. This is called trigger_change_notification.
pgsql-announce by date
|Next:||From: Michael Paquier||Date: 2012-01-17 02:40:24|
|Subject: Postgres-XC 0.9.7 released|
|Previous:||From: Andreas 'ads' Scherbaum||Date: 2012-01-13 21:28:32|
|Subject: Schedule for PostgreSQL devroom at FOSDEM 2012|