Correctifs appliqués

Tom Lane pushed:

  • Remove triggerable Assert in hashname(). hashname() asserted that the key string it is given is shorter than NAMEDATALEN. That should surely always be true if the input is in fact a regular value of type "name". However, for reasons of coding convenience, we allow plain old C strings to be treated as "name" values in many places. Some SQL functions accept arbitrary "text" inputs, convert them to C strings, and pass them otherwise-untransformed to syscache lookups for name columns, allowing an overlength input value to trigger hashname's Assert. This would be a DOS problem, except that it only happens in assert-enabled builds which aren't recommended for production. In a production build, you'll just get a name lookup error, since regardless of the hash value computed by hashname, the later equality comparison checks can't match. Likewise, if the catalog lookup is done by seqscan or indexscan searches, there will just be a lookup error, since the name comparison functions don't contain any similar length checks, and will see an overlength input as unequal to any stored entry. After discussion we concluded that we should simply remove this Assert. It's inessential to hashname's own functionality, and having such an assertion in only some paths for name lookup is more of a foot-gun than a useful check. There may or may not be a case for the affected callers to do something other than let the name lookup fail, but we'll consider that separately; in any case we probably don't want to change such behavior in the back branches. Per report from Tushar Ahuja. Back-patch to all supported branches. Report: https://postgr.es/m/7d0809ee-6f25-c9d6-8e74-5b2967830d49@enterprisedb.com Discussion: https://postgr.es/m/17691.1482523168@sss.pgh.pa.us http://git.postgresql.org/pg/commitdiff/54386f3578258caa5a1de97c434eee2c9ee2ab06
  • Fix interval_transform so it doesn't throw away non-no-op casts. interval_transform() contained two separate bugs that caused it to sometimes mistakenly decide that a cast from interval to restricted interval is a no-op and throw it away. First, it was wrong to rely on dt.h's field type macros to have an ordering consistent with the field's significance; in one case they do not. This led to mistakenly treating YEAR as less significant than MONTH, so that a cast from INTERVAL MONTH to INTERVAL YEAR was incorrectly discarded. Second, fls(1<<k) produces k+1 not k, so comparing its output directly to SECOND was wrong. This led to supposing that a cast to INTERVAL MINUTE was really a cast to INTERVAL SECOND and so could be discarded. To fix, get rid of the use of fls(), and make a function based on intervaltypmodout to produce a field ID code adapted to the need here. Per bug #14479 from Piotr Stefaniak. Back-patch to 9.2 where transform functions were introduced, because this code was born broken. Discussion: https://postgr.es/m/20161227172307.10135.7747@wrigleys.postgresql.org http://git.postgresql.org/pg/commitdiff/f0774abde868e0b5a2acbe75b5028884752f739d
  • Remove manual breaks in NodeTag assignments to fix duplicate tag numbers. Commit f0e44751d added new node tags at a place in the tag numbering where there was no daylight left before the next hard-coded number, resulting in some duplicate tag assignments. This doesn't seem to have caused any big problem so far, but it's surely trouble waiting to happen. We could adjust the manually assigned breakpoints to make more room, but that just leaves the same hazard waiting to strike again in future. What seems like a better idea is to get rid of the manual assignments and leave NodeTags to be automatically assigned, consecutively from one on up. This means that any change in the tag list forces a backend-wide recompile, but realistically that's usually needed anyway. Discussion: https://postgr.es/m/29670.1482942811@sss.pgh.pa.us http://git.postgresql.org/pg/commitdiff/80a7298b9eb7f108ef20be6ee00d9513a43c61a0
  • Fix unstable regression test results. Commit 2ac3ef7a0 added a query with an underdetermined output row order; it has failed multiple times in the buildfarm since then. Add an ORDER BY to fix. Also, don't rely on a DROP CASCADE to drop in a well-determined order; that hasn't failed yet but I don't trust it much, and we're not saving any typing by using CASCADE anyway. http://git.postgresql.org/pg/commitdiff/257d8157205a7be5f9799e8941b922521d678a25
  • Avoid assuming that instr_time == struct timeval in pgbench logging. This code was presuming undue familiarity with the contents of the instr_time struct. That was already broken on Windows, and it's about to get broken on most other platforms as well. The simplest solution that preserves the current output definition is to just do our own gettimeofday() call here. Realistically, the extra cost is probably negligible in comparison to everything else that's going on in a pgbench transaction, so it's not worth sweating over. On Windows, the precision delivered by gettimeofday() is lower than one could wish, but this is still a big improvement over printing zeroes, as the code did before. Discussion: https://postgr.es/m/8837.1483216839@sss.pgh.pa.us http://git.postgresql.org/pg/commitdiff/74baa1e3b89c1651ade1afeffc715cac24041e2f

Magnus Hagander pushed:

Andrew Dunstan pushed:

Peter Eisentraut pushed:

Correctifs en attente

Pavan Deolasee sent in another revision of a patch to fix some issues in WARM.

Kyotaro HORIGUCHI sent in another revision of a patch to clean up negative cache of pg_statistic when dropping a relation and clean up negative cache of pg_class when dropping a schema.

Kyotaro HORIGUCHI sent in another revision of a patch to redesign psql's tab completion and use that infrastructure to implement IF (NOT) EXISTS completion.

Ashutosh Bapat sent in another revision of a patch to imlement partition-wise join for join between (declaratively) partitioned tables.

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

Dmitry Dolgov sent in another revision of a patch to implement generic type subscripting.

Amit Langote sent in five more revisions of a patch to implement declarative partitioning.

Amit Langote sent in a patch to fix an infelicity between OID columns and table inheritance.

Mithun Cy sent in two more revisions of a patch to cache hash index meta pages.

Etsuro Fujita sent in another revision of a patch to push more FULL joins to the PostgreSQL FDW.

Amit Kapila sent in another revision of a patch to implement parallel index scans.

Nikita Glukhov sent in another revision of a patch to implement recursive json_populate_record().

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

Rafia Sabih sent in another revision of a patch to implement parallel index-only scans.

Amit Kapila sent in a patch to parallelize queries containing subplans.

Thomas Munro sent in a patch to fix dsa tranche registration.

Michaël Paquier sent in two more revisions of a patch to enable pg_receivelog to enable adjusting compression for tar format.

Peter Eisentraut sent in a patch to add some information about the systemd RemoveIPC issue to the documentation.

Ideriha Takeshi sent in a patch to add a DECLARE STATEMENT command in ECPG.

Craig Ringer sent in another revision of a patch to introduce txid_status(bigint) to get status of an xact.

Thomas Munro sent in another revision of a patch to allow measuring replay lag.

Claudio Freire sent in another revision of a patch to enable VACUUM to use more than 1GB of work mem.

Craig Ringer sent in two revisions of a patch to fix a minor race between commit_ts slru truncation and lookups.

Tom Lane sent in another revision of a patch to improve RLS planning.

Ãlvaro Herrera sent in two revisions of a patch to rewrite HeapSatisfiesHOTAndKey.

Ãlvaro Herrera sent in two more revisions of a patch to implement indirect indexes.

Vik Fearing sent in a patch to change the encoding of the French translation encoding from ISO-8859-1 to UTF-8.

Jim Nasby sent in another revision of a patch to increase pltcl test coverage.

Peter Eisentraut sent in another revision of a patch to add background sessions.

Tom Lane sent in a patch to eliminate gettimeofday() on platforms where better options are available.

Haribabu Kommi sent in a patch to implement a columnar storage extension.

Fabien COELHO sent in another revision of a patch to fix some pg_stat_statements query normalization issues with combined queries.

Yury Zhuravlev sent in another revision of a patch to implement a CMake-based build system.

Petr Jelínek sent in another revision of a patch to implement logical replication.

Michaël Paquier sent in another revision of a patch to fix a potential data loss of 2PC files.

Fabrízio de Royes Mello sent in another revision of a patch to implement COMMENT ON CURRENT DATABASE.

Amit Kapila sent in another revision of a patch to speed up clog Access by increasing CLOG buffers.

Amit Kapila sent in a patch to fix an issue where group clear xid can leak semaphore count.

Peter Eisentraut sent in a patch to generate fmgr prototypes automatically.

Peter Eisentraut sent in another revision of a patch to implement sequence data types.

Peter Eisentraut sent in a patch to put "use strict" in all Perl programs.

Peter Eisentraut sent in a patch to create the INSTALL file via XSLT and Pandoc. This is one more step on the way to replacing the old tool chain of jade and lynx.

Peter Eisentraut sent in a patch to automatically casts the result of copyNode() back to the input type, if the compiler supports something like typeof().

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

Magnus Hagander sent in another revision of a patch to support huge pages on Windows.

Peter Eisentraut sent in another revision of a patch to add identity columns per the SQL standard.

Magnus Hagander sent in a patch to change the backup and replication defaults to something more useful.

Peter Eisentraut sent in another revision of a patch to allow DROP FUNCTION to drop multiple functions in one command.

Peter Eisentraut sent in a patch to implement safer node casting.

Magnus Hagander sent in another revision of a patch to make streaming the pg_basebackup default.

David Fetter sent in another revision of a patch to add a hook which allows disabling simple UPDATEs and DELETEs without a WHERE clause.

Thomas Munro sent in a patch to add an isolation test for SERIALIZABLE READ ONLY DEFERRABLE.

Pavel Stěhule sent in a patch to add some runtime checks to PL/pgsql.

Simon Riggs sent in another revision of a patch to make some changes to the recovery.conf API.