Correctifs appliqués

Robert Haas pushed:

Heikki Linnakangas pushed:

Peter Eisentraut pushed:

Tom Lane pushed:

  • Be sure to rewind the tuplestore read pointer in non-leader CTEScan nodes. ExecInitCteScan supposed that it didn't have to do anything to the extra tuplestore read pointer it gets from tuplestore_alloc_read_pointer. However, it needs this read pointer to be positioned at the start of the tuplestore, while tuplestore_alloc_read_pointer is actually defined as cloning the current position of read pointer 0. In normal situations that accidentally works because we initialize the whole plan tree at once, before anything gets read. But it fails in an EvalPlanQual recheck, as illustrated in bug #14328 from Dima Pavlov. To fix, just forcibly rewind the pointer after tuplestore_alloc_read_pointer. The cost of doing so is negligible unless the tuplestore is already in TSS_READFILE state, which wouldn't happen in normal cases. We could consider altering tuplestore's API to make that case cheaper, but that would make for a more invasive back-patch and it doesn't seem worth it. This has been broken probably for as long as we've had CTEs, so back-patch to all supported branches. Discussion: <32468.1474548308@sss.pgh.pa.us> http://git.postgresql.org/pg/commitdiff/96dd77d349424f270d129f8f40e75f762ddcca7d
  • Remove nearly-unused SizeOfIptrData macro. Past refactorings have removed all but one reference to SizeOfIptrData (and that one place was in a pretty noncritical spot). Since nobody's complained, it seems probable that there are no supported compilers that don't think sizeof(ItemPointerData) is 6. If there are, we're wasting MAXALIGN per heap tuple anyway, so it's rather silly to worry about whether we can shave space in places like WAL records. Pavan Deolasee Discussion: <CABOikdOOawDda4hwLOT6zdA6MFfPLu3Z2YBZkX0JdayNS6JOeQ@mail.gmail.com> http://git.postgresql.org/pg/commitdiff/8023b5827fbada6815ce269db4f3373ac77ec7c3
  • Avoid using PostmasterRandom() for DSM control segment ID. Commits 470d886c3 et al intended to fix the problem that the postmaster selected the same "random" DSM control segment ID on every start. But using PostmasterRandom() for that destroys the intended property that the delay between random_start_time and random_stop_time will be unpredictable. (Said delay is probably already more predictable than we could wish, but that doesn't mean that reducing it by a couple orders of magnitude is OK.) Revert the previous patch and add a comment warning against misuse of PostmasterRandom. Fix the original problem by calling srandom() early in PostmasterMain, using a low-security seed that will later be overwritten by PostmasterRandom. Discussion: <20789.1474390434@sss.pgh.pa.us> http://git.postgresql.org/pg/commitdiff/49a91b88e6c4afb840745c78942dd99ce125a6d6
  • Don't trust CreateFileMapping() to clear the error code on success. We must test GetLastError() even when CreateFileMapping() returns a non-null handle. If that value were left over from some previous system call, we might be fooled into thinking the segment already existed. Experimentation on Windows 7 suggests that CreateFileMapping() clears the error code on success, but it is not documented to do so, so let's not rely on that happening in all Windows releases. Amit Kapila Discussion: <20811.1474390987@sss.pgh.pa.us> http://git.postgresql.org/pg/commitdiff/8e6b4ee21f486e6800aaa6955ff3d98e1a521b49
  • Remove useless code. Apparent copy-and-pasteo in standby_desc_invalidations() had two entries for msg->id == SHAREDINVALRELMAP_ID. Aleksander Alekseev Discussion: <20160923090814.GB1238@e733> http://git.postgresql.org/pg/commitdiff/959ea7fa76120449efa5d85ae351abd1d6e5480c
  • Fix incorrect logic for excluding range constructor functions in pg_dump. Faulty AND/OR nesting in the WHERE clause of getFuncs' SQL query led to dumping range constructor functions if they are part of an extension and we're in binary-upgrade mode. Actually, we don't want to dump them separately even then, since CREATE TYPE AS RANGE will create the range's constructor functions regardless. Per report from Andrew Dunstan. It looks like this mistake was introduced by me, in commit b985d4877, in perhaps-overzealous refactoring to reduce code duplication. I'm suitably embarrassed. Report: <34854939-02d7-f591-5677-ce2994104599@dunslane.net> http://git.postgresql.org/pg/commitdiff/12f6eadffd075e39570a0170f6791de0b96ddfde
  • Doc: fix examples of # operators so they actually work. These worked as-is until around 7.0, but fail in newer versions because there are more operators named "#". Besides it's a bit inconsistent that only two of the examples on this page lack type names on their constants. Report: <20160923081530.1517.75670@wrigleys.postgresql.org> http://git.postgresql.org/pg/commitdiff/5a7bae0699657315b487896810a30bd7425f6a08
  • Install TAP test infrastructure so it's available for extension testing. When configured with --enable-tap-tests, "make install" will now install the Perl support files for TAP testing where PGXS will find them. This allows extensions to rely on $(prove_check) even when being built out-of-tree. Back-patch to 9.4 where we first started to support TAP testing, to reduce the number of cases extension makefiles need to consider. Craig Ringer Discussion: <CAMsr+YFXv+2qne6xJW7z_25mYBtktRX5rpkrgrb+DRgQ_FxgHQ@mail.gmail.com> http://git.postgresql.org/pg/commitdiff/c3a0818460a8f4a5e1a9109b035ac30e84b7e06f
  • Do a final round of updates on the 9.6 release notes. Set release date, document a few recent commits, do one last pass of copy-editing. http://git.postgresql.org/pg/commitdiff/98c2d3332b30006ff71add99bc9d619c9457e71f

Bruce Momjian pushed:

Correctifs en attente

David Fetter sent in another revision of a patch to add a contrib hook and associated GUCs for disallowing UPDATE and/or DELETE when no WHERE clause is present.

Vladimir Gordiychuk and Craig Ringer traded patches to permit pausing replication.

Thomas Munro sent in a patch to check the return code for postmaster death.

Takayuki Tsunakawa sent in a patch to make large shared_buffers settings effective on Windows.

Ashutosh Bapat sent in a patch to cache the result of code in add_paths_to_joinrel() which computes the set of target relations that should overlap parameterization of any proposed join path rather than re-computing it each time it's used in a query.

Daniel Vérité sent in another revision of a patch to enable psql variable hooks to return a boolean indicating whether a change is allowed.

Mithun Cy sent in another revision of a patch to add some tests to cover hash indexes.

Craig Ringer and Robert Haas traded patches to add a txid_status(bigint) to get status of an xact.

Jesper Pedersen sent in four more revisions of a patch to add hash index support to pageinspect.

Heikki Linnakangas and Fabien COELHO traded patches to refactor the pgbench meta commands into a state machine.

Mark Dilger sent in a patch to fix a place that shouldn't have cast away const.

Michaël Paquier sent in a patch to add suitable OOM warnings to palloc_extended() and pg_malloc_internal().

Haribabu Kommi sent in another revision of a patch to enable tracking the number of commands executed grouped by command tag.

Ashutosh Bapat sent in two more revisions of a patch to enable optimizations of partition-wise join for join between (declaratively) partitioned tables.

Michaël Paquier sent in three more revisions of a patch to track wait events for latches.

Amit Kapila sent in another revision of a patch to implement concurrent hash indexes.

David Cramer and Pavel Stěhule traded patches to add PL/PythonU support for multidimensional arrays.

Pavel Stěhule and Craig Ringer traded patches to add xmltable().

Anastasia Lubennikova sent in another revision of a patch to add covering & unique indexes.

Heikki Linnakangas sent in a patch to refactor the LogicalTapeSet/LogicalTape interface.

Ashutosh Bapat sent in a patch to refactor index creation so it plays better with declaratively partitioned tables.

Julian Markwort sent in a patch to allow specifying a 'custom' pgpassfile within the connection string along the lines of the existing parameters sslkey and sslcert.

Michaël Paquier sent in another revision of a patch to move sync routines of initdb into src/common, issue fsync more carefully in pg_receivexlog and pg_basebackup [-X] stream, add --nosync option to pg_basebackup, and switch pg_basebackup commands in Postgres.pm to use --no-sync.

Peter Eisentraut sent in another revision of a patch to change pg_dump by separate table and sequence data object types and fixing pg_upgrade to use this facility from pg_dump.

David Steele sent in another revision of a patch to exclude additional directories in pg_basebackup.

Robert Haas sent in a WIP patch to enable asynchronous execution.

Amit Kapila sent in another revision of a patch to do SetLastError(0) before calling CreateFileMapping.

Thomas Munro sent in a patch to add psql tab completions for LOCK TABLE ... IN ACCESS|ROW|SHARE.

Thomas Munro sent in a patch to refactor StartupXLOG.

Masahiko Sawada sent in another revision of a patch to add quorum commit.

Amit Kapila sent in another revision of a patch to add WAL for hash indexes.