Nouvelles hebdomadaires de PostgreSQL - 27 février 2011
Gabriele Bartolini, du PUG italien, fera une présentation autour de PostgreSQL 9.0 lors du Codemotion à Rome le samedi 5 mars à 16h10. Plus d'informations :
http://www.codemotion.it/en/
Les nouveautés des produits dérivés
Offres d'emplois autour de PostgreSQL en février
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
ITAGAKI Takahiro a poussé :
Bruce Momjian a poussé :
Tom Lane a poussé :
- Fix dangling-pointer problem in before-row update trigger processing. ExecUpdate checked for whether ExecBRUpdateTriggers had returned a new tuple value by seeing if the returned tuple was pointer-equal to the old one. But the "old one" was in estate->es_junkFilter's result slot, which would be scribbled on if we had done an EvalPlanQual update in response to a concurrent update of the target tuple; therefore we were comparing a dangling pointer to a live one. Given the right set of circumstances we could get a false match, resulting in not forcing the tuple to be stored in the slot we thought it was stored in. In the case reported by Maxim Boguk in bug #5798, this led to "cannot extract system attribute from virtual tuple" failures when trying to do "RETURNING ctid". I believe there is a very-low-probability chance of more serious errors, such as generating incorrect index entries based on the original rather than the trigger-modified version of the row. In HEAD, change all of ExecBRInsertTriggers, ExecIRInsertTriggers, ExecBRUpdateTriggers, and ExecIRUpdateTriggers so that they continue to have similar APIs. In the back branches I just changed ExecBRUpdateTriggers, since there is no bug in the ExecBRInsertTriggers case.
http://git.postgresql.org/pg/commitdiff/a210be772047575331fb6b0ab7b72043f81452ba
- Remove ExecRemoveJunk(), which is no longer used anywhere. This was a leftover from the pre-8.1 design of junkfilters. It doesn't seem to have any reason to live, since it's merely a combination of two easy function calls, and not a well-designed combination at that (it encourages callers to leak the result tuple).
http://git.postgresql.org/pg/commitdiff/2e852e541c84af85aa918762fc838fa44a399310
- Allow binary I/O of type "void". void_send is useful for the same reason that void_out doesn't throw error, namely that someone might do "select void_returning_func(...)" from a client that prefers to operate in binary mode. The void_recv function may or may not have any practical use, but we provide it for symmetry. Radosław Smogura
http://git.postgresql.org/pg/commitdiff/1ab9b012bdf1f106792fc523e21b9ca8299bb8ed
- Add a relkind field to RangeTblEntry to avoid some syscache lookups. The recent additions for FDW support required checking foreign-table-ness in several places in the parse/plan chain. While it's not clear whether that would really result in a noticeable slowdown, it seems best to avoid any performance risk by keeping a copy of the relation's relkind in RangeTblEntry. That might have some other uses later, anyway. Per discussion.
http://git.postgresql.org/pg/commitdiff/bdca82f44d0e0168dece56cbd53b54ba142f328f
- Support data-modifying commands (INSERT/UPDATE/DELETE) in WITH. This patch implements data-modifying WITH queries according to the semantics that the updates all happen with the same command counter value, and in an unspecified order. Therefore one WITH clause can't see the effects of another, nor can the outer query see the effects other than through the RETURNING values. And attempts to do conflicting updates will have unpredictable results. We'll need to document all that. This commit just fixes the code; documentation updates are waiting on author. Marko Tiikkaja and Hitoshi Harada
http://git.postgresql.org/pg/commitdiff/389af951552ff2209eae3e62fa147fef12329d4f
- Fix order of shutdown processing when CTEs contain inter-references. We need ExecutorEnd to run the ModifyTable nodes to completion in reverse order of initialization, not forward order. Easily done by constructing the list back-to-front.
http://git.postgresql.org/pg/commitdiff/000128bc7f591025d0c1ce539bb53c6ad00ab69c
- Refactor the executor's API to support data-modifying CTEs better. The originally committed patch for modifying CTEs didn't interact well with EXPLAIN, as noted by myself, and also had corner-case problems with triggers, as noted by Dean Rasheed. Those problems show it is really not practical for ExecutorEnd to call any user-defined code; so split the cleanup duties out into a new function ExecutorFinish, which must be called between the last ExecutorRun call and ExecutorEnd. Some Asserts have been added to these functions to help verify correct usage. It is no longer necessary for callers of the executor to call AfterTriggerBeginQuery/AfterTriggerEndQuery for themselves, as this is now done by ExecutorStart/ExecutorFinish respectively. If you really need to suppress that and do it for yourself, pass EXEC_FLAG_SKIP_TRIGGERS to ExecutorStart. Also, refactor portal commit processing to allow for the possibility that PortalDrop will invoke user-defined code. I think this is not actually necessary just yet, since the portal-execution-strategy logic forces any non-pure-SELECT query to be run to completion before we will consider committing. But it seems like good future-proofing.
http://git.postgresql.org/pg/commitdiff/a874fe7b4c890d1fe3455215a83ca777867beadd
- Add documentation for data-modifying statements in WITH clauses. Marko Tiikkaja, somewhat reworked by Tom Lane.
http://git.postgresql.org/pg/commitdiff/0ef0b302040284a087c1bc90df5b115f0dea7764
Robert Haas a poussé :
Peter Eisentraut a poussé :
- Add PL/Python functions for quoting strings. Add functions plpy.quote_ident, plpy.quote_literal, plpy.quote_nullable, which wrap the equivalent SQL functions. To be able to propagate char * constness properly, make the argument of quote_literal_cstr() const char *. This also makes it more consistent with quote_identifier(). Jan Urbański, reviewed by Hitoshi Harada, some refinements by Peter Eisentraut
http://git.postgresql.org/pg/commitdiff/1c51c7d5ffd407426f314b2cd317ef77f14efb1f
- Table function support for PL/Python. This allows functions with multiple OUT parameters returning both one or multiple records (RECORD or SETOF RECORD). Jan Urbański, reviewed by Hitoshi Harada
http://git.postgresql.org/pg/commitdiff/bc411f25c14f65b459de5dbc96ac79e7741ef9ee
- Remove remaining expected file for Python 2.2. We don't have complete expected coverage for Python 2.2 anyway, so it doesn't seem worth keeping this one around that no one appears to be updating anyway. Visual inspection of the differences ought to be good enough for those few who care about this obsolete Python version.
http://git.postgresql.org/pg/commitdiff/438cdf6e4893311df4e94dc55b961a691908a530
- PL/Python explicit subtransactions. Adds a context manager, obtainable by plpy.subtransaction(), to run a group of statements in a subtransaction. Jan Urbański, reviewed by Steve Singer, additional scribbling by me
http://git.postgresql.org/pg/commitdiff/22690719ea5a89ccbcd04deb58c83d8d5f138df8
Alvaro Herrera a poussé :
Andrew Dunstan a poussé :
Heikki Linnakangas a poussé :
Magnus Hagander a poussé :
Correctifs rejetés (à ce jour)
- Pas de déception cette semaine :-)
Correctifs en attente
- Hans-Juergen Schoenig sent in a WIP patch to track cross-column correllation.
- Kevin Grittner sent in two revisions of a patch to track changes with triggers.
- Radoslaw Smogura sent in three revisions of a patch to add a binary in/out for aclitem.
- Alexander Korotkov sent in a WIP patch to collect statistics for array columns.
- Shigeru HANADA sent in another revision of the postgresql_fdw patch.
- Gurjeet Singh sent in a patch to allow the use of paths relative to that of the current file in psql.
- Andrew Tipton sent in a patch to add GiST support for BOX @> POINT queries.
- Magnus Hagander sent in another revision of the patch to allow streaming a base backup.
- Fujii Masao sent in another revision of the patch to add replication server timeout.
- Rumko (rumcic AT gmail DOT com) sent in a patch to allow PostgreSQL to compile on Dragonfly BSD.
- Jaime Casanova sent in another revision of the patch to allow for synchronous replication.