La quatrième et dernière commitfest de la version 9.4 de PostgreSQL a commencé. Lancez-vous : relisez et révisez ces patchs ! https://commitfest.postgresql.org/action/commitfest_view?id=21

Les nouveautés des produits dérivés

Offres d'emplois autour de PostgreSQL en janvier

PostgreSQL Local

  • FOSDEM PGDay, une conférence d'une journée, tenue avant le FOSDEM à Bruxelles, aura lieu le 31 janvier 2014. Détails : http://fosdem2014.pgconf.eu/ http://fosdem2014.pgconf.eu/registration/
  • La 7ème conférence annuelle "Prague PostgreSQL Developers Day" (P2D2), organisée par le CSPUG (PUG tchèque et slovaque), aura lieu le 6 février 2014 à la Faculté des Sciences Mathématiques & Physiques de l'Université Charles (Malostranske namesti 25, Prague). Infos en langue tchèque ci-après : http://www.p2d2.cz/
  • Le PGDay Nordique 2014 aura lieu à Stockholm (Suède) à l'hôtel Hilton le 20 mars 2014. L'appel à conférenciers est ouvert jusqu'au 2 février 2014 : http://2014.nordicpgday.org/
  • La PGConf NYC 2014 aura lieu les 3 & 4 avril 2014 à New-York (New-York, USA) : http://nyc.pgconf.us/2014/
  • Le sommet Open Data aura lieu le 11 avril 2014 à Denver (Colorado, États-Unis) : http://www.opendatasummit.com
  • La PGCon 2014, la conférence mondiale des développeurs PostgreSQL, se tiendra à Ottawa (Ontario, Canada) du 20 au 24 mai 2014 : http://www.pgcon.org/2014/

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

Michael Meskes a poussé :

Heikki Linnakangas a poussé :

Tom Lane a poussé :

  • Fix possible buffer overrun in contrib/pg_trgm. Allow for the possibility that folding a string to lower case makes it longer (due to replacing a character with a longer multibyte character). This doesn't change the number of trigrams that will be extracted, but it does affect the required size of an intermediate buffer in generate_trgm(). Per bug #8821 from Ufuk Kayserilioglu. Also install some checks that the input string length is not so large as to cause overflow in the calculations of palloc request sizes. Back-patch to all supported versions. http://git.postgresql.org/pg/commitdiff/c3ccc9ee584b9b015dd9c1931e261e21f3961e5f
  • Fix multiple bugs in index page locking during hot-standby WAL replay. In ordinary operation, VACUUM must be careful to take a cleanup lock on each leaf page of a btree index; this ensures that no indexscans could still be "in flight" to heap tuples due to be deleted. (Because of possible index-tuple motion due to concurrent page splits, it's not enough to lock only the pages we're deleting index tuples from.) In Hot Standby, the WAL replay process must likewise lock every leaf page. There were several bugs in the code for that: * The replay scan might come across unused, all-zero pages in the * index. While btree_xlog_vacuum itself did the right thing (ie, nothing) with such pages, xlogutils.c supposed that such pages must be corrupt and would throw an error. This accounts for various reports of replication failures with "PANIC: WAL contains references to invalid pages". To fix, add a ReadBufferMode value that instructs XLogReadBufferExtended not to complain when we're doing this. * btree_xlog_vacuum performed the extra locking if standbyState == STANDBY_SNAPSHOT_READY, but that's not the correct test: we won't open up for hot standby queries until the database has reached consistency, and we don't want to do the extra locking till then either, for fear of reading corrupted pages (which bufmgr.c would complain about). Fix by exporting a new function from xlog.c that will report whether we're actually in hot standby replay mode. * To ensure full coverage of the index in the replay scan, * btvacuumscan would emit a dummy WAL record for the last page of the index, if no vacuuming work had been done on that page. However, if the last page of the index is all-zero, that would result in corruption of said page, since the functions called on it weren't prepared to handle that case. There's no need to lock any such pages, so change the logic to target the last normal leaf page instead. The first two of these bugs were diagnosed by Andres Freund, the other one by me. Fixes based on ideas from Heikki Linnakangas and myself. This has been wrong since Hot Standby was introduced, so back-patch to 9.0. http://git.postgresql.org/pg/commitdiff/061b079f89800929a863a692b952207cadf15886
  • Improve FILES section of psql reference page. Primarily, explain where to find the system-wide psqlrc file, per recent gripe from John Sutton. Do some general wordsmithing and improve the markup, too. Also adjust psqlrc.sample so its comments about file location are somewhat trustworthy. (Not sure why we bother with this file when it's empty, but whatever.) Back-patch to 9.2 where the startup file naming scheme was last changed. http://git.postgresql.org/pg/commitdiff/5df99f6481b1eadbcbc8547d2e387f4dcf192c6f
  • Add display of oprcode (the underlying function's name) to psql's \do+. The + modifier of \do didn't use to do anything, but now it adds an oprcode column. This is useful both as an additional form of documentation of what the operator does, and to save a step when finding out properties of the underlying function. Marko Tiikkaja, reviewed by Rushabh Lathia, adjusted a bit by me http://git.postgresql.org/pg/commitdiff/515d2c596c1b6b95d020d14edaab0d233d5d9ea9
  • Add gen_random_uuid() to contrib/pgcrypto. This function provides a way of generating version 4 (pseudorandom) UUIDs based on pgcrypto's PRNG. The main reason for doing this is that the OSSP UUID library depended on by contrib/uuid-ossp is becoming more and more of a porting headache, so we need an alternative for people who can't install that. A nice side benefit though is that this implementation is noticeably faster than uuid-ossp's uuid_generate_v4() function. Oskari Saarenmaa, reviewed by Emre Hasegeli http://git.postgresql.org/pg/commitdiff/e6170126fc201052b0ec5fc92177eb181d602d26
  • Minor code beautification in contrib/sslinfo. Static-ify some functions that didn't need to be exported, and improve a couple of comments. Gurjeet Singh http://git.postgresql.org/pg/commitdiff/af9e3d652358664f2e749be2398428732121e317
  • Make various variables const (read-only). These changes should generally improve correctness/maintainability. A nice side benefit is that several kilobytes move from initialized data to text segment, allowing them to be shared across processes and probably reducing copy-on-write overhead while forking a new backend. Unfortunately this doesn't seem to help libpq in the same way (at least not when it's compiled with -fpic on x86_64), but we can hope the linker at least collects all nominally-const data together even if it's not actually part of the text segment. Also, make pg_encname_tbl[] static in encnames.c, since there seems no very good reason for any other code to use it; per a suggestion from Wim Lewis, who independently submitted a patch that was mostly a subset of this one. Oskari Saarenmaa, with some editorialization by me http://git.postgresql.org/pg/commitdiff/0d79c0a8cc20dbaa39112d78a9abb821c4ca3554
  • Fix VACUUM's reporting of dead-tuple counts to the stats collector. Historically, VACUUM has just reported its new_rel_tuples estimate (the same thing it puts into pg_class.reltuples) to the stats collector. That number counts both live and dead-but-not-yet-reclaimable tuples. This behavior may once have been right, but modern versions of the pgstats code track live and dead tuple counts separately, so putting the total into n_live_tuples and zero into n_dead_tuples is surely pretty bogus. Fix it to report live and dead tuple counts separately. This doesn't really do much for situations where updating transactions commit concurrently with a VACUUM scan (possibly causing double-counting or omission of the tuples they add or delete); but it's clearly an improvement over what we were doing before. Hari Babu, reviewed by Amit Kapila http://git.postgresql.org/pg/commitdiff/115f414124e71749d2d8f512e469ca63bc2166e5

Robert Haas a poussé :

Peter Eisentraut a poussé :

Alvaro Herrera a poussé :

  • Split ECPGdo() in constituent parts. This splits ECPGdo() into ecpg_prologue(), ecpg_do() and ecpg_epilogue(), and renames free_params() into ecpg_free_params() and exports it. This makes it possible for future code to use these routines for their own purposes. There is no user-visible functionality change here, only code reorganization. Zoltán Böszörményi Reviewed by Antonin Houska. Larger, older versions of this patch were reviewed by Noah Misch and Michael Meskes. http://git.postgresql.org/pg/commitdiff/3291301385ee5e9ca38d70a68b93ce31cc2674ac
  • Split ecpg_execute() in constituent parts. Split the rather long ecpg_execute() function into ecpg_build_params(), ecpg_autostart_transaction(), a smaller ecpg_execute() and ecpg_process_output(). There is no user-visible change here, only code reorganization to support future patches. Author: Zoltán Böszörményi Reviewed by Antonin Houska. Larger, older versions of this patch were reviewed by Noah Misch and Michael Meskes. http://git.postgresql.org/pg/commitdiff/61bee9f756ce875f3b678099a6bb9654bd2fa21a

Bruce Momjian a poussé :

Magnus Hagander a poussé :

Andrew Dunstan a poussé :

Stephen Frost a poussé :

  • Allow SET TABLESPACE to database default. We've always allowed CREATE TABLE to create tables in the database's default tablespace without checking for CREATE permissions on that tablespace. Unfortunately, the original implementation of ALTER TABLE ... SET TABLESPACE didn't pick up on that exception. This changes ALTER TABLE ... SET TABLESPACE to allow the database's default tablespace without checking for CREATE rights on that tablespace, just as CREATE TABLE works today. Users could always do this through a series of commands (CREATE TABLE ... Alexander Shulgin SELECT * FROM ...; DROP TABLE ...; etc), so let's fix the oversight in SET TABLESPACE's original implementation. http://git.postgresql.org/pg/commitdiff/6f25c62d788ea6312fe718ed57a3d169d8efc066
  • Add ALTER TABLESPACE ... MOVE command. This adds a 'MOVE' sub-command to ALTER TABLESPACE which allows moving sets of objects from one tablespace to another. This can be extremely handy and avoids a lot of error-prone scripting. ALTER TABLESPACE ... MOVE will only move objects the user owns, will notify the user if no objects were found, and can be used to move ALL objects or specific types of objects (TABLES, INDEXES, or MATERIALIZED VIEWS). http://git.postgresql.org/pg/commitdiff/76e91b38ba64e1da70ea21744b342cb105ea3400
  • Add CREATE TABLESPACE ... WITH ... Options. Tablespaces have a few options which can be set on them to give PG hints as to how the tablespace behaves (perhaps it's faster for sequential scans, or better able to handle random access, etc). These options were only available through the ALTER TABLESPACE command. This adds the ability to set these options at CREATE TABLESPACE time, removing the need to do both a CREATE TABLESPACE and ALTER TABLESPACE to get the correct options set on the tablespace. Vik Fearing, reviewed by Michael Paquier. http://git.postgresql.org/pg/commitdiff/5254958e924cd54f33d37026d85483fef986060d

Correctifs rejetés (à ce jour)

  • No one was disappointed this week

Correctifs en attente

  • Amit Kapila sent in another revision of a patch to create a contrib module to demonstrate dynamic shared memory.
  • Steeve Lennmark sent in three more revisions of a patch to enable pg_basebackup to relocate tablespaces.
  • Alexander Korotkov sent in another revision of a patch to use partial sorting in KNN-GiST to speed up queries.
  • Mitsumasa KONDO sent in another revision of a patch to allow setting a Gaussian distribution in pgbench.
  • Yugo Nagata sent in a patch to implement to_regclass, to_regproc, to_regoper, and to_regtype for the new regclass type.
  • Dilip Kumar sent in a patch to create a case-sensitive mode in the Windows build.
  • Erik Rijkers and Andrew Dunstan traded patches to implement and document nested hstore/jsonb.
  • Alexander Korotkov sent in two more revisions of a patch to improve GIN indexing by storing additional information.
  • Alexander Korotkov and Marti Raudsepp traded patches around partial sorting.
  • Christian Kruse sent in another revision of a patch to show xid and xmin in pg_stat_activity and pg_stat_replication.
  • Kyotaro HORIGUCHI sent in another revision of a patch to ensure that UNION ALL on partitioned tables will use indexes appropriately.
  • Kyotaro HORIGUCHI sent in another revision of a patch to get more from indexes.
  • Kyotaro HORIGUCHI sent in another revision of a patch to ensure that UNION on partitioned tables can take advantage of appropriate indexes.
  • Kyotaro HORIGUCHI sent in another revision of a patch to make it possible for auto_explain to show trigger statistics.
  • Rajeev Rastogi sent in another revision of a patch to fix an issue where the PostgreSQL service on Windows does not start if the data directory given is relative path.
  • KaiGai Kohei sent in another flock of patches implementing and demonstrating the custom scan API.
  • Mitsumasa KONDO sent in another revision of a patch to optimize kernel readahead using buffer access strategy.
  • KaiGai Kohei sent in a patch to implement an alternative way to scan a table using in-memory cache instead of the usual heap access method.
  • Simon Riggs sent in a patch to patch to expose a function GetCurrentTransactionWALVolume() that gives the total number of bytes written to WAL by current transaction.
  • Shigeru HANADA sent in another revision of a patch to allow foreign tables to be children of tables in the sense of table inheritance.
  • Dimitri Fontaine sent in a patch to implement a new GUC that allows users to set up a list of path where PostgreSQL will search for the extension control files at CREATE EXTENSION time.
  • Peter Eisentraut sent in a patch to integrate pg_upgrade's analyze_new_cluster.sh into vacuumdb.
  • Alvaro Herrera sent in another revision of a patch to enable CREATE support for event triggers.
  • Peter Eisentraut sent in a patch to create a function prototype as part of PG_FUNCTION_INFO_V1.
  • Alexander Korotkov sent in another revision of a patch to improve GIN by creating a fast scan option.
  • Simon Riggs sent in two more revisions of a patch to fix an issue where the reduction in lock strength for ALTER TABLE was unsafe.
  • Jaime Casanova sent in another revision of a patch to turn recovery.conf into GUCs.
  • Peter Eisentraut sent in a patch to add tests for client programs (psql, etc.).
  • Mitsumasa KONDO sent in a patch to drop duplicate buffers in OS using a usage_count algorithm.
  • Simon Riggs sent in two more revisions of a patch to allow rate-limiting on WAL.
  • Oskari Saarenmaa sent in another revision of a patch to allow filtering error log statements by SQLSTATE.
  • Simon Riggs sent in a patch to control how aggressively HOT/Cleanup operates for SELECT statements.
  • Heikki Linnakangas and Peter Geoghegan traded patches for INSERT...ON DUPLICATE KEY LOCK FOR UPDATE.
  • Andres Freund sent in another revision of a patch to implement changeset extraction.
  • Marko (johto) Tiikkaja sent in a patch to implement plpgsql.warn_shadow, which allows people to get warnings when a variable shadows a previously defined variable.
  • David Rowley and Florian Pflug traded patches implementing inverse transition functions for aggregates.
  • Simon Riggs sent in another revision of a patch to tune COPY vs. volatile default expressions including nextval(), which is used for surrogate keys.
  • Alexander Korotkov sent in a patch to fix a trigram regex index peculiarity.
  • Peter Eisentraut sent in another revision of a patch to implement TRANSFORMS.
  • Amit Kapila sent in another revision of a patch to improve performance by reducing the volume of WAL during update operations.
  • Alvaro Herrera sent in another revision of a patch to allow throttling of backups.
  • Salah Jubeh sent in another revision of a patch to add a 'force' option to dropdb.
  • Amit Kapila sent in a patch to fix a memory leak in parse_config.
  • Pavel Stehule sent in another revision of a patch to add --if-exists, which inserts IF EXISTS in appropriate spots in pg_dump's output.
  • Andrew Dunstan sent in two more revisions of a patch to implement a flock of new JSON functions.
  • Marko (johto) Tiikkaja sent in three revisions of a patch to implement CARDINALITY for arrays.
  • Jov sent a patch to clarify psql's -F command line option.
  • Kyotaro HORIGUCHI sent in a patch to fix some odd ways a query can be stored in pg_stat_statements.
  • Marti Raudsepp sent in a patch to fix a potential relcache leak in get_object_address_attribute.
  • Michael Paquier sent in a patch to fix some ALTER SYSTEM SET typos and add a fix for temporary file name management.
  • Maor Lipchuk and Tom Lane traded patches to add the value to the error message when a column's data is too large for the size of the column.
  • Craig Ringer sent in another revision of a patch to implement row-level access control.
  • Jeevan Chalke sent in a patch to fix some surprising to_timestamp behavior.