== PostgreSQL Weekly News - November 01 2015 == - Mailing list pgsql-announce
From | David Fetter |
---|---|
Subject | == PostgreSQL Weekly News - November 01 2015 == |
Date | |
Msg-id | 20151101233927.GA7054@fetter.org Whole thread Raw |
List | pgsql-announce |
== PostgreSQL Weekly News - November 01 2015 == == PostgreSQL Product News == PGroonga 1.0.0, a fast full text search platform for all languages, released. http://groonga.org/en/blog/2015/10/29/pgroonga-1.0.0.html tds_fdw 1.0.6, a foreign data wrapper for MS-SQL Server and Sybase, released. https://github.com/GeoffMontee/tds_fdw/releases == PostgreSQL Jobs for November == http://archives.postgresql.org/pgsql-jobs/2015-11/ == PostgreSQL Local == Highload++2015 is November 2-3, 2015 in Moscow, Russia. Information in Russian and English, respectively: http://highload.ru/ http://highload.co/ PGConf Silicon Valley 2015 is November 17-18 at the South San Francisco Convention Center. http://www.pgconfsv.com PGBR2015 (The Brazilian PostgreSQL Conference) will take place in Porto Alegre, Rio Grande do Sul, on November 18, 19 and 20. Registration is open. http://pgbr.postgresql.org.br/2015/en/ Postgres Conference China 2015 will be on November 20-22, 2015 in Beijing. http://postgres2015.eventdove.com/ (Chinese) http://postgrescluster2015.eventdove.com/ (English) PGConf.DE will be held on November 26-27, 2015 in Hamburg, Germany, at the Lindner Hotel am Michel. http://2015.pgconf.de/ PostgreSQL@SCaLE is a two day, two track event which takes place on Jan. 21-22, 2016, at Pasadena Convention Center, as part of SCaLE 14X. The CfP is open until Oct 30, 2015. https://www.socallinuxexpo.org/scale/14x/cfp == PostgreSQL in the News == Planet PostgreSQL: http://planet.postgresql.org/ PostgreSQL Weekly News is brought to you this week by David Fetter Submit news and announcements by Sunday at 3:00pm Pacific time. Please send English language ones to david@fetter.org, German language to pwn@pgug.de, Italian language to pwn@itpug.org. Spanish language to pwn@arpug.com.ar. == Applied Patches == Álvaro Herrera pushed: - Measure string lengths only once. Bernd Helmle complained that CreateReplicationSlot() was assigning the same value to the same variable twice, so we could remove one of them. Code inspection reveals that we can actually remove both assignments: according to the author the assignment was there for beauty of the strlen line only, and another possible fix to that is to put the strlen in its own line, so do that. To be consistent within the file, refactor all duplicated strlen() calls, which is what we do elsewhere in the backend anyway. In basebackup.c, snprintf already returns the right length; no need for strlen afterwards. Backpatch to 9.4, where replication slots were introduced, to keep code identical. Some of this is older, but the patch doesn't apply cleanly and it's only of cosmetic value anyway. Discussion: http://www.postgresql.org/message-id/BE2FD71DEA35A2287EA5F018@eje.credativ.lan http://git.postgresql.org/pg/commitdiff/0cd836a4e818f049716e47fe81bf5d4800509c57 - Cleanup commit timestamp module activaction, again Further tweak commit_ts.c so that on a standby the state is completely consistent with what that in the master, rather than behaving differently in the cases that the settings differ. Now in standby and master the module should always be active or inactive in lockstep. Author: Petr Jelínek, with some further tweaks by Álvaro Herrera. Backpatch to 9.5, where commit timestamps were introduced. Discussion: http://www.postgresql.org/message-id/5622BF9D.2010409@2ndquadrant.com http://git.postgresql.org/pg/commitdiff/531d21b75ff6b18ea8638c736a05326ebd519f49 - Fix BRIN free space computations A bug in the original free space computation made it possible to return a page which wasn't actually able to fit the item. Since the insertion code isn't prepared to deal with PageAddItem failing, a PANIC resulted ("failed to add BRIN tuple [to new page]"). Add a macro to encapsulate the correct computation, and use it in brin_getinsertbuffer's callers before calling that routine, to raise an early error. I became aware of the possiblity of a problem in this area while working on ccc4c074994d734. There's no archived discussion about it, but it's easy to reproduce a problem in the unpatched code with something like CREATE TABLE t (a text); CREATE INDEX ti ON t USING brin (a) WITH (pages_per_range=1); for length in `seq 8000 8196` do psql -f - <<EOF TRUNCATE TABLE t; INSERT INTO t VALUES ('z'), (repeat('a', $length)); EOF done Backpatch to 9.5, where BRIN was introduced. http://git.postgresql.org/pg/commitdiff/21a4e4a4c9fe417e2462b6f90f6b0e49e32ceba6 - Document BRIN's inclusion opclass framework Backpatch to 9.5 -- this should have been part of b0b7be61337, but we didn't have 38b03caebc5de either at the time. Author: Emre Hasegeli Revised by: Ian Barwick Discussion: http://www.postgresql.org/message-id/CAE2gYzyB39Q9up_-TO6FKhH44pcAM1x6n_Cuj15qKoLoFihUVg@mail.gmail.com http://www.postgresql.org/message-id/562DA711.3020305@2ndquadrant.com http://git.postgresql.org/pg/commitdiff/c15898c1d5d53602de097905a90f3dd176e8e7fd - Fix secondary expected output for commit_ts test Per red wall in buildfarm http://git.postgresql.org/pg/commitdiff/dbe6f434ee1852f08c011065467a6cfc5ce10864 Robert Haas pushed: - Make Gather node projection-capable. The original Gather code failed to mark a Gather node as not able to do projection, but it couldn't, even though it did call initialize its projection info via ExecAssignProjectionInfo. There doesn't seem to be any good reason for this node not to have projection capability, so clean things up so that it does. Without this, plans using Gather nodes might need to carry extra Result nodes to do projection. http://git.postgresql.org/pg/commitdiff/8538a6307049590ddb5ba127b2ecac6308844d60 - Fix incorrect message in ATWrongRelkindError. Mistake introduced by commit 3bf3ab8c563699138be02f9dc305b7b77a724307. Etsuro Fujita http://git.postgresql.org/pg/commitdiff/9dcce7123e1b0012fcf7f8b8761b34aebb66986d - Add missing serial comma, for consistency. Amit Langote, per Etsuro Fujita http://git.postgresql.org/pg/commitdiff/d45565162494c75eae91481eda17dc0c8ecab5db - Fix typo in bgworker.c http://git.postgresql.org/pg/commitdiff/c6baec92fc48387da8164d50f5699a7162267718 - Update parallel executor support to reuse the same DSM. Commit b0b0d84b3d663a148022e900ebfc164284a95f55 purported to make it possible to relaunch workers using the same parallel context, but it had an unpleasant race condition: we might reinitialize after the workers have sent their last control message but before they have dettached the DSM, leaving to crashes. Repair by introducing a new ParallelContext operation, ReinitializeParallelDSM. Adjust execParallel.c to use this new support, so that we can rescan a Gather node by relaunching workers but without needing to recreate the DSM. Amit Kapila, with some adjustments by me. Extracted from latest parallel sequential scan patch. http://git.postgresql.org/pg/commitdiff/3a1f8611f2582df0a16bcd35caed2e1526387643 - doc: security_barrier option is a Boolean, not a string. Mistake introduced by commit 5bd91e3a835b5d5499fee5f49fc7c0c776fe63dd. Hari Babu http://git.postgresql.org/pg/commitdiff/c5057b2b34813ca114bc808cb56b7a7fcde64393 Peter Eisentraut pushed: - Message style improvements. Message style, plurals, quoting, spelling, consistency with similar messages http://git.postgresql.org/pg/commitdiff/a8d585c0915939a42acdb529d8e0eb832935d45f - Remove some remains from Alpha support removal http://git.postgresql.org/pg/commitdiff/c5130e8ee09e5ae605f3aa944a31dd9021c1d3dd Tom Lane pushed: - Docs: add example clarifying use of nested JSON containment. Show how this can be used in practice to make queries simpler and more flexible. Also, draw an explicit contrast to the existence operator, which doesn't work that way. Peter Geoghegan and Tom Lane http://git.postgresql.org/pg/commitdiff/23937a4253490bf0c06aef0b8658270176f52de4 - Implement lookbehind constraints in our regular-expression engine. A lookbehind constraint is like a lookahead constraint in that it consumes no text; but it checks for existence (or nonexistence) of a match *ending* at the current point in the string, rather than one *starting* at the current point. This is a long-requested feature since it exists in many other regex libraries, but Henry Spencer had never got around to implementing it in the code we use. Just making it work is actually pretty trivial; but naive copying of the logic for lookahead constraints leads to code that often spends O(N^2) time to scan an N-character string, because we have to run the match engine from string start to the current probe point each time the constraint is checked. In typical use-cases a lookbehind constraint will be written at the start of the regex and hence will need to be checked at every character --- so O(N^2) work overall. To fix that, I introduced a third copy of the core DFA matching loop, paralleling the existing longest() and shortest() loops. This version, matchuntil(), can suspend and resume matching given a couple of pointers' worth of storage space. So we need only run it across the string once, stopping at each interesting probe point and then resuming to advance to the next one. I also put in an optimization that simplifies one-character lookahead and lookbehind constraints, such as "(?=x)" or "(?<!\w)", into AHEAD and BEHIND constraints, which already existed in the engine. This avoids the overhead of the LACON machinery entirely for these rather common cases. The net result is that lookbehind constraints run a factor of three or so slower than Perl's for multi-character constraints, but faster than Perl's for one-character constraints ... and they work fine for variable-length constraints, which Perl gives up on entirely. So that's not bad from a competitive perspective, and there's room for further optimization if anyone cares. (In reality, raw scan rate across a large input string is probably not that big a deal for Postgres usage anyway; so I'm happy if it's linear.) http://git.postgresql.org/pg/commitdiff/12c9a04008870c283931d6b3b648ee21bbc2cfda Kevin Grittner pushed: - Fix serialization anomalies due to race conditions on INSERT. On insert the CheckForSerializableConflictIn() test was performed before the page(s) which were going to be modified had been locked (with an exclusive buffer content lock). If another process acquired a relation SIReadLock on the heap and scanned to a page on which an insert was going to occur before the page was so locked, a rw-conflict would be missed, which could allow a serialization anomaly to be missed. The window between the check and the page lock was small, so the bug was generally not noticed unless there was high concurrency with multiple processes inserting into the same table. This was reported by Peter Bailis as bug #11732, by Sean Chittenden as bug #13667, and by others. The race condition was eliminated in heap_insert() by moving the check down below the acquisition of the buffer lock, which had been the very next statement. Because of the loop locking and unlocking multiple buffers in heap_multi_insert() a check was added after all inserts were completed. The check before the start of the inserts was left because it might avoid a large amount of work to detect a serialization anomaly before performing the all of the inserts and the related WAL logging. While investigating this bug, other SSI bugs which were even harder to hit in practice were noticed and fixed, an unnecessary check (covered by another check, so redundant) was removed from heap_update(), and comments were improved. Back-patch to all supported branches. Kevin Grittner and Thomas Munro http://git.postgresql.org/pg/commitdiff/585e2a3b1a57cd7f763a9203e77563c729d6104e == Rejected Patches (for now) == No one was disappointed this week :-) == Pending Patches == Zeus Kronion sent in a patch to fix an issue with parallel workers in pg_dump. Haribabu Kommi sent in another revision of a patch to implement multi-tenancy with RLS. Victor Wagner sent in another revision of a patch to implement failover at the libpq connect level. Ashutosh Bapat sent in three more revisions of a patch to get sorted data from a foreign server. Nathan Wagner and David Fetter sent in two revisions of a patch to add fortnights as a unit of time measurement. Robert Haas sent in a patch to modify tqueue infrastructure to support transient record types. Valery Popov sent in a patch to add a max_recursion_depth parameter to blunt the effects of out-of-control WITH RECURSIVE queries. Michael Paquier sent in another revision of a patch to allow showing tuple data in the pageinspect contrib extension. David Rowley sent in a patch to make tlist_matches_tupdesc() more efficient. Marko Tiikkaja sent in a patch to add \pset true/false to psql. Marko Tiikkaja sent in a patch to add a new aggregate, onlyvalue, which returns the single distinct non-NULL value from the input values and raises an exception if some number other than one distinct non-NULL value exists. Rahila Syed sent in another revision of a patch to implement a vacuum progress checker. Pavel Stěhule sent in another revision of a patch to implement ereport() in PL/PythonU. Stas Kelvich sent in another revision of a patch to add KNN support to the cube contrib extension. Alexander Korotkov sent in two more revisions of a patch to move PinBuffer and UnpinBuffer to atomics. SAWADA Masahiko sent in two more revisions of a patch to add a "frozen" bit to the visibility map. Amit Langote sent in another revision of a patch to implement declarative partitioning. Pavel Stěhule sent in another revision of a patch to enhance the types usable in PL/pgsql. Fabien COELHO sent in another revision of a patch to extend pgbench expressions with functions. Jim Nasby sent in a patch to install config/missing. Konstantin Knizhnik sent in a patch to add an extensible transaction manager API. Marko Tiikkaja sent in a patch to allow COPY (query) to use INSERT/UPDATE/DELETE...RETURNING in addition to SELECT, TABLE, and VALUES. Pavel Stěhule sent in another revision of a patch to add an optional --group-command parameter to psql, which lets it execute multiple commands from the shell command line. Peter Geoghegan sent in a patch to correct a comment in strxfrm cache. Alexander Lebedev sent in a patch to add support for box type in SP-GiST index. Dean Rasheed sent in a patch to add trigonometric functions that take degree measurements as inputs.
pgsql-announce by date: