La deuxième semaine parmi les quatre de la CommitFest actuelle est maintenant terminée. Six patchs sont encore délaissés. Contactez les RRReviewers si vous souhaitez aider.

Offres d'emplois autour de PostgreSQL en septembre

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

Heikki Linnakangas a poussé :

  • Fix two timeline handling bugs in pg_receivexlog. When a timeline history file is fetched from server, it is initially created with a temporary file name, and renamed to place. However, the temporary file name was constructed using an uninitialized buffer. Usually that meant that the file was created in current directory instead of the target, which usually goes unnoticed, but if the target is on a different filesystem than the current dir, the rename() would fail. Fix that. The second issue is that pg_receivexlog would not take .partial files into account when determining when scanning the target directory for existing WAL files. If the timeline has switched in the server several times in the last WAL segment, and pg_receivexlog is restarted, it would choose a too old starting point. That's not a problem as long as the old WAL segment exists in the server and can be streamed over, but will cause a failure if it's not. Backpatch to 9.3, where this timeline handling code was written. Analysed by Andrew Gierth, bug #8453, based on a bug report on IRC. http://git.postgresql.org/pg/commitdiff/b882246e3ab4382b3c9f58e5f85dd8c9e3eb594f
  • Plug memory leak in range_cmp function. B-tree operators are not allowed to leak memory into the current memory context. Range_cmp leaked detoasted copies of the arguments. That caused a quick out-of-memory error when creating an index on a range column. Reported by Marian Krucina, bug #8468. http://git.postgresql.org/pg/commitdiff/77ae7f7c356064f5355e004b95f485358dfc1360
  • Fix spurious warning after vacuuming a page on a table with no indexes. There is a rare race condition, when a transaction that inserted a tuple aborts while vacuum is processing the page containing the inserted tuple. Vacuum prunes the page first, which normally removes any dead tuples, but if the inserting transaction aborts right after that, the loop after pruning will see a dead tuple and remove it instead. That's OK, but if the page is on a table with no indexes, and the page becomes completely empty after removing the dead tuple (or tuples) on it, it will be immediately marked as all-visible. That's OK, but the sanity check in vacuum would throw a warning because it thinks that the page contains dead tuples and was nevertheless marked as all-visible, even though it just vacuumed away the dead tuples and so it doesn't actually contain any. Spotted this while reading the code. It's difficult to hit the race condition otherwise, but can be done by putting a breakpoint after the heap_page_prune() call. Backpatch all the way to 8.4, where this code first appeared. http://git.postgresql.org/pg/commitdiff/adaba2751f617c0045f72d2ac2d5402cc184fb29

Stephen Frost a poussé :

  • Fix SSL deadlock risk in libpq. In libpq, we set up and pass to OpenSSL callback routines to handle locking. When we run out of SSL connections, we try to clean things up by de-registering the hooks. Unfortunately, we had a few calls into the OpenSSL library after these hooks were de-registered during SSL cleanup which lead to deadlocking. This moves the thread callback cleanup to be after all SSL-cleanup related OpenSSL library calls. I've been unable to reproduce the deadlock with this fix. In passing, also move the close_SSL call to be after unlocking our ssl_config mutex when in a failure state. While it looks pretty unlikely to be an issue, it could have resulted in deadlocks if we ended up in this code path due to something other than SSL_new failing. Thanks to Heikki for pointing this out. Back-patch to all supported versions; note that the close_SSL issue only goes back to 9.0, so that hunk isn't included in the 8.4 patch. Initially found and reported by Vesa-Matti J Kari; many thanks to both Heikki and Andres for their help running down the specific issue and reviewing the patch. http://git.postgresql.org/pg/commitdiff/b37c90f11e3c239b999f98ffd3bbea6b8253fffa

Bruce Momjian a poussé :

Robert Haas a poussé :

  • Don't allow system columns in CHECK constraints, except tableoid. Previously, arbitray system columns could be mentioned in table constraints, but they were not correctly checked at runtime, because the values weren't actually set correctly in the tuple. Since it seems easy enough to initialize the table OID properly, do that, and continue allowing that column, but disallow the rest unless and until someone figures out a way to make them work properly. No back-patch, because this doesn't seem important enough to take the risk of destabilizing the back branches. In fact, this will pose a dump-and-reload hazard for those upgrading from previous versions: constraints that were accepted before but were not correctly enforced will now either be enforced correctly or not accepted at all. Either could result in restore failures, but in practice I think very few users will notice the difference, since the use case is pretty marginal anyway and few users will be relying on features that have not historically worked. Amit Kapila, reviewed by Rushabh Lathia, with doc changes by me. http://git.postgresql.org/pg/commitdiff/ba3d39c96921c96de114f6c22a9572bff24708b5
  • doc: Clarify that file_fdw options require values. Mike Blackwell and Robert Haas http://git.postgresql.org/pg/commitdiff/54990af616ebb31fb1ae04e8aaf332d483a9e3a5
  • Allow printf-style padding specifications in log_line_prefix. David Rowley, after a suggestion from Heikki Linnakangas. Reviewed by Albe Laurenz, and further edited by me. http://git.postgresql.org/pg/commitdiff/4334639f4bb9fb88c13b8dd5faca22b207248504

Noah Misch a poussé :

Alvaro Herrera a poussé :

Andrew Dunstan a poussé :

Fujii Masao a poussé :

Correctifs rejetés (à ce jour)

  • No one was disappointed this week

Correctifs en attente

  • Pavel Stehule sent in two more revisions of a patch to improve the performance of AVG on NUMERICs.
  • Alexander Korotkov sent in two more revisions of a patch to improve GIN performance by adding information to what's stored.
  • Fabien COELHO sent in three more patches intended to improve pgbench.
  • Andres Freund sent in a patch to use critical section when ensuring empty pages are initialized during vacuum.
  • Stas Kelvich sent in another revision of a patch to add point support to the cube extension.
  • Laurenz Albe sent in another revision of a patch to fix the use of a deprecated OpenLDAP API.
  • Stas Kelvich sent in a patch to implement support for different storage types for cubes.
  • Stas Kelvich sent in a patch to fix the split algorithm implemented in cube extension.
  • Alvaro Herrera sent in four more revisions of a patch to implement minmax indexing.
  • Bruce Momjian sent in another revision of a patch to issue a warning when calling SET TRANSACTION outside transaction block.
  • Kevin Grittner sent in three more revisions of a patch to implement a record_identical operator.
  • Heikki Linnakangas sent in two more revisions of a patch to implement freezing without write I/O.
  • Michael Paquier sent in another revision of a patch to implement REINDEX CONCURRENTLY.
  • Heikki Linnakangas sent in another revision of a patch to fix two bugs exposed in the attempt to fix the SSI freezing bug. The first is in heap_hot_search_buffer(), where the PredicateLockTuple() call is passed wrong offset number. heapTuple->t_self is set to the tid of the first tuple in the chain that's visited, not the one actually being read. The second is that CheckForSerializableConflictIn() uses the tuple's t_ctid field instead of t_self to check for exiting predicate locks on the tuple. If the tuple was updated, but the updater rolled back, t_ctid points to the aborted dead tuple.
  • Ivan Lezhnjov IV, Robert Haas, and Karl O. Pinc sent in patches clarifying non-superuser backups.
  • Andres Freund sent in a patch to improve performance by creating a wait free LW_SHARED acquisition method.
  • Merlin Moncure sent in a patch to fix an issue where the CPU could go to 100% and stay there that replaces the spinlock with a read barrier based on a suggestion made by Andres Freund.
  • Chris Browne sent in a patch to add a "-g / --roles" option for createuser.
  • Andres Freund sent in another flock of patches intended to be infrastructure for logical changeset replication.
  • Amit Kapila sent in another revision of a patch to allow changing system parameters via SQL persistently across restarts.
  • Ian Lawrence Barwick sent in a patch to Allow COPY in CSV mode to control whether a quoted zero-length string is treated as NULL.
  • Gilles Darold sent in another revision of a patch to make psql's pset print out the current configuration if not given an argument.
  • Nicholas White sent in a patch to use repalloc in the patch that allows LAG and LEAD functions to ignore NULLs if told to.