La première Commitfest du cycle de la 9.4 a commencé ! https://commitfest.postgresql.org/action/commitfest_view?id=18

Les nouveautés des produits dérivés

Offres d'emplois autour de PostgreSQL en juin

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)

Correctifs appliqués

Fujii Masao a poussé :

Tatsuo Ishii a poussé :

Tom Lane a poussé :

  • Fix cache flush hazard in cache_record_field_properties(). We need to increment the refcount on the composite type's cached tuple descriptor while we do lookups of its column types. Otherwise a cache flush could occur and release the tuple descriptor before we're done with it. This fails reliably with -DCLOBBER_CACHE_ALWAYS, but the odds of a failure in a production build seem rather low (since the pfree'd descriptor typically wouldn't get scribbled on immediately). That may explain the lack of any previous reports. Buildfarm issue noted by Christian Ullrich. Back-patch to 9.1 where the bogus code was added. http://git.postgresql.org/pg/commitdiff/e262755bfc97f31442cc0def8098b1a7d2913355
  • Improve updatability checking for views and foreign tables. Extend the FDW API (which we already changed for 9.3) so that an FDW can report whether specific foreign tables are insertable/updatable/deletable. The default assumption continues to be that they're updatable if the relevant executor callback function is supplied by the FDW, but finer granularity is now possible. As a test case, add an "updatable" option to contrib/postgres_fdw. This patch also fixes the information_schema views, which previously did not think that foreign tables were ever updatable, and fixes view_is_auto_updatable() so that a view on a foreign table can be auto-updatable. initdb forced due to changes in information_schema views and the functions they rely on. This is a bit unfortunate to do post-beta1, but if we don't change this now then we'll have another API break for FDWs when we do change it. Dean Rasheed, somewhat editorialized on by Tom Lane http://git.postgresql.org/pg/commitdiff/dc3eb5638349e74a6628130a5101ce866455f4a3
  • Only install a portal's ResourceOwner if it actually has one. In most scenarios a portal without a ResourceOwner is dead and not subject to any further execution, but a portal for a cursor WITH HOLD remains in existence with no ResourceOwner after the creating transaction is over. In this situation, if we attempt to "execute" the portal directly to fetch data from it, we were setting CurrentResourceOwner to NULL, leading to a segfault if the datatype output code did anything that required a resource owner (such as trying to fetch system catalog entries that weren't already cached). The case appears to be impossible to provoke with stock libpq, but psqlODBC at least is able to cause it when working with held cursors. Simplest fix is to just skip the assignment to CurrentResourceOwner, so that any resources used by the data output operations will be managed by the transaction-level resource owner instead. For consistency I changed all the places that install a portal's resowner as current, even though some of them are probably not reachable with a held cursor's portal. Per report from Joshua Berry (with thanks to Hiroshi Inoue for developing a self-contained test case). Back-patch to all supported versions. http://git.postgresql.org/pg/commitdiff/629b3e96dd64fa081d8b4610c5a723ef68af09d7
  • Refactor checksumming code to make it easier to use externally. pg_filedump and other external utility programs are likely to want to be able to check Postgres page checksums. To avoid messy duplication of code, move the checksumming functionality into an exported header file, much as we did awhile back for the CRC code. In passing, get rid of an unportable assumption that a static char[] array will be word-aligned, and do some other minor code beautification. http://git.postgresql.org/pg/commitdiff/f04216341dd1cc235e975f93ac806d9d3729a344
  • Remove special-case treatment of LOG severity level in standalone mode. elog.c has historically treated LOG messages as low-priority during bootstrap and standalone operation. This has led to confusion and even masked a bug, because the normal expectation of code authors is that elog(LOG) will put something into the postmaster log, and that wasn't happening during initdb. So get rid of the special-case rule and make the priority order the same as it is in normal operation. To keep from cluttering initdb's output and the behavior of a standalone backend, tweak the severity level of three messages routinely issued by xlog.c during startup and shutdown so that they won't appear in these cases. Per my proposal back in December. http://git.postgresql.org/pg/commitdiff/c62866eeafd52822ec61a0d2db9428c05e97d3cc
  • Avoid deadlocks during insertion into SP-GiST indexes. SP-GiST's original scheme for avoiding deadlocks during concurrent index insertions doesn't work, as per report from Hailong Li, and there isn't any evident way to make it work completely. We could possibly lock individual inner tuples instead of their whole pages, but preliminary experimentation suggests that the performance penalty would be huge. Instead, if we fail to get a buffer lock while descending the tree, just restart the tree descent altogether. We keep the old tuple positioning rules, though, in hopes of reducing the number of cases where this can happen. Teodor Sigaev, somewhat edited by Tom Lane http://git.postgresql.org/pg/commitdiff/e472b921406407794bab911c64655b8b82375196
  • Stamp HEAD as 9.4devel. Let the hacking begin ... http://git.postgresql.org/pg/commitdiff/58ae1f457708205e3ea29eb99bde65402a0fcfa7
  • Stamp shared-library minor version numbers for 9.4. http://git.postgresql.org/pg/commitdiff/8a3f0894a477c09c626abed273be80afdc6b13ac
  • Update RELEASE_CHANGES to describe library version bumping more fully. http://git.postgresql.org/pg/commitdiff/46e1434f3db21cdc05dea42b4e060d2078ff5b87
  • Be consistent about #define'ing configure symbols as "1" not empty. This is just neatnik-ism, since all the tests in the code are #ifdefs, but we shouldn't specify symbols as "Define to 1 ..." and then not actually define them that way. http://git.postgresql.org/pg/commitdiff/5242fefb471d1fb2d0f35a33bde3570e19acd4b1
  • Use SA_RESTART for all signals, including SIGALRM. The exclusion of SIGALRM dates back to Berkeley days, when Postgres used SIGALRM in only one very short stretch of code. Nowadays, allowing it to interrupt kernel calls doesn't seem like a very good idea, since its use for statement_timeout means SIGALRM could occur anyplace in the code, and there are far too many call sites where we aren't prepared to deal with EINTR failures. When third-party code is taken into consideration, it seems impossible that we ever could be fully EINTR-proof, so better to use SA_RESTART always and deal with the implications of that. One such implication is that we should not assume pg_usleep() will be terminated early by a signal. Therefore, long sleeps should probably be replaced by WaitLatch operations where practical. Back-patch to 9.3 so we can get some beta testing on this change. http://git.postgresql.org/pg/commitdiff/873ab97219caabeb2f7b390268a4fe01e2b7518c
  • Use WaitLatch, not pg_usleep, for delaying in pg_sleep(). This avoids platform-dependent behavior wherein pg_sleep() might fail to be interrupted by statement timeout, query cancel, SIGTERM, etc. Also, since there's no reason to wake up once a second any more, we can reduce the power consumption of a sleeping backend a tad. Back-patch to 9.3, since use of SA_RESTART for SIGALRM makes this a bigger issue than it used to be. http://git.postgresql.org/pg/commitdiff/a64ca63e59c11d8fe6db24eee3d82b61db7c2c83

Robert Haas a poussé :

Andrew Dunstan a poussé :

  • Fix unescaping of JSON Unicode escapes, especially for non-UTF8. Per discussion on -hackers. We treat Unicode escapes when unescaping them similarly to the way we treat them in PostgreSQL string literals. Escapes in the ASCII range are always accepted, no matter what the database encoding. Escapes for higher code points are only processed in UTF8 databases, and attempts to process them in other databases will result in an error. \u0000 is never unescaped, since it would result in an impermissible null byte. http://git.postgresql.org/pg/commitdiff/78ed8e03c67d7333708f5c1873ec1d239ae2d7e0

Noah Misch a poussé :

Peter Eisentraut a poussé :

Heikki Linnakangas a poussé :

Correctifs rejetés (à ce jour)

  • No one was disappointed this week

Correctifs en attente

  • Marco Atzeri sent in another revision of a patch to make compiling on Cygwin work again.
  • Heikki Linnakangas sent in a WIP patch to allow for freezing without write I/O.
  • Fabien COELHO sent in four more revisions of a patch to add a --throttle option to pgbench.
  • KONDO Mitsumasa sent in two revisions of a patch to improve the checkpoint IO scheduler to make transaction response times more stable.
  • Fujii Masao sent in two revisions of a patch to make it easier and surer to do a clean switchover in replication.
  • Peter Eisentraut sent in a patch to add a session_preload_libraries configuration parameter.
  • Peter Eisentraut sent in a patch to remove USE_PGXS support in contrib.
  • Fabrízio de Royes Mello sent in a patch to add support of "IF NOT EXISTS" to other "CREATE" statements.
  • Dean Rasheed sent in another revision of a patch to add WITH CHECK OPTION to VIEWs.
  • KaiGai Kohei sent in another revision of a patch to add row-level access controls.
  • Alexander Korotkov sent in another revision of a patch to add information for storing GIN indexes.
  • Alexander Korotkov sent in a patch to allow GIN indexing to help searches on DFA regexes execute much faster.
  • Amit Kapila sent in another revision of a patch to create ALTER SYSTEM, which persists changes to configuration parameters across restarts of the server by saving those configuration changes to files read on (re)start.
  • Peter Eisentraut sent in a patch to update the recommended .emacs file with support for the aforementioned changes.
  • Peter Eisentraut sent in another revision of a patch to add TRANSFORMS.
  • Dean Rasheed sent in a patch to add an md5 aggregate called md5_agg().
  • Kyotaro HORIGUCHI sent in a patch to reduce the maximum error in tuples estimation after vacuum.
  • Andres Freund sent in another revision of a patch to implement logical changeset generation.
  • Alexander Korotkov sent in a patch to add a "fast scan" technique for GIN indexes.
  • Andres Freund sent in another revision of a patch to add support for extensible external toast tuples.
  • Fujii Masao sent in a patch to fix an issue where pg_dump output in directory archive form was falsely being reported as unknown in pg_restore -l.
  • Kyotaro HORIGUCHI sent in a patch to add visibility map information to the pg_freespace system view.
  • Andres Freund sent in a patch to add pluggable compression support along with one implementing same using the snappy algorithm.
  • Robert Haas sent in a patch to implement dynamic background workers. This is intended to be infrastructure for parallelizing operations.
  • Samrat Revagade and Jeff Davis traded patches to enable fail-back without fresh backup.
  • Kevin Grittner sent in a patch to implement REFRESH MATERIALIZED VIEW CONCURRENTLY.
  • Fabien COELHO sent in another revision of a patch to add CREATE CAST ... AS EXPLICIT.
  • Jon Nelson sent in another revision of a patch to use fallocate / posix_fallocate for new WAL file creation, etc., when the aforementioned facilities are available.