Revues de code

Correctifs appliqués

Tom Lane a poussé :

  • On second thought, we'd better just drop these tests altogether. Further experimentation reveals that my previous change didn't fix the issue entirely: these tests would still fail at the spring-forward DST transition. There doesn't seem to be any great value in testing this specific issue for both timestamp and timestamptz, so just lose the latter tests.
  • Fix assorted bugs in contrib/unaccent's configuration file parsing. Make it use t_isspace() to identify whitespace, rather than relying on sscanf which is known to get it wrong on some platform/locale combinations. Get rid of fixed-size buffers. Make it actually continue to parse the file after ignoring a line with untranslatable characters, as was obviously intended. The first of these issues is per gripe from J Smith, though not exactly either of his proposed patches.
  • Wrap appendrel member outputs in PlaceHolderVars in additional cases. Add PlaceHolderVar wrappers as needed to make UNION ALL sub-select output expressions appear non-constant and distinct from each other. This makes the world safe for add_child_rel_equivalences to do what it does. Before, it was possible for that function to add identical expressions to different EquivalenceClasses, which logically should imply merging such ECs, which would be wrong; or to improperly add a constant to an EquivalenceClass, drastically changing its behavior. Per report from Teodor Sigaev. The only currently known consequence of this bug is "MergeAppend child's targetlist doesn't match MergeAppend" planner failures in 9.1 and later. I am suspicious that there may be other failure modes that could affect older release branches; but in the absence of any hard evidence, I'll refrain from back-patching further than 9.1.
  • Fix random discrepancies between parallel_schedule and serial_schedule. In particular, my previous patch expected the create_index test to run before the inherit test; but this was only true in the serial schedule. Rearrange this portion of the schedules to be more consistent. Per buildfarm results.
  • Tweak new regression test case for more portability. Ensure that same index gets selected on 32-bit and 64-bit machines. Per buildfarm results.
  • Avoid platform-dependent infinite loop in pg_dump. If malloc(0) returns NULL, the binary search in findSecLabels() will probably go into an infinite loop when there are no security labels, because NULL-1 is greater than NULL after wraparound. (We've seen this pathology before ... I wonder whether there's a way to detect the class of bugs automatically?) Diagnosis and patch by Steve Singer, cosmetic adjustments by me
  • Throw nice error if server is too old to support psql's \ef or \sf command. Previously, you'd get "function pg_catalog.pg_get_functiondef(integer) does not exist", which is at best rather unprofessional-looking. Back-patch to 8.4 where \ef was introduced. Josh Kupershmidt
  • In plpgsql, allow foreign tables to define row types. This seems to have been just an oversight in previous foreign-table work. A quick grep didn't turn up any other places where RELKIND_FOREIGN_TABLE was obviously omitted. One change noted by Alexander Soudakov, the other by me. Back-patch to 9.1.

Heikki Linnakangas a poussé :

Robert Haas a poussé :

Peter Eisentraut a poussé :

Bruce Momjian a poussé :

Simon Riggs a poussé :

  • Wakeup WALWriter as needed for asynchronous commit performance. Previously we waited for wal_writer_delay before flushing WAL. Now we also wake WALWriter as soon as a WAL buffer page has filled. Significant effect observed on performance of asynchronous commits by Robert Haas, attributed to the ability to set hint bits on tuples earlier and so reducing contention caused by clog lookups.

Michael Meskes a poussé :

Correctifs rejetés (à ce jour)

  • Pas de déception cette semaine :-)

Correctifs en attente

  • Peter Eisentraut sent in the first of several patches to quiet warnings generated when using -Wcast-qual.
  • Thomas Munro and Kevin Grittner traded patches which const-ify functions, per TODO item.
  • KaiGai Kohei sent in two more revisions of the patch to add object access hooks with argument support.
  • Alexander Korotkov sent in two revisions of a patch to add GiST indexing for range types.
  • Heikki Linnakangas sent in another revision of the patch to store hot members of PGPROC out of band.
  • Simon Riggs sent in a patch to use a latch in WalWriter.
  • Robert Haas and Simon Riggs traded patches intended to reduce contention on ProcArrayLock.
  • Jaime Casanova sent in another revision of the patch to allow seeing relation free space.
  • Laurenz Albe sent in a patch to allow disabling SSL compression.
  • Dimitri Fontaine sent in a PoC patch to create command triggers.
  • Alexander Korotkov sent in another revision of the patch to collect frequency statistics for arrays.
  • Robert Haas sent in a patch to improve error messages emitted by get_object_address().
  • Dimitri Fontaine sent in two revisions of a patch to add Node support in outfuncs.c and readfuncs.c
  • Tomas Vondra sent in a PoC patch to allow triggers on backend startup.
  • Nikhil Sontakke and Robert Haas traded patches to fix a situation where concurrent CREATE TABLE/DROP SCHEMA leaves inconsistent leftovers.
  • José Arthur Benetasso Villanova and Jan Kundrát traded patches to add context in error messages where check constraints are violated.
  • Kyotaro HORIGUCHI sent in a patch to allow plugging in different memory allocators into libpq.
  • Andrew Dunstan sent in a patch to add finer control to pg_dump/pg_restore by making the dividing lines among pre-data, data and post-data sections explicit.
  • Robert Haas sent in two revisions of a patch to reduce the number of snapshots taken per query by half.
  • Simon Riggs sent in a patch to allow fast failover.
  • Jan Urbanski sent in another revision of the patches to refactor PL/Python.
  • Greg Smith sent in a patch which adds query normalization of pg_stat_statements, based on transforming the query tree into a series of integers and using them to match against previous queries.