Revues de code

Correctifs appliqués

Magnus Hagander a poussé :

  • 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.
  • 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
  • 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

Peter Eisentraut a poussé :

Tom Lane a poussé :

  • 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.
  • 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.
  • Minor code review for json.c. Improve commenting, conform to project style for use of ++ etc. No functional changes.
  • 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.
  • 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
  • Fix description of SQL-standard meaning of CREATE LOCAL TEMP TABLE. I had this slightly wrong, as noted by Noah Misch.
  • 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.
  • Remove release note entry for reverted patch.
  • 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.
  • Stamp HEAD as 9.3devel. Let the hacking begin ...
  • 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??
  • Flesh out RELEASE_CHANGES instructions for branching in git. We have this info in the wiki, but it should be here too.
  • Add 9.2 branch to git_changelog's list.
  • 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.
  • 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.

Robert Haas a poussé :

Bruce Momjian a poussé :

Correctifs rejetés (à ce jour)

  • Pas de déception cette semaine :-)

Correctifs en attente

  • 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.