== PostgreSQL Weekly News - June 15 2014 ==
От | David Fetter |
---|---|
Тема | == PostgreSQL Weekly News - June 15 2014 == |
Дата | |
Msg-id | 20140616024945.GB29714@fetter.org обсуждение исходный текст |
Список | pgsql-announce |
== PostgreSQL Weekly News - June 15 2014 == PgDay Portland, Oregon 2014 will be held Saturday September 6, 2014. https://wiki.postgresql.org/wiki/PDXPUGDay2014 == PostgreSQL Jobs for June == http://archives.postgresql.org/pgsql-jobs/2014-06/threads.php == PostgreSQL Local == The first Swiss Postgres Conference will be on June 24th, 2014 at the HSR Hochschule für Technik Rapperswil. http://www.postgres-conference.ch/ Char(14) and PGday UK will be held July 8 and 9, 2014. http://www.char14.info http://postgresqlusergroup.org.uk/ The sixth PGDay Cubano be held on 13 and 14 October 2014 in Habana. https://postgresql.uci.cu/?p=380 Postgres Open 2014 will be in Chicago, IL, USA, September 17-19. The CfP is open! http://postgresopen.org/2014/callforpapers/ PostgreSQL Conference Europe 2014 will be held on October 21-24 in Madrid, Spain, at the Hotel Miguel Angel. http://2014.pgconf.eu/ == 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 == Alvaro Herrera pushed: - Wrap multixact/members correctly during extension, take 2. In a50d97625497b7 I already changed this, but got it wrong for the case where the number of members is larger than the number of entries that fit in the last page of the last segment. As reported by Serge Negodyuck in a followup to bug #8673. http://git.postgresql.org/pg/commitdiff/b0b263baab3e927fe4b4f35755b91ac8d1db8fe0 - Fix typos http://git.postgresql.org/pg/commitdiff/7937910781a823382b3f76b4b811791804431927 Tom Lane pushed: - Fix infinite loop when splitting inner tuples in SPGiST text indexes. Previously, the code used a node label of zero both for strings that contain no bytes beyond the inner tuple's prefix, and for cases where an "allTheSame" inner tuple has to be split to allow a string with a different next byte to be inserted into it. Failing to distinguish these cases meant that if a string ending with the current prefix needed to be inserted into an allTheSame tuple, we got into an infinite loop, because after splitting the tuple we'd descend into the child allTheSame tuple and then find we need to split again. To fix, instead use -1 and -2 as the node labels for these two cases. This requires widening the node label type from "char" to int2, but fortunately SPGiST stores all pass-by-value node label types in their Datum representation, which means that this change is transparently upward compatible so far as the on-disk representation goes. We continue to recognize zero as a dummy node label for reading purposes, but will not attempt to push new index entries down into such a label, so that the loop won't occur even when dealing with an existing index. Per report from Teodor Sigaev. Back-patch to 9.2 where the faulty code was introduced. http://git.postgresql.org/pg/commitdiff/c170655cc81fd5e3c152e951c52247171bb57611 - Forward-port regression test for bug #10587 into 9.3 and HEAD. Although this bug is already fixed in post-9.2 branches, the case triggering it is quite different from what was under consideration at the time. It seems worth memorializing this example in HEAD just to make sure it doesn't get broken again in future. Extracted from commit 187ae17300776f48b2bd9d0737923b1bf70f606e. http://git.postgresql.org/pg/commitdiff/ab76208e3df6841b3770edeece57d0f048392237 - Stamp HEAD as 9.5devel. Let the hacking begin ... http://git.postgresql.org/pg/commitdiff/a24c104b9a6e4fef0892b2a0b70f4073378e6544 - Stamp shared-library minor version numbers for 9.5. http://git.postgresql.org/pg/commitdiff/3bd82dd39eb80587b53f7a3af33bf8b2d49632af - Fix ancient encoding error in hungarian.stop. When we grabbed this file off the Snowball project's website, we mistakenly supposed that it was in LATIN1 encoding, but evidently it was actually in LATIN2. This resulted in ő (o-double-acute, U+0151, which is code 0xF5 in LATIN2) being misconverted into õ (o-tilde, U+00F5), as complained of in bug #10589 from Zoltán Sörös. We'd have messed up u-double-acute too, but there aren't any of those in the file. Other characters used in the file have the same codes in LATIN1 and LATIN2, which no doubt helped hide the problem for so long. The error is not only ours: the Snowball project also was confused about which encoding is required for Hungarian. But dealing with that will require source-code changes that I'm not at all sure we'll wish to back-patch. Fixing the stopword file seems reasonably safe to back-patch however. http://git.postgresql.org/pg/commitdiff/fd90b5d574f7b882a35fe345359643cb1ff2e67e - Remove unnecessary output expressions from unflattened subqueries. If a sub-select-in-FROM gets flattened into the upper query, then we naturally get rid of any output columns that are defined in the sub-select text but not actually used in the upper query. However, this doesn't happen when it's not possible to flatten the subquery, for example because it contains GROUP BY, LIMIT, etc. Allowing the subquery to compute useless output columns is often fairly harmless, but sometimes it has significant performance cost: the unused output might be an expensive expression, or it might be a Var from a relation that we could remove entirely (via the join-removal logic) if only we realized that we didn't really need that Var. Situations like this are common when expanding views, so it seems worth taking the trouble to detect and remove unused outputs. Because the upper query's Var numbering for subquery references depends on positions in the subquery targetlist, we don't want to renumber the items we leave behind. Instead, we can implement "removal" by replacing the unwanted expressions with simple NULL constants. This wastes a few cycles at runtime, but not enough to justify more work in the planner. http://git.postgresql.org/pg/commitdiff/55d5b3c08279b487cfa44d4b6e6eea67a0af89e4 - Rename lo_create(oid, bytea) to lo_from_bytea(). The previous naming broke the query that libpq's lo_initialize() uses to collect the OIDs of the server-side functions it requires, because that query effectively assumes that there is only one function named lo_create in the pg_catalog schema (and likewise only one lo_open, etc). While we should certainly make libpq more robust about this, the naive query will remain in use in the field for the foreseeable future, so it seems the only workable choice is to use a different name for the new function. lo_from_bytea() won a small straw poll. Back-patch into 9.4 where the new function was introduced. http://git.postgresql.org/pg/commitdiff/154146d208de7518bb6c8131dc8d2361f7f36f56 - Add regression test to prevent future breakage of legacy query in libpq. Memorialize the expected output of the query that libpq has been using for many years to get the OIDs of large-object support functions. Although we really ought to change the way libpq does this, we must expect that this query will remain in use in the field for the foreseeable future, so until we're ready to break compatibility with old libpq versions we'd better check the results stay the same. See the recent lo_create() fiasco. http://git.postgresql.org/pg/commitdiff/2dd352d4b01648cac0354c754d9617b2e61f065d - Remove inadvertent copyright violation in largeobject regression test. Robert Frost is no longer with us, but his copyrights still are, so let's stop using "Stopping by Woods on a Snowy Evening" as test data before somebody decides to sue us. Wordsworth is more safely dead. http://git.postgresql.org/pg/commitdiff/d2783bee3045d6190dcff0ccf985c4e60a660f99 - Preserve exposed type of subquery outputs when substituting NULLs. I thought I could get away with hardcoded int4 here, but the buildfarm says differently. http://git.postgresql.org/pg/commitdiff/9d4444a6fc011b7e2ca16386cf9f1c9f25c114e5 - Adjust largeobject regression test to leave a couple of LOs behind. Since we commonly test pg_dump/pg_restore by seeing whether they can dump and restore the regression test database, it behooves us to include some large objects in that test scenario. I tried to include a comment on one of these large objects to improve the test scenario further ... but it turns out that pg_upgrade fails to preserve comments on large objects, and its regression test notices the discrepancy. So uncommenting that COMMENT is a TODO for later. http://git.postgresql.org/pg/commitdiff/70ad7ed4e88d9de3273f2f875cfaa044a35dfa97 - Improve tuplestore's error messages for I/O failures. We should report the errno when we get a failure from functions like BufFileWrite. "ERROR: write failed" is unreasonably taciturn for a case that's well within the realm of possibility; I've seen it a couple times in the buildfarm recently, in situations that were probably out-of-disk-space, but it'd be good to see the errno to confirm it. I think this code was originally written without assuming that the buffile.c functions would return useful errno; but most other callers *are* assuming that, and a quick look at the buffile code gives no reason to suppose otherwise. Also, a couple of the old messages were phrased on the assumption that a short read might indicate a logic bug in tuplestore itself; but that code's pretty well tested by now, so a filesystem-level problem seems much more likely. http://git.postgresql.org/pg/commitdiff/6554656ea2043c5bb877b427237dc5ddd7c5e5c8 - Fix pg_restore's processing of old-style BLOB COMMENTS data. Prior to 9.0, pg_dump handled comments on large objects by dumping a bunch of COMMENT commands into a single BLOB COMMENTS archive object. With sufficiently many such comments, some of the commands would likely get split across bufferloads when restoring, causing failures in direct-to-database restores (though no problem would be evident in text output). This is the same type of issue we have with table data dumped as INSERT commands, and it can be fixed in the same way, by using a mini SQL lexer to figure out where the command boundaries are. Fortunately, the COMMENT commands are no more complex to lex than INSERTs, so we can just re-use the existing lexer for INSERTs. Per bug #10611 from Jacek Zalewski. Back-patch to all active branches. http://git.postgresql.org/pg/commitdiff/c81e63d85f0c2c39d3fdfd8b95fc1ead6fdcb89f - Improve predtest.c's ability to reason about operator expressions. We have for a long time been able to prove implications and refutations between clauses structured like "expr op const" with the same subexpression and btree-related operators; for example that "x < 4" implies "x <= 5". The implication machinery is needed to detect usability of partial indexes, and the refutation machinery is needed to implement constraint exclusion. This patch extends that machinery to make proofs for operator expressions involving the same two immutable-but-not-necessarily-just-Const input expressions, ie does "expr1 op1 expr2" prove or refute "expr1 op2 expr2" or "expr2 op2 expr1"? An important example is that we can now prove "x = y" given "y = x", which formerly the code could not deduce unless x or y was a constant. We can make use of the system's knowledge of operator commutator and negator pairs, and can also make use of btree opclass relationships, for example "x < y" implies "x <= y" and refutes "x > y" (notice that neither of these could be proven just from commutator or negator links). Inspired by a gripe from Brian Dunavant. This seems more like a new feature than a bug fix, though, so no back-patch. http://git.postgresql.org/pg/commitdiff/3f8c23c4d31d4a0e801041733deb2c7cfa577b32 Fujii Masao pushed: - Fix typos in comments. http://git.postgresql.org/pg/commitdiff/a26ae56f5173f1f8990ccf134730b964506f29ba Noah Misch pushed: - Consistently define BUILDING_DLL during builds of src/port for Windows. The MSVC build process already did so; this fixes the principal build process to match. Both processes already did likewise for src/common. This lets server builds of src/port reference postgres.exe data symbols. http://git.postgresql.org/pg/commitdiff/bd31794df7dc53719740aa8e2ea1578ea2b87285 - Fix typos in comments. http://git.postgresql.org/pg/commitdiff/d098b236f301d8e805f3c4d7fe940230c65d7a88 - Have configuration templates augment, not replace, LDFLAGS. This preserves user-specified LDFLAGS; we already kept user-specified CFLAGS and CPPFLAGS. Given the shortage of complaints and the fact that any problem caused is likely to appear at build time, no back-patch. Dag-Erling Smørgrav and Noah Misch http://git.postgresql.org/pg/commitdiff/4d92b158555452ba62ee3caf5c5546fd4a8cba5b - Harden pg_filenode_relation test against concurrent DROP TABLE. Per buildfarm member prairiedog. Back-patch to 9.4, where the test was introduced. Reviewed by Tom Lane. http://git.postgresql.org/pg/commitdiff/f3fdd257a430ff581090740570af9f266bb893e3 - Adjust 9.4 release notes. Back-patch to 9.4. http://git.postgresql.org/pg/commitdiff/a7205d81573cb0c979f2d463a1d9edb6f97c94aa - emacs.samples: Reliably override ".dir-locals.el". Back-patch to 9.4, where .dir-locals.el was introduced. http://git.postgresql.org/pg/commitdiff/81300ea4443766aad2631fad8d02d09dd66954a2 - Add mkdtemp() to libpgport. This function is pervasive on free software operating systems; import NetBSD's implementation. Back-patch to 8.4, like the commit that will harness it. http://git.postgresql.org/pg/commitdiff/9e6b1bf258170e62dac555fc82ff0536dfe01d29 Andres Freund pushed: - Consistency improvements for slot and decoding code. Change the order of checks in similar functions to be the same; remove a parameter that's not needed anymore; rename a memory context and expand a couple of comments. Per review comments from Amit Kapila http://git.postgresql.org/pg/commitdiff/e04a9ccd2ccd6e31cc4af6b08257a0a186d0fce8 Heikki Linnakangas pushed: - Change the signature of rm_desc so that it's passed a XLogRecord. Just feels more natural, and is more consistent with rm_redo. http://git.postgresql.org/pg/commitdiff/0ef0b6784c7d7258cae314cb46558873edaf9c0a == Rejected Patches (for now) == No one was disappointed this week :-) == Pending Patches == Ian Lawrence Barwick sent in a patch to add RETURNING PRIMARY KEY syntax for DML. MauMau sent in two revisions of a patch to fix a memory leak in contrib/dblink. Furuya Osamu sent in another revision of a patch to add a synchronous mode to pg_receivexlog. Gurjeet Singh sent in two revisions of a patch to add a GUC to control a child backend's oom_score_adj. Heikki Linnakangas sent in a patch to invent a new internal API for interfacing with SSL, which allows a non-OpenSSL implementation, and another patch to implement same with Windows SChannel. Fabrízio de Royes Mello sent in a patch to implement ALTER TABLE ... SET LOGGED. Sergey Muraviov sent in another revision of a patch to fix wrapping in extended mode in the default pager for psql. Fujii Masao sent in a patch to add a log_replication_command GUC, which causes replication commands to be logged. David Johnston sent in a doc patch for setting configuration parameters. Christoph Berg sent in a patch to fix some lacunae in DSM. SAWADA Masahiko sent in a patch to add line number as prompt option to psql. Noah Misch sent in a patch to fix an issue which arises when conflicting LDAP libraries have been loaded. Jaime Casanova sent in a patch to move the reloptions of views into its own structure. Noah Misch sent in a patch to add a check for that mapping relation oids to filenodes and back is done correctly. Amit Kapila sent in another revision of a patch to prohibit ALTER SYSTEM from setting the data directory, which could result in a recursive definition. Kyotaro HORIGUCHI sent in a patch to make PG to use index for longer pathkeys than index columns when all of the following conditions hold: the index is a unique index; all index columns are NOT NULL, and the index column list is a subset of query_pathkeys. Michael Paquier sent in a patch to add a buffer capture facility to check the consistency of WAL replay. Abhijit Menon-Sen sent in a patch to introduce a function XLogLockBlockRangeForCleanup(). Heikki Linnakangas sent in another revision of a patch to implement CSN-based snapshots. Kyotaro HORIGUCHI sent in a patch to add the function to clear backup location information to pg_resetxlog. Rahila Syed sent in a patch to do compression of full-page writes in the WAL using the pglz, lz4 and snappy algorithms. Quan Zongliang sent in a patch to extend PL/pgSQL to define multi variables once, assigning only the last if an assignment is included. Fujii Masao sent in a patch to make log_disconnections PGC_SUSET rather than PGC_BACKEND. Alvaro Herrera sent in a patch to enable replicating DROP commands across servers in logical replication. Alvaro Herrera sent in a patch to make ALTER TABLESPACE MOVE a separate command tag. Petr (PJMODOS) Jelinek sent in a patch to implement a function called varwidth_bucket which does binning with variable bucket width. Petr (PJMODOS) Jelinek sent in a patch to make it possible to change the system identifier of the cluster in pg_control. Kaigai Kouhei sent in another revision of a patch to implement a custom plan API. Alvaro Herrera sent in another revision of a patch to add CREATE support to event triggers. Gurjeet Singh sent in another revision of a patch to implement pg_hibernator. Heikki Linnakangas sent in two more revisions of a patch to change the WAL format and API. Alvaro Herrera sent in a patch to fix a crash which happens when assertions are disabled and WAL_DEBUG turned on. Alvaro Herrera sent in another revision of a patch to implement min_max indexes. Kevin Grittner sent in a patch to add delta relations in AFTER triggers.
В списке pgsql-announce по дате отправления: