Correctifs appliqués

Tatsuo Ishii pushed:

Kevin Grittner pushed:

Tom Lane pushed:

  • Improve ResourceOwners' behavior for large numbers of owned objects. The original coding was quite fast so long as objects were always released in reverse order of addition; otherwise, it degenerated into O(N^2) behavior due to searching for the array element to delete. Improve matters by switching to hashed storage when the number of objects of a given type exceeds 64. (The cutover point is open to discussion, of course, but some simple performance testing suggests that hashing has enough overhead to be a loser below there.) Also, refactor resowner.c so that we don't need N copies of the array management code. Since all the resource IDs the code currently needs to deal with are either pointers or integers, it seems sufficient to create a one-size-fits-all infrastructure in which everything is converted to a Datum for storage. Aleksander Alekseev, reviewed by Stas Kelvich, further fixes by me http://git.postgresql.org/pg/commitdiff/cc988fbb0bf60a83b628b5615e6bade5ae9ae6f4
  • Fix startup so that log prefix %h works for the log_connections message. We entirely randomly chose to initialize port->remote_host just after printing the log_connections message, when we could perfectly well do it just before, allowing %h and %r to work for that message. Per gripe from Artem Tomyuk. http://git.postgresql.org/pg/commitdiff/b8682a7155bee06667c5773e1ca6499a670338b0
  • Fix incorrect pattern-match processing in psql's \det command. listForeignTables' invocation of processSQLNamePattern did not match up with the other ones that handle potentially-schema-qualified names; it failed to make use of pg_table_is_visible() and also passed the name arguments in the wrong order. Bug seems to have been aboriginal in commit 0d692a0dc9f0e532. It accidentally sort of worked as long as you didn't inquire too closely into the behavior, although the silliness was later exposed by inconsistencies in the test queries added by 59efda3e50ca4de6 (which I probably should have questioned at the time, but didn't). Per bug #13899 from Reece Hart. Patch by Reece Hart and Tom Lane. Back-patch to all affected branches. http://git.postgresql.org/pg/commitdiff/7e22470471e9ed7010fcbc4a18b0a461d088d7c7

Ãlvaro Herrera pushed:

Fujii Masao pushed:

Robert Haas pushed:

  • Fix cross-version pg_dump for aggregate combine functions. Fixes a defect in commit a7de3dc5c346e07e0439275982569996e645b3c2. David Rowley, per report from Jeff Janes, who also checked that the fix works. http://git.postgresql.org/pg/commitdiff/025b2f339260b727e113a01a20b616a336bff00a
  • Assert that create_unique_path returns non-NULL. Per off-list discussion with Tom Lane and Michael Paquier, Coverity gets unhappy if this is not done. http://git.postgresql.org/pg/commitdiff/eaf7b1f6432480e93d8c6824fbd503761a1c1a4f
  • Add [NO]BYPASSRLS options to CREATE USER and ALTER USER docs. Patch-by: Filip RembiaÅ‚kowski Reviewed-by: Robert Haas Backpatch-through: 9.5 http://git.postgresql.org/pg/commitdiff/80db1ca2d79338c35bb3e01f2aecad78c2231b06
  • Avoid multiple foreign server connections when all use same user mapping. Previously, postgres_fdw's connection cache was keyed by user OID and server OID, but this can lead to multiple connections when it's not really necessary. In particular, if all relevant users are mapped to the public user mapping, then their connection options are certainly the same, so one connection can be used for all of them. While we're cleaning things up here, drop the "server" argument to GetConnection(), which isn't really needed. This saves a few cycles because callers no longer have to look this up; the function itself does, but only when establishing a new connection, not when reusing an existing one. Ashutosh Bapat, with a few small changes by me. http://git.postgresql.org/pg/commitdiff/96198d94cb7adc664bda341842dc8db671d8be72
  • Add missing quotation mark. This fix accidentally got left out of the previous commit. http://git.postgresql.org/pg/commitdiff/2f6b041f76e6de0fa2921131a23bda794ffb83bb
  • Only try to push down foreign joins if the user mapping OIDs match. Previously, the foreign join pushdown infrastructure left the question of security entirely up to individual FDWs, but it would be easy for a foreign data wrapper to inadvertently open up subtle security holes that way. So, make it the core code's job to determine which user mapping OID is relevant, and don't attempt join pushdown unless it's the same for all relevant relations. Per a suggestion from Tom Lane. Shigeru Hanada and Ashutosh Bapat, reviewed by Etsuro Fujita and KaiGai Kohei, with some further changes by me. http://git.postgresql.org/pg/commitdiff/fbe5a3fb73102c2cfec11aaaa4a67943f4474383
  • postgres_fdw: Refactor deparsing code for locking clauses. The upcoming patch to allow join pushdown in postgres_fdw needs to use this code multiple times, which requires moving it to deparse.c. That seems like a good idea anyway, so do that now both on general principle and to simplify the future patch. Inspired by a patch by Shigeru Hanada and Ashutosh Bapat, but I did it a little differently than what that patch did. http://git.postgresql.org/pg/commitdiff/b88ef201d46e6519b5e0589358c952a4c0f5bf0f
  • Migrate PGPROC's backendLock into PGPROC itself, using a new tranche. Previously, each PGPROC's backendLock was part of the main tranche, and the PGPROC just contained a pointer. Now, the actual LWLock is part of the PGPROC. As with previous, similar patches, this makes it significantly easier to identify these lwlocks in LWLOCK_STATS or Trace_lwlocks output and improves modularity. Author: Ildus Kurbangaliev Reviewed-by: Amit Kapila, Robert Haas http://git.postgresql.org/pg/commitdiff/b319356f0e94a6482c726cf4af96597c211d8d6e
  • Migrate replication slot I/O locks into a separate tranche. This is following in a long train of similar changes and for the same reasons - see b319356f0e94a6482c726cf4af96597c211d8d6e and fe702a7b3f9f2bc5bf6d173166d7d55226af82c8 inter alia. Author: Amit Kapila Reviewed-by: Alexander Korotkov, Robert Haas http://git.postgresql.org/pg/commitdiff/2251179e6ad3a865d2f55e1832fab34608fcce43
  • postgres_fdw: More preliminary refactoring for upcoming join pushdown. The code that generates a complete SQL query for a given foreign relation was repeated in two places, and they didn't quite agree: the EXPLAIN case left out the locking clause. Centralize the code so we get the same behavior everywhere, and adjust calling conventions and which functions are static vs. extern accordingly . Centralize the code so we get the same behavior everywhere, and adjust calling conventions and which functions are static vs. extern accordingly. Ashutosh Bapat, reviewed and slightly adjusted by me. http://git.postgresql.org/pg/commitdiff/cc592c48c58d9c1920f8e2063756dcbcce79e4dd

Peter Eisentraut pushed:

Andrew Dunstan pushed:

Correctifs rejetés (à ce jour)

No one was disappointed this week :-)

Correctifs en attente

Michael Paquier sent in a patch to ensure that fsyncs actually fsync in the case of renaming.

Corey Huinker and Michael Paquier traded revisions of a patch to add generate_series(date,date) and generate_series(date,date,integer).

Corey Huinker sent in two more revisions of a patch to allow limiting FETCH by bytes.

Kaigai Kouhei sent in another revision of a patch to add CustomScan support and an example.

Vinayak Pokale sent in two more revisions of a patch to implement a vacuum progress checker.

Amit Kapila sent in two more revisions of a patch to expand pg_stat_activity to chow waiting.

Pavel Stěhule sent in two more revisions of a patch to add pg_size_bytes().

Pavel Stěhule sent in another revision of a patch to add num_notnulls().

Stas Kelvich sent in a patch to speed up two-phase commits by reading state files into memory during the replay of prepare, and if checkpoint/restartpoint occurs between prepare and commit, to move the data to files.

Craig Ringer sent in two more revisions of a patch to implement failover slots.

SAWADA Masahiko sent in two revisions of a patch to check for a suitable index to use in REFRESH MATERIALIZED VIEW CONCURRENTLY.

Kyotaro HORIGUCHI sent in another revision of a patch to allow async-capable nodes to run the node before ExecProcNode().

Pavel Stěhule and Iacob Catalin traded patches to add an ereport function to PL/PythonU.

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

Etsuro Fujita sent in a patch to fix some capitalizations in fdwhandlers.sgml.

Erik Rijkers sent in a patch to fix some typos in the pgbench docs.

Aleksander Alekseev sent in another revision of a patch to optimize dynahashes.

Stas Kelvich sent in another revision of a patch to add tsvector editing functions.

Pavel Stěhule sent in another revision of a patch to better support %TYPE in PL/pgsql.

José Arthur Benetasso Villanova sent in another revision of a patch to log operating system usernames connecting via unix socket.

Fabien COELHO sent in a patch to fix a couple of minor bugs in pgbench.

Ashutosh Bapat sent in a patch to keep from making separate DB connections to remote servers when not needed in FDWs.

Artur Zakirov sent in a patch to fix some infelicities in tsearch2 parsing.

Petr Jelínek sent in another revision of a patch to add a sequence access method.

Peter Eisentraut sent in two more revisions of a patch to integrate better with systemd.

Michael Paquier sent in three more revisions of a patch to avoid unneeded checkpoints.

Noah Misch sent in two revisions of a patch to fix an issue that could cause a backend crash with nested CREATE TEMP TABLE invocations.

Fabien COELHO and Michael Paquier traded patches to extend pgbench expressions with functions.

Amit Kapila sent in a patch to reduce the number of WAL writes.

Dilip Kumar sent in another revision of a patch to help scale relation extensions.

Artur Zakirov sent in two more revisions of a patch to improve Hunspell dictionary support.

Michael Paquier sent in a patch to fix some comment typos.

Etsuro Fujita sent in another revision of a patch to make foreign table writes more efficient.

Kaigai Kouhei sent in two more revisions of a patch to add CustomScan under a Gather node.

Anastasia Lubennikova sent in three more revisions of a patch to compress B-Trees in a way that's analogous to that just used for GIN.

Ashutosh Bapat sent in two more revisions of a patch to make read operations on the PostgreSQL FDW more efficient.

Fujii Masao and SAWADA Masahiko traded patches to fix tab completion options for SET/RESET in psql.

Alexander Korotkov sent in another revision of a patch to enable creating access methods with an example for Bloom filters.

Alexander Korotkov sent in a patch to refactor SLRU tranches.

Ashutosh Bapat sent in a patch to move the code to deparse SELECT statements into a function deparseSelectStmtForRel().

Vitaly Burovoy sent in a patch to fix an overflow in EXTRACT.

Vik Fearing sent in another revision of a patch to add an idle-in-transaction timeout.

Thomas Munro sent in a patch to detect SSI conflicts before reporting constraint violations.

Vitaly Burovoy sent in a patch to make the behavior of all versions of the "isinf" function be similar.