PostgreSQL La base de donnees la plus sophistiquee au monde.

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 :

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), en allemand à pwn (a), en italien à pwn (a) et en espagnol à pwn (a)

(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.
  • 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).
  • 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
  • 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.
  • 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
  • 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.
  • 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.
  • Add documentation for data-modifying statements in WITH clauses. Marko Tiikkaja, somewhat reworked by Tom Lane.

Robert Haas a poussé :

Peter Eisentraut a poussé :

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.

pgwn/27_fevrier_2011.txt · Dernière modification: 2011/02/28 11:22 par buggy