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. La version originale se trouve à l'adresse suivante : http://www.postgresql.org/message-id/20180204215424.GA4423@fetter.org

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.

Correctifs appliqués

Tom Lane pushed:

  • Avoid misleading psql password prompt when username is multiply specified. When a password is needed, cases such as psql -d "postgresql://alice@localhost/testdb" -U bob would incorrectly prompt for "Password for user bob: ", when actually the connection will be attempted with username alice. The priority order of which name to use isn't that important here, but the misleading prompt is. When we are prompting for a password after initial connection failure, we can fix this reliably by looking at PQuser(conn) to see how libpq interpreted the connection arguments. But when we're doing a forced password prompt because of a -W switch, we can't use that solution. Fortunately, because the main use of -W is for noninteractive situations, it's less critical to produce a helpful prompt in such cases. I made the startup prompt for -W just say "Password: " all the time, rather than expending extra code on trying to identify which username to use. In the case of a \c command (after -W has been given), there's already logic in do_connect that determines whether the "dbname" is a connstring or URI, so we can avoid lobotomizing the prompt except in cases that are actually dubious. (We could do similarly in startup.c if anyone complains, but for now it seems not worthwhile, especially since that would still be only a partial solution.) Per bug #15025 from Akos Vandra. Although this is arguably a bug fix, it doesn't seem worth back-patching. The case where it matters seems like a very corner-case usage, and someone might complain that we'd changed the behavior of -W in a minor release. Discussion: https://postgr.es/m/20180123130013.7407.24749@wrigleys.postgresql.org https://git.postgresql.org/pg/commitdiff/15be27460191a9ffb149cc98f6fbf97c369a6b1e
  • Save a few bytes by removing useless last argument to SearchCatCacheList. There's never any value in giving a fully specified cache key to SearchCatCacheList: you might as well call SearchCatCache instead, since there could be only one match. So the maximum useful number of key arguments is one less than the supported number of key columns. We might as well remove the useless extra argument and save some few bytes per call site, as well as a cycle or so per call. I believe the reason it was coded like this is that originally, callers had to write out all the dummy arguments in each call, and so it seemed less confusing if SearchCatCache and SearchCatCacheList took the same number of key arguments. But since commit e26c539e9, callers only write their live arguments explicitly, making that a non-factor; and there's surely been enough time for third-party modules to adapt to that coding style. So this is only an ABI break not an API break for callers. Per discussion with Oliver Ford, this might also make it less confusing how to use SearchCatCacheList correctly. Discussion: https://postgr.es/m/27788.1517069693@sss.pgh.pa.us https://git.postgresql.org/pg/commitdiff/97d4445a033f1cc02784d42561b52b3441c8eddd
  • First-draft release notes for 10.2. As usual, the release notes for other branches will be made by cutting these down, but put them up for community review first. https://git.postgresql.org/pg/commitdiff/bf641d3376018c40860f26167a60febff5bc1f51
  • Be more wary about shm_toc_lookup failure. Commit 445dbd82a basically missed the point of commit d46633506, which was that we shouldn't allow shm_toc_lookup() failure to lead to a core dump or assertion crash, because the odds of such a failure should never be considered negligible. It's correct that we can't expect the PARALLEL_KEY_ERROR_QUEUE TOC entry to be there if we have no workers. But if we have no workers, we're not going to do anything in this function with the lookup result anyway, so let's just skip it. That lets the code use the easy-to-prove-safe noError=false case, rather than anything requiring effort to review. Back-patch to v10, like the previous commit. Discussion: https://postgr.es/m/3647.1517601675@sss.pgh.pa.us https://git.postgresql.org/pg/commitdiff/957ff087c822c95f63df956e1a91c15614ecb2b4
  • Fix another instance of unsafe coding for shm_toc_lookup failure. One or another author of commit 5bcf389ec seems to have thought that computing an offset from a NULL pointer would yield another NULL pointer. There may possibly be architectures where that works, but common machines don't work like that. Per a quick code review of places calling shm_toc_lookup and not using noError = false. https://git.postgresql.org/pg/commitdiff/d59ff4ab3111f20054425d82dab1393101dcfe8e
  • Minor copy-editing for 10.2 release notes. Second pass after taking a break ... https://git.postgresql.org/pg/commitdiff/794eb3a8f00519fac561831dee35f4ee557bd08b
  • Doc: minor clarifications in xindex.sgml. I noticed some slightly confusing or out-of-date verbiage here while working on the window RANGE patch. Seems worth committing separately. https://git.postgresql.org/pg/commitdiff/64fb645914741ffc3aee646308416c209c6ff06b
  • Release notes for 10.2, 9.6.7, 9.5.11, 9.4.16, 9.3.21. https://git.postgresql.org/pg/commitdiff/cf1cba3110f339eddecd66cdf7d8f9b4370f34c2

Andres Freund pushed:

  • Improve bit perturbation in TupleHashTableHash. The changes in b81b5a96f424531b97cdd1dba97d9d1b9c9d372e did not fully address the issue, because the bit-mixing of the IV into the final hash-key didn't prevent clustering in the input-data survive in the output data. This didn't cause a lot of problems because of the additional growth conditions added d4c62a6b623d6eef88218158e9fa3cf974c6c7e5. But as we want to rein those in due to explosive growth in some edges, this needs to be fixed. Author: Andres Freund Discussion: https://postgr.es/m/20171127185700.1470.20362@wrigleys.postgresql.org Backpatch: 10, where simplehash was introduced https://git.postgresql.org/pg/commitdiff/c068f87723ca9cded1f2aceb956ede49de651690
  • Prevent growth of simplehash tables when they're "too empty". In cases where simplehash tables where filled with either a lot of conflicting hash-values, or values that hash to consecutive values (i.e. build "chains") the growth heuristics in d4c62a6b623d6eef88218158e9fa3cf974c6c7e5 could trigger rather explosively. To fix that, address some of the reasons (see previous commit) of why the growth heuristics where needed, and only allow growth when the table isn't too empty. While that means there's a few cases of bad input that can be slower, that seems a lot better than running very quickly out of memory. Author: Tomas Vondra and Andres Freund, with additional input by Thomas Munro, Tom Lane Todd A. Cook Reported-By: Todd A. Cook, Tomas Vondra, Thomas Munro Discussion: https://postgr.es/m/20171127185700.1470.20362@wrigleys.postgresql.org Backpatch: 10, where simplehash was introduced https://git.postgresql.org/pg/commitdiff/ab9f2c429d8fbd3580cd2ae5f2054ba6956b1f60
  • Introduce ExecQualAndReset() helper. It's a common task to evaluate a qual and reset the corresponding expression context. Currently that requires storing the result of the qual eval, resetting the context, and then reacting on the result. As that's awkward several places only reset the context next time through a node. That's not great, so introduce a helper that evaluates and resets. It's a bit ugly that it currently uses MemoryContextReset() instead of ResetExprContext(), but that seems easier than reordering all of executor.h. Author: Andres Freund Discussion: https://postgr.es/m/20180109222544.f7loxrunqh3xjl5f@alap3.anarazel.de https://git.postgresql.org/pg/commitdiff/c12693d8f3bbbffcb79f6af476cc647402e1145e
  • Initialize unused ExprEvalStep fields. ExecPushExprSlots didn't initialize ExprEvalStep's resvalue/resnull steps as it didn't use them. That caused wrong valgrind warnings for an upcoming patch, so zero-intialize. Also zero-initialize all scratch ExprEvalStep's allocated on the stack, to avoid issues with similar future omissions of non-critial data. https://git.postgresql.org/pg/commitdiff/fc96c6942551dafa6cb2a6000cbc9b20643e5db3

Peter Eisentraut pushed:

Robert Haas pushed:

Bruce Momjian pushed:

Stephen Frost pushed:

Correctifs en attente

Yuto Hayamizu sent in another revision of a patch to fix overestimated filter cost.

Amit Langote sent in two revisions of a patch to include the new local partitioned indexes in the CREATE INDEX documentation.

Kyotaro HORIGUCHI sent in two more revisions of a patch to add a WAL relief valve for replication slots, add monitoring for replication slots, add a TAP test for the slot limit feature, and document same.

Ildar Musin sent in another revision of a patch to add general purpose hashing functions to pgbench.

Ildus Kurbangaliev sent in another revision of a patch to add custom compression methods.

Konstantin Knizhnik sent in two more revisions of a patch to optimize secondary index access.

Nikhil Sontakke sent in another revision of a patch to implement logical decoding of two-phase transactions.

David Steele sent in another revision of a patch to implement a configurable file mode mask.

Andres Freund sent in a patch to deconflict datetime.h macro names.

Etsuro Fujita sent in another revision of a patch to change how a list partition constraint is emitted.

David Rowley sent in another revision of a patch to allow deciding whether STATISTICS are included in CREATE TABLE LIKE.

Amit Langote sent in a patch to fix what had appeared to be a bug in local indexes on partitioned tables.

Robert Haas sent in two more revisions of a patch to account for parallel paths tlist cost.

Jeevan Chalke sent in two more revisions of a patch to implement partition-wise aggregation/grouping.

Yugo Nagata sent in three more revisions of a patch to implement lockable views.

Amit Langote sent in another revision of a patch to create a syntax for boolean partitions.

Simon Riggs sent in two more revisions of a patch to implement MERGE.

Oliver Ford and Tom Lane traded patches to implement RANGE with values and exclusions clauses to windowing functions.

John Naylor sent in another revision of a patch to refactor bootstrap data for sanity and legibility.

Doug Rady sent in a patch to refactor all of the connection state PQfinish() and NULL’ing into a single function, except for PQfinish() in doConnect().

Anastasia Lubennikova sent in another revision of a patch to implement covering and unique indexes.

Dmitry Dolgov sent in another revision of a patch to implement generic type subscripting and use same for arrays and JSONB.

Daniel Vérité sent in a patch to add a CSV output format to psql.

Peter Eisentraut sent in another revision of a patch to support GnuTLS.

Kyotaro HORIGUCHI, Amit Langote and David Rowley traded patches to speed up partition pruning.

Haozhou Wang sent in a patch to add missing type conversion functions for PL/Python.

Michail Nikolaev sent in a patch to optimize OFFSET with IndexScan using the visibility map.

Yugo Nagata sent in two revisions of a patch to fix an infelicity between CURRENT OF and IndexOnlyScan.

Michaël Paquier sent in another revision of a patch to refactor the syscache routines to get attribute name, extend the lookup routines for FDW and foreign server with NULL handling, refactor the routines for subscription and publication lookups, and eliminate user-visible cache lookup errors for objaddr SQL functions.

Anton Dignös sent in a patch to fix an IndexJoin memory problem using SP-GiST and boxes.

Amit Langote sent in a patch to disregard nulls in SAOP rightarg array/list during CE.

Kyotaro HORIGUCHI sent in a patch to fix line_perp() (?-|).

Amit Langote sent in another revision of a patch to teach operator_predicate_proof() to strip RelabelType.

Peter Eisentraut sent in a patch to fix a bug which caused cancelling parallel query to lead to a segfault.

Amit Kapila sent in a patch to ensure that MarkBufferDirty is called at the appropriate place in the hash index code.

Michael Banck sent in a patch to allow pg_dump to /dev/null.

Artur Zakirov sent in another revision of a patch to fix a bug in to_timestamp() where formats weren't checked correctly.

Dean Rasheed sent in a patch to improve MCV lists for highly skewed distributions.

Marina Polyakova sent in another revision of a patch to precalculate stable and immutable functions.

Takayuki Tsunakawa sent in a patch to fix a bug in ECPG where freeing memory for pgtypes would crash on Windows.

Michaël Paquier sent in another revision of a patch to create backup history files for backups taken from standbys.

Aleksandr Parfenov sent in another revision of a patch to create a more flexible configuration for full-text search.

Ildus Kurbangaliev sent in a patch to implement a prefix operator, ^@, for text and give it SP-GiST support.

Konstantin Knizhnik sent in another revision of a patch to implement built-in connection pooling.

Peter Geoghegan sent in a patch to add logtape.c Valgrind suppression.

Pavel Stěhule and David G. Johnson traded patches to implement schema variables.

Pierre Ducroquet sent in a patch to add support for LLVM 4 and LLVM 5 atop the JIT patch.

Pierre Ducroquet sent in a patch to fix support for LLVM 3.9 atop the JIT patch.

Amul Sul sent in another revision of a patch to restrict concurrent UPDATEs and DELETEs during the UPDATE of a partition key.