== PostgreSQL Weekly News - June 17 2012 ==
The first Commitfest of the 9.3 cycle has begun, and will run through
15 July 2012. Kevin Grittner is running this one.
http://wiki.postgresql.org/wiki/CommitFest
The CfP for Postgres Open 2012 is open. Submissions are due by
11:59pm, June 26, 2012.
http://postgresopen.org/2012/speaker/
== PostgreSQL Product News ==
AnySQL Maestro 12.6, an ODBC-based management tool which works with
PostgreSQL, released.
http://www.sqlmaestro.com/products/postgresql/datawizard/
pg_extractor 1.0.0, a customizing add-on to pg_dump, released.
https://github.com/omniti-labs/pg_extractor
== PostgreSQL Jobs for June ==
http://archives.postgresql.org/pgsql-jobs/2012-06/threads.php
== PostgreSQL Local ==
PostgreSQL Session will be held on October 4th, 2012, in Paris,
France. More information at:
http://www.postgresql-sessions.org/en/4/
PostgreSQL Conference Europe 2012 will be in Prague, Czech Republic
on October 23-26. The call for papers is open.
http://2012.pgconf.eu/
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
http://www.pgday.com.ar/quilmes2012?lang=en
== 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@fetter.org, German language
to pwn@pgug.de, Italian language to pwn@itpug.org. Spanish language
to pwn@arpug.com.ar.
== Reviews ==
== Applied Patches ==
Magnus Hagander pushed:
- Revert behaviour of -x/--xlog to 9.1 semantics. To replace it, add
-X/--xlog-method that allows the specification of fetch or stream.
Do this to avoid unnecessary backwards-incompatiblity. Spotted and
suggested by Peter Eisentraut.
http://git.postgresql.org/pg/commitdiff/9af34cdec87d8e60f200ccd5b1b695880412c62b
- Prevent non-streaming replication connections from being selected
sync slave. This prevents a pg_basebackup backup session that just
does a base backup (no xlog involved at all) from becoming the
synchronous slave and thus blocking all access while it runs. Also
fixes the problem when a higher priority slave shows up it would
become the sync standby before it has reached the STREAMING state,
by making sure we can only switch to a walsender that's actually
STREAMING. Fujii Masao
http://git.postgresql.org/pg/commitdiff/3595a71e9ce90a2d4c812a9bb34dc24ffc492c2b
- Reorder basebackup options, to list pg_basebackup first. Since this
is the easy way of doing it, it should be listed first. All the old
information is retained for those who want the more advanced way.
Also adds a subheading for compressing logs, that seems to have been
missing
http://git.postgresql.org/pg/commitdiff/920febdad5073688fac34664249ab329dced8320
Peter Eisentraut pushed:
- pg_receivexlog: Rename option --dir to --directory. getopt_long()
allows abbreviating long options, so we might as well give the
option the full name, and users can abbreviate it how they like. Do
some general polishing of the --help output at the same time.
http://git.postgresql.org/pg/commitdiff/7d754961f799634128fb2d77632e2b53b736ae21
- Improve documentation of postgres -C option. Clarify help
(s/return/print/), and explain that this option is for use by other
programs, not for user-facing use (it does not print units).
http://git.postgresql.org/pg/commitdiff/c0a6f9c84bedc745af2a3bf1dee5e2a4e79b46af
- Add more message pluralization. Even though we can't do much about
the case with multiple plurals in one sentence, we can fix the other
cases.
http://git.postgresql.org/pg/commitdiff/d933092e0ab55ed95615977e50963f969ac9793d
- Improve reporting of permission errors for array types. Because
permissions are assigned to element types, not array types,
complaining about permission denied on an array type would be
misleading to users. So adjust the reporting to refer to the
element type instead. In order not to duplicate the required logic
in two dozen places, refactor the permission denied reporting for
types a bit. pointed out by Yeb Havinga during the review of the
type privilege feature
http://git.postgresql.org/pg/commitdiff/15b1918e7d3532f0e4ec3455ae6ce45fae09c86f
- Make documentation of --help and --version options more consistent.
Before, some places didn't document the short options (-? and -V),
some documented both, some documented nothing, and they were listed
in various orders. Now this is hopefully more consistent and
complete.
http://git.postgresql.org/pg/commitdiff/bb7520cc26dcd392e3dce294b685b3a0d6dae9e9
Tom Lane pushed:
- Fix pg_dump output to a named tar-file archive. "pg_dump -Ft -f
filename ..." got broken by my recent commit 4317e0246c645f60c39e6572644cff1cb03b4c65,
which I fear I only tested in the output-to-stdout variant. Report
and fix by Muhammad Asif Naeem.
http://git.postgresql.org/pg/commitdiff/bf0945e8636bf0390ef4569bbbf9763573211e03
- Ensure pg_ctl behaves sanely when data directory is not specified.
Commit aaa6e1def292cdacb6b27088898793b1b879fedf introduced multiple
hazards in the case where pg_ctl is executed with neither a -D
switch nor any PGDATA environment variable. It would dump core on
machines which are unforgiving about printf("%s", NULL), or failing
that possibly give a rather unhelpful complaint about being unable
to execute "postgres -C", rather than the logically prior complaint
about not being told where the data directory is. Edmund Horner's
report suggests that there is another, Windows-specific hazard here,
but I'm not the person to fix that; it would in any case only be
significant when trying to use a config-only PGDATA pointer.
http://git.postgresql.org/pg/commitdiff/51e61b04f8040f627e7605594095b06c10582fd0
- Minor code review for json.c. Improve commenting, conform to
project style for use of ++ etc. No functional changes.
http://git.postgresql.org/pg/commitdiff/f871ef74a5560377d541e6d94704f30bcbcdb779
- Support Linux's oom_score_adj API as well as the older oom_adj API.
The simplest way to handle this is just to copy-and-paste the
relevant code block in fork_process.c, so that's what I did. (It's
possible that something more complicated would be useful to
packagers who want to work with either the old or the new API; but
at this point the number of such people is rapidly approaching zero,
so let's just get the minimal thing done.) Update relevant
documentation as well.
http://git.postgresql.org/pg/commitdiff/93f4d7f806613d28842f956a84f31cc41d825503
- Deprecate use of GLOBAL and LOCAL in temp table creation. Aside
from adjusting the documentation to say that these are deprecated,
we now report a warning (not an error) for use of GLOBAL, since it
seems fairly likely that we might change that to request
SQL-spec-compliant temp table behavior in the foreseeable future.
Although our handling of LOCAL is equally nonstandard, there is no
evident interest in ever implementing SQL modules, and furthermore
some other products interpret LOCAL as behaving the same way we do.
So no expectation of change and no warning for LOCAL; but it still
seems a good idea to deprecate writing it. Noah Misch
http://git.postgresql.org/pg/commitdiff/c3bc76bdb0ac600e6b4d1e594e1a077c1efc5154
- Fix description of SQL-standard meaning of CREATE LOCAL TEMP TABLE.
I had this slightly wrong, as noted by Noah Misch.
http://git.postgresql.org/pg/commitdiff/8b23db944b9d7f051e2f986cc1f55ade82621218
- Revert "Reduce checkpoints and WAL traffic on low activity database
server." This reverts commit 18fb9d8d21a28caddb72c7ffbdd7b96d52ff9724.
Per discussion, it does not seem like a good idea to allow committed
changes to go un-checkpointed indefinitely, as could happen in a
low-traffic server; that makes us entirely reliant on the WAL stream
with no redundancy that might aid data recovery in case of disk
failure. This re-introduces the original problem of hot-standby
setups generating a small continuing stream of WAL traffic even when
idle, but there are other ways to address that without compromising
crash recovery, so we'll revisit that issue in a future release
cycle.
http://git.postgresql.org/pg/commitdiff/b8b69d89905e04b910bcd65efce1791477b45d35
- Remove release note entry for reverted patch.
http://git.postgresql.org/pg/commitdiff/0f0fba1794c72dfbc0f82c18f50d2cb0dd82e480
- Revisit error message details for JSON input parsing. Instead of
identifying error locations only by line number (which could be
entirely unhelpful with long input lines), provide a fragment of the
input text too, placing this info in a new CONTEXT entry. Make the
error detail messages conform more closely to style guidelines, fix
failure to expose some of them for translation, ensure compiler can
check formats against supplied parameters.
http://git.postgresql.org/pg/commitdiff/80edfd76591fdb9beec061de3c05ef4e9d96ce56
- Stamp HEAD as 9.3devel. Let the hacking begin ...
http://git.postgresql.org/pg/commitdiff/bed88fceac04042f0105eb22a018a4f91d64400d
- Stamp library minor versions for 9.3. This includes fixing the MSVC
copy of ecpg/preproc's version info, which seems to have been
overlooked repeatedly. Can't we fix that so there are not two
copies??
http://git.postgresql.org/pg/commitdiff/357c5493349c5d7603739b9a44384b0e9f35fc25
- Flesh out RELEASE_CHANGES instructions for branching in git. We
have this info in the wiki, but it should be here too.
http://git.postgresql.org/pg/commitdiff/f32609db72f07d6477a4c7de2565cb244f2af969
- Add 9.2 branch to git_changelog's list.
http://git.postgresql.org/pg/commitdiff/80491a19839fd7741805622552f503202780fc52
- Fix stats collector to recover nicely when system clock goes
backwards. Formerly, if the system clock went backwards, the stats
collector would fail to update the stats file any more until the
clock reading again exceeds whatever timestamp was last written into
the stats file. Such glitches in the clock's behavior are not
terribly unlikely on machines not using NTP. Such a scenario has
been observed to cause regression test failures in the buildfarm,
and it could have bad effects on the behavior of autovacuum, so it
seems prudent to install some defenses. We could directly detect
the clock going backwards by adding GetCurrentTimestamp calls in the
stats collector's main loop, but that would hurt performance on
platforms where GetCurrentTimestamp is expensive. To minimize the
performance hit in normal cases, adopt a more complicated scheme
wherein backends check for clock skew when reading the stats file,
and if they see it, signal the stats collector by sending an extra
stats inquiry message. The stats collector does an extra
GetCurrentTimestamp only when it receives an inquiry with an
apparently out-of-order timestamp. To avoid unnecessary
GetCurrentTimestamp calls, expand the inquiry messages to carry the
backend's current clock reading as well as its stats cutoff time.
The latter, being intentionally slightly in-the-past, would trigger
more clock rechecks than we need if it were used for this purpose.
We might want to backpatch this change at some point, but let's let
it shake out in the buildfarm for awhile first.
http://git.postgresql.org/pg/commitdiff/9e18eacbdff2ae2abd5ff38eee725e6399e39b41
- Refer to the default foreign key match style as MATCH SIMPLE
internally. Previously we followed the SQL92 wording, "MATCH
<unspecified>", but since SQL99 there's been a less awkward way to
refer to the default style. In addition to the code changes,
pg_constraint.confmatchtype now stores this match style as 's'
(SIMPLE) rather than 'u' (UNSPECIFIED). This doesn't affect pg_dump
or psql because they use pg_get_constraintdef() to reconstruct
foreign key definitions. But other client-side code might examine
that column directly, so this change will have to be marked as an
incompatibility in the 9.3 release notes.
http://git.postgresql.org/pg/commitdiff/f5297bdfe4c4a47376c41b96161fb55c2294a0b1
Robert Haas pushed:
- Copy-editing of release notes. Remove a couple of items that were
actually back-patched bug fixes. Add additional details to a couple
of items which lacked a description. Improve attributions for a
couple of items I was involved with. A few other miscellaneous
corrections.
http://git.postgresql.org/pg/commitdiff/99b3135e33949da601014800694ae6905ed1075f
- Mark JSON error detail messages for translation. Per gripe from Tom
Lane.
http://git.postgresql.org/pg/commitdiff/36b7e3da17bcca4efe5584d95c386cec2a221a13
- Make \conninfo print SSL information. Alastair Turner, per
suggestion from Bruce Momjian.
http://git.postgresql.org/pg/commitdiff/7582e0be78bc031803e274d428381e0b6077b810
- Remove RELKIND_UNCATALOGED. This may have been important at some
point in the past, but it no longer does anything useful. Review by
Tom Lane.
http://git.postgresql.org/pg/commitdiff/d2c86a1ccd17145eeed2377ff7930e2ccbf5869e
- Remove misplaced sanity check from heap_create(). Even when
allow_system_table_mods is not set, we allow creation of any type of
SQL object in pg_catalog, except for relations. And you can get
relations into pg_catalog, too, by initially creating them in some
other schema and then moving them with ALTER .. SET SCHEMA. So this
restriction, which prevents relations (only) from being created in
pg_catalog directly, is fairly pointless. If we need a safety
mechanism for this, it should be placed further upstream, so that it
affects all SQL objects uniformly, and picks up both CREATE and SET
SCHEMA. For now, just rip it out, per discussion with Tom Lane.
http://git.postgresql.org/pg/commitdiff/a475c6036752c26dca538632b68fd2cc592976b7
- Add new function log_newpage_buffer. When I implemented the
ginbuildempty() function as part of implementing unlogged tables, I
falsified the note in the header comment for log_newpage. Although
we could fix that up by changing the comment, it seems cleaner to
add a new function which is specifically intended to handle this
case. So do that.
http://git.postgresql.org/pg/commitdiff/6cd015bea38b8a59feb84bf238a880a3b503cf5f
- During transaction cleanup, release locks before deleting files.
There's no need to hold onto the locks until the files are needed,
and by doing it this way, we reduce the impact on other backends who
may be awaiting locks we hold. Noah Misch
http://git.postgresql.org/pg/commitdiff/cd80073445ff5d72ad42923ba3d017541feae103
- New SQL functions pg_backup_in_progress() and pg_backup_start_time().
Darold Gilles, reviewed by Gabriele Bartolini and others, rebased by
Marco Nenciarini. Stylistic cleanup and OID fixes by me.
http://git.postgresql.org/pg/commitdiff/68de499bda40fdf1395b714bb63febad61046700
- Doc corrections for pg_is_in_backup patch. Fujii Masao
http://git.postgresql.org/pg/commitdiff/c616d85f6b6c7bd160c71583e2445b460eee8e3d
- Improve readability and error messages in pg_backup_start_time.
Gurjeet Singh, with corrections by me.
http://git.postgresql.org/pg/commitdiff/8507c2f8564b709bb6a3cc86e9599f6129f45c8e
Bruce Momjian pushed:
- In pg_upgrade, verify that the install user has the same oid on both
clusters, and make sure the new cluster has no additional users.
Backpatch to 9.1.
http://git.postgresql.org/pg/commitdiff/b9212e379c55564c8b6cdc8585b74606e90ec1ea
- In pg_upgrade, report pre-PG 8.1 plpython helper functions left in
the public schema that no longer point to valid shared object
libraries, and suggest a solution. Backpatch to 9.1 (already in
head)
http://git.postgresql.org/pg/commitdiff/0f3326175a951e3ff9e62c310d686a681883899f
- Improve pg_upgrade wording for pg_ctl start failure; could be
connection failure. Backpatch to 9.2. Per report from Evan D.
Hoffman
http://git.postgresql.org/pg/commitdiff/877b55c61962b480080a818b95dd462d5a7fe68d
- Update pgindent Perl indentation instructions based on feedback from
Àlvaro and Noah Misch. Backpatch to 9.2.
http://git.postgresql.org/pg/commitdiff/d6e02074371b39f9bfd7323c95102e4af53b34c6
- In pgindent, suppress reading the perltidy RC file using
--noprofile.
http://git.postgresql.org/pg/commitdiff/0acd97825916bd341dfc6061a0713e0c56901571
- Remove 'for' loop perltidy argument, and move args to perltidyrc
file. Backpatch to 9.2. Per suggestion from Noah Misch
http://git.postgresql.org/pg/commitdiff/47463a809870a736fcd2a4c6896c0f54be831f51
== Rejected Patches (for now) ==
No one was disappointed this week :-)
== Pending Patches ==
Noah Misch sent in a patch to restrict changing a function's state of
CALLED ON NULL INPUT to the those roles which have permission to use
the language.
Jeff Davis sent in another revision of the patch to add 16-bit page
checksums.
Jeff Davis sent in two more revisions of the patch to fix the way
fsync happens during initdb.
Amit Kapila sent in another revision of the patch to provide
fallback_application_name in places where it's not yet provided.
Andres Freund sent in 16 patches implementing different parts of
Logical Replication/BDR.
Alexander Korotkov sent in a patch to implement quad-tree SP-GiST
indexing on ranges.
Marco Nenciarini sent in a patch to implement array_remove for 1-D
arrays and array_replace.
Shigeru HANADA sent in another revision of a patch to add a pgsql_fdw.
Robert Haas sent in a WIP patch implementing metapages for all
relations.
KaiGai Kohei sent in a patch implementing row-level access control.
Alvaro Herrera sent in another revision of the foreign key locks
patch.
Heikki Linnakangas sent in a flock of patches to change the WAL
format: one to use a 64-bit segment number, instead of the log/seg
combination; the second to include the xl_rem_len field, used for
continuation records, unconditionally in the xlog page header; the
third to allow WAL record header to be split across pages.
Robert Haas sent in another revision of the patch to allow measuring
spinning on lwlocks.
Peter Eisentraut sent in a patch implementing TRANSFORMs, namely
SQL-callable bits of code transforming PostgreSQL data structures to
and from ones in PLs.
Honza Horak sent in a patch to allow an instance to answer on more
than one unix socket.
Marko Kreen sent in two revisions of a patch to allow libpq to return
a row at a time rather than buffering the entire result set before
returning the first row.
Dimitri Fontaine sent in yet another patch implementing event
triggers.
Alvaro Herrera sent in two revisions of a patch which splits htup.h in
two pieces, one public and one private.
Tom Lane sent in a patch to change the behavior of ON UPDATE SET
DEFAULT/SET NULL to set all columns, per the change to the SQL
standard.
Josh Kupershmidt sent in another revision of the patch to fix several
infelicities in tab completion for DROP FUNCTION in psql.