Nouvelles hebdomadaires de PostgreSQL - 20 mars 2011
PostgreSQL a été accepté comme mentor pour le Google Summer of Code 2011 ! Si vous êtes étudiant et que vous êtes intéressé, les candidatures sont acceptées jusqu'au 28 mars 2011. Détails et idées par ici :
http://wiki.postgresql.org/wiki/GSoC_2011
Les nouveautés des produits dérivés
Offres d'emplois autour de PostgreSQL en mars
PostgreSQL Local
PostgreSQL dans les média
PostgreSQL Weekly News / les nouvelles hebdomadaires vous sont offertes cette semaine par David Fetter. Traduction par l'équipe PostgreSQLFr sous licence CC BY-NC-SA.
Proposez vos articles ou annonces avant dimanche 15:00 (heure du Pacifique). Merci de les envoyer en anglais à david (a) fetter.org, en allemand à pwn (a) pgug.de, en italien à pwn (a) itpug.org et en espagnol à pwn (a) arpug.com.ar.
(lien vers l'article original)
Revues de code
Correctifs appliqués
Bruce Momjian a poussé :
Tom Lane a poussé :
- Adjust regression test to avoid platform-dependent failure. We have a test that verifies that max(anyarray) will cope if the array column elements aren't all the same array type. However, it's now possible for that to produce a collation-related error message instead of the expected one, if the first two column elements happen to be of the same type and it's one that expects to be given collation info. Tweak the test to ensure this doesn't happen. Per buildfarm member pika.
http://git.postgresql.org/pg/commitdiff/f12423d75a1181d75bd646869b140ba0c199fa99
- Improve handling of unknown-type literals in UNION/INTERSECT/EXCEPT. This patch causes unknown-type Consts to be coerced to the resolved output type of the set operation at parse time. Formerly such Consts were left alone until late in the planning stage. The disadvantage of that approach is that it disables some optimizations, because the planner sees the set-op leaf query as having different output column types than the overall set-op. We saw an example of that in a recent performance gripe from Claudio Freire. Fixing such a Const requires scribbling on the leaf query in transformSetOperationTree, but that should be all right since if the leaf query's semantics depended on that output column, it would already have resolved the unknown to something else. Most of the bulk of this patch is a simple adjustment of transformSetOperationTree's API so that upper levels can get at the TargetEntry containing a Const to be replaced: it now returns a list of TargetEntries, instead of just the bare expressions.
http://git.postgresql.org/pg/commitdiff/72cfc17aef4fc9aa2de1c82045b7d609c0f2c513
- Revise collation derivation method and expression-tree representation. All expression nodes now have an explicit output-collation field, unless they are known to only return a noncollatable data type (such as boolean or record). Also, nodes that can invoke collation-aware functions store a separate field that is the collation value to pass to the function. This avoids confusion that arises when a function has collatable inputs and noncollatable output type, or vice versa. Also, replace the parser's on-the-fly collation assignment method with a post-pass over the completed expression tree. This allows us to use a more complex (and hopefully more nearly spec-compliant) assignment rule without paying for it in extra storage in every expression node. Fix assorted bugs in the planner's handling of collations by making collation one of the defining properties of an EquivalenceClass and by converting CollateExprs into discardable RelabelType nodes during expression preprocessing.
http://git.postgresql.org/pg/commitdiff/b310b6e31ce5aa9e456c43c0e8e93248b0c84c02
- Fix up handling of C/POSIX collations. Install just one instance of the "C" and "POSIX" collations into pg_collation, rather than one per encoding. Make these instances exist and do something useful even in machines without locale_t support: to wit, it's now possible to force comparisons and case-folding functions to use C locale in an otherwise non-C database, whether or not the platform has support for using any additional collations. Fix up severely broken upper/lower/initcap functions, too: the C/POSIX fastpath now does what it is supposed to, and non-default collations are handled correctly in single-byte database encodings. Merge the two separate collation hashtables that were being maintained in pg_locale.c, and be more wary of the possibility that we fail partway through filling a cache entry.
http://git.postgresql.org/pg/commitdiff/176d5bae1d636fc1e91840b12cbd04c96d638b7e
- Suppress platform-dependent unused-variable warning. The local variable "sock" can be unused depending on compilation flags. But there seems no particular need for it, since the kernel calls can just as easily say port->sock instead.
http://git.postgresql.org/pg/commitdiff/82e4d45bd0ba9c07b8a97f28f939db6d8d564f9a
- Add some platform-independent tests for the collation feature. There's a lot we can't test very well without platform dependencies, but the C/POSIX collations should now work the same way everywhere.
http://git.postgresql.org/pg/commitdiff/9b095fbea4d6e80e3288e08bd2af4f33aa66875e
Magnus Hagander a poussé :
Robert Haas a poussé :
- Remove 13 keywords that are used only for ROLE options. Review by Tom Lane.
http://git.postgresql.org/pg/commitdiff/5ca4dfc79f21828174de3a8bc7d29718d0c52c34
- Minor sync rep documentation improvements: Make the name of the ID tag for the GUC entry match the GUC name; Clarify that synchronous_replication waits for xlog flush, not receipt; Mention that synchronous_replication won't wait if max_wal_senders=0.
http://git.postgresql.org/pg/commitdiff/f0f3617135854281bdb79179a895c102d54cb95b
- Corrections to CREATE FOREIGN TABLE documentation. Omit incorrect = sign, and properly document server_name parameter. Shigeru Hanada.
http://git.postgresql.org/pg/commitdiff/5f588e20051eb18333f6ea5b46bd779ba1eb8773
- Tab completion for \pset format and \pset linestyle. Pavel Stehule
http://git.postgresql.org/pg/commitdiff/ad3aff45f0d302b35d009e525de8a9d0ee9745a9
- Tab completion for \pset format and \pset linestyle. Pavel Stehule
http://git.postgresql.org/pg/commitdiff/ad3aff45f0d302b35d009e525de8a9d0ee9745a9
- Fix various possible problems with synchronous replication. 1. Don't ignore query cancel interrupts. Instead, if the user asks to cancel the query after we've already committed it, but before it's on the standby, just emit a warning and let the COMMIT finish. 2. Don't ignore die interrupts (pg_terminate_backend or fast shutdown). Instead, emit a warning message and close the connection without acknowledging the commit. Other backends will still see the effect of the commit, but there's no getting around that; it's too late to abort at this point, and ignoring die interrupts altogether doesn't seem like a good idea. 3. If synchronous_standby_names becomes empty, wake up all backends waiting for synchronous replication to complete. Without this, someone attempting to shut synchronous replication off could easily wedge the entire system instead. 4. Avoid depending on the assumption that if a walsender updates MyProc->syncRepState, we'll see the change even if we read it without holding the lock. The window for this appears to be quite narrow (and probably doesn't exist at all on machines with strong memory ordering) but protecting against it is practically free, so do that. 5. Remove useless state SYNC_REP_MUST_DISCONNECT, which isn't needed and doesn't actually do anything. There's still some further work needed here to make the behavior of fast shutdown plausible, but that looks complex, so I'm leaving it for a separate commit. Review by Fujii Masao.
http://git.postgresql.org/pg/commitdiff/9a56dc3389b9470031e9ef8e45c95a680982e01a
- Add pause_at_recovery_target to recovery.conf.sample; improve docs. Fujii Masao, but with the proposed behavior change reverted, and the rest adjusted accordingly.
http://git.postgresql.org/pg/commitdiff/84abea76f60c5fd1c008b8ddf250b4bc89e288fc
- Remove bogus comment.
http://git.postgresql.org/pg/commitdiff/02b1f84e7d2c8921d3ef291469cfd4b7235358f0
- Protocol documentation for Hot Standby feedback messages.
http://git.postgresql.org/pg/commitdiff/76dbb4615389e1f44e48074b87be77262143021e
- Minor fixes for high availability documentation. Erik Rijkers and me.
http://git.postgresql.org/pg/commitdiff/f94c6f9c0f05ff70b232e620eb9c420294e90cd3
- Remove bogus semicolons in recoveryPausesHere. Without this, the startup process goes into a tight loop, consuming 100% of one CPU and failing to respond to interrupts.
http://git.postgresql.org/pg/commitdiff/777e8c0015743224cc46f3ce39243b05c6d882ef
- Remove ancient -X options to pg_dump, pg_dumpall, pg_restore. The last version in which these options were documented is now EOL, so it's time to get rid of them for real. We now use GNU-style long options instead.
http://git.postgresql.org/pg/commitdiff/c5eb835bbffb99518405a1e5bccb58c85e0ab30e
- Make synchronous replication query cancel/die messages more consistent. Per a gripe from Thom Brown about my previous commit in this area, commit 9a56dc3389b9470031e9ef8e45c95a680982e01a.
http://git.postgresql.org/pg/commitdiff/7a37900443b016e0e7c72f6b42327bc05f8b5003
- Woops. Previous patch to remove -X options missed getopt_long calls(). Noted by Tom Lane.
http://git.postgresql.org/pg/commitdiff/f78ba0a73a60f40270b21c4582f6a7d52fe16739
- Move synchronous_standbys_defined updates from WAL writer to BG writer. This is advantageous because the BG writer is alive until much later in the shutdown sequence than WAL writer; we want to make sure that it's possible to shut off synchronous replication during a smart shutdown, else it might not be possible to complete the shutdown at all. Per very reasonable gripes from Fujii Masao and Simon Riggs.
http://git.postgresql.org/pg/commitdiff/727589995a3e027046f0da7af6ba665b0b47f89f
- Fix possible "tuple concurrently updated" error in ALTER TABLE. When adding an inheritance parent to a table, an AccessShareLock on the parent isn't strong enough to prevent trouble, so take ShareUpdateExclusiveLock instead. Since this is a behavior change, albeit a fairly unobtrusive one, and since we have only one report from the field, no back-patch. Report by Jon Nelson, analysis by Alvaro Herrera, fix by me.
http://git.postgresql.org/pg/commitdiff/fbcf4b92aa64d4577bcf25925b055316b978744a
Andrew Dunstan a poussé :
Peter Eisentraut a poussé :
- Raise maximum value of several timeout parameters The maximum value of deadlock_timeout, max_standby_archive_delay, max_standby_streaming_delay, log_min_duration_statement, and log_autovacuum_min_duration was INT_MAX/1000 milliseconds, which is about 35min, which is too short for some practical uses. Raise the maximum value to INT_MAX; the code that uses the parameters already supports that just fine.
http://git.postgresql.org/pg/commitdiff/8c0a5eb78af00ec4720e693feaba70b5a73205d1
Alvaro Herrera a poussé :
Correctifs rejetés (à ce jour)
- Pas de déception cette semaine :-)
Correctifs en attente
- Fujii Masao sent in another revision of the replication server timeout patch.
- Robert Haas sent in two revisions of a patch intended to fix some infelicities in syncrep.
- Roman Zotov sent in a patch to turn PREFERRED for type from a boolean to an int2, which allows for an expression of precedence.
- Thom Brown sent in a patch to allow users to set a default database name other than postgres in initdb.
- Piyush Newe sent in a patch intended to fix some infelicities in century handling in to_date.
- Heikki Linnakangas sent in another revision of the patch to enable taking multiple base backups.
- Radoslaw Smogura sent in two revisions of a patch to add a second level buffer cache.
- Kevin Grittner sent in two revisions of a patch intended to fix an issue in SSI.
- Nikhil Sontakke sent in two revisions of a patch to fix an issue with a VACUUM FULL deadlock.
- Jan Urbanski sent in another revision of the patch to add PL/PythonU tracebacks.