== PostgreSQL Weekly News - May 11 2014 == - Mailing list pgsql-announce
From | David Fetter |
---|---|
Subject | == PostgreSQL Weekly News - May 11 2014 == |
Date | |
Msg-id | 20140512054622.GB24884@fetter.org Whole thread Raw |
List | pgsql-announce |
== PostgreSQL Weekly News - May 11 2014 == == PostgreSQL Product News == pgBadger 5.1, a parallel PostgreSQL log analyzer written in Perl, released: https://sourceforge.net/projects/pgbadger/ Development: https://github.com/dalibo/pgbadger/ == PostgreSQL Jobs for May == http://archives.postgresql.org/pgsql-jobs/2014-05/threads.php == PostgreSQL Local == PGCon 2014, the world-wide developer conference for PostgreSQL, will be in Ottawa, Ontario, Canada May 20-24, 2014. http://www.pgcon.org/2014/ 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 == Heikki Linnakangas pushed: - Use Size instead of uint32 to store result of sizeof(). Silences coverity and is more consistent with other functions in the same file. Andres Freund http://git.postgresql.org/pg/commitdiff/c83457683968e2263d7e6bcdcdd52d472f9b0f8d - Don't leak memory after connection aborts in pg_recvlogical. Andres Freund, noticed by coverity. http://git.postgresql.org/pg/commitdiff/329de9fa983debc941ebd79f335f2574b72a3694 - Pass sensible value to memset() when randomizing reorderbuffer's tuple slab. This is entirely harmless, but still wrong. Noticed by coverity. Andres Freund http://git.postgresql.org/pg/commitdiff/377790fbd707b41bdf2264fe6c217e903e241f7c - Assert that pre/post-fix updated tuples are on the same page during replay. If they were not 'oldtup.t_data' would be dereferenced while set to NULL in case of a full page image for block 0. Do so primarily to silence coverity; but also to make sure this prerequisite isn't changed without adapting the replay routine as that would appear to work in many cases. Andres Freund http://git.postgresql.org/pg/commitdiff/1460b199e6e748712253fa130d1c3368ba6ac861 - Replace SYSTEMQUOTEs with Windows-specific wrapper functions. It's easy to forget using SYSTEMQUOTEs when constructing command strings for system() or popen(). Even if we fix all the places missing it now, it is bound to be forgotten again in the future. Introduce wrapper functions that do the the extra quoting for you, and get rid of SYSTEMQUOTEs in all the callers. We previosly used SYSTEMQUOTEs in all the hard-coded command strings, and this doesn't change the behavior of those. But user-supplied commands, like archive_command, restore_command, COPY TO/FROM PROGRAM calls, as well as pgbench's \shell, will now gain an extra pair of quotes. That is desirable, but if you have existing scripts or config files that include an extra pair of quotes, those might need to be adjusted. Reviewed by Amit Kapila and Tom Lane http://git.postgresql.org/pg/commitdiff/a692ee5870f0f442565b4c4bff367094599e9bdf - Fix use of free in walsender error handling after a sysid mismatch. Found via valgrind. The bug exists since the introduction of the walsender, so backpatch to 9.0. Andres Freund http://git.postgresql.org/pg/commitdiff/3a8e9e977fa642433986e5cd145e3a6f86601c2c - Fix build after removing JsonbValue.estSize field. Oops, I didn't realize that contrib/hstore refers to jsonb stuff. http://git.postgresql.org/pg/commitdiff/7572b7735971cd7a5ef289e133eedf7d82f79c42 - Clean up jsonb code. The main target of this cleanup is the convertJsonb() function, but I also touched a lot of other things that I spotted into in the process. The new convertToJsonb() function uses an output buffer that's resized on demand, so the code to estimate of the size of JsonbValue is removed. The on-disk format was not changed, even though I refactored the structs used to handle it. The term "superheader" is replaced with "container". The jsonb_exists_any and jsonb_exists_all functions no longer sort the input array. That was a premature optimization, the idea being that if there are duplicates in the input array, you only need to check them once. Also, sorting the array saves some effort in the binary search used to find a key within an object. But there were drawbacks too: the sorting and deduplicating obviously isn't free, and in the typical case there are no duplicates to remove, and the gain in the binary search was minimal. Remove all that, which makes the code simpler too. This includes a bug-fix; the total length of the elements in a jsonb array or object mustn't exceed 2^28. That is now checked. http://git.postgresql.org/pg/commitdiff/364ddc3e5cbd01c93a39896b5260509129a9883e - Include files copied from libpqport in .gitignore. Michael Paquier http://git.postgresql.org/pg/commitdiff/02c9a938057ecb811c65999577d32c5f5e9c99dc - Protect against torn pages when deleting GIN list pages. To-be-deleted list pages contain no useful information, as they are being deleted, but we must still protect the writes from being torn by a crash after a partial write. To do that, re-initialize the pages on WAL replay. Jeff Janes caught this with a test program to test partial writes. Backpatch to all supported versions. http://git.postgresql.org/pg/commitdiff/4f7bb4b2a36facc94a1d6b821ec6733093aa9bc6 - Avoid some pnstrdup()s when constructing jsonb. This speeds up text to jsonb parsing and hstore to jsonb conversions somewhat. http://git.postgresql.org/pg/commitdiff/d3c72e23df6ef1fde8122db589d12d49c8495535 - Minor cleanup of jsonb_util.c. Move the functions around to group related functions together. Remove binequal argument from lengthCompareJsonbStringValue, moving that responsibility to lengthCompareJsonbPair. Fix typo in comment. http://git.postgresql.org/pg/commitdiff/ff7bbb0176a667aeb0577e4d48d651ffdb6afd50 - More jsonb cleanup. Fix JSONB_MAX_ELEMS and JSONB_MAX_PAIRS macros to use CB_MASK in the calculation. JENTRY_POSMASK happens to have the same value at the moment, but that's just coincidental. Refactor jsonb iterator functions, for readability. Get rid of the JENTRY_ISFIRST flag. Whenever we handle JEntrys, we have access to the whole array and have enough context information to know which entry is the first. This frees up one bit in the JEntry header for future use. While we're at it, shuffle the JEntry bits so that boolean true and false go together, for aesthetic reasons. Bump catalog version as this changes the on-disk format slightly. http://git.postgresql.org/pg/commitdiff/d9daff0e0cb15221789e6c50d9733c8754c054fb - Fix bug in lossy-page handling in GIN. When returning rows from a bitmap, as done with partial match queries, we would get stuck in an infinite loop if the bitmap contained a lossy page reference. This bug is new in master, it was introduced by the patch to allow skipping items refuted by other entries in GIN scans. Report and fix by Alexander Korotkov http://git.postgresql.org/pg/commitdiff/866e6e1d04d4ae9615bd1899a757dae0191e9c77 Robert Haas pushed: - doc: In FDW handler docs, mark up scan_clauses with <literal>. Etsuro Fujita http://git.postgresql.org/pg/commitdiff/c70cc9afb3c561addeab805b15352d5ffb6d8f38 - Fix logic bug in dsm_attach(). The previous coding would potentially cause attaching to segment A to fail if segment B was at the same time in the process of going away. Andres Freund, with a comment tweak by me http://git.postgresql.org/pg/commitdiff/e0124230ba2b6778671f26b06af0d8d04bcb4d1c - Never crash-and-restart for bgworkers without shared memory access. The motivation for a crash and restart cycle when a backend dies is that it might have corrupted shared memory on the way down; and we can't recover reliably except by reinitializing everything. But that doesn't apply to processes that don't touch shared memory. Currently, there's nothing to prevent a background worker that doesn't request shared memory access from touching shared memory anyway, but that's a separate bug. Previous to this commit, the coding in postmaster.c was inconsistent: an exit status other than 0 or 1 didn't provoke a crash-and-restart, but failure to release the postmaster child slot did. This change makes those cases consistent. http://git.postgresql.org/pg/commitdiff/e2ce9aa27bf20eff2d991d0267a15ea5f7024cd7 - Detach shared memory from bgworkers without shmem access. Since the postmaster won't perform a crash-and-restart sequence for background workers which don't request shared memory access, we'd better make sure that they can't corrupt shared memory. Patch by me, review by Tom Lane. http://git.postgresql.org/pg/commitdiff/4d155d8b08fe08c1a1649fdbad61c6dcf4a8671f - Restart bgworkers immediately after a crash-and-restart cycle. Just as we would start bgworkers immediately after an initial startup of the server, we should restart them immediately when reinitializing. Petr Jelinek and Robert Haas http://git.postgresql.org/pg/commitdiff/970d1f76d1600dfbdbd9cd88a9e2af113e253798 - When a bgworker exits, always call ReleasePostmasterChildSlot. Commit e2ce9aa27bf20eff2d991d0267a15ea5f7024cd7 was insufficiently well thought out. Repair. http://git.postgresql.org/pg/commitdiff/eee6cf1f337aa488a20e9111df446cdad770e645 - When a background worker exists with code 0, unregister it. The previous behavior was to restart immediately, which was generally viewed as less useful. Petr Jelinek, with some adjustments by me. http://git.postgresql.org/pg/commitdiff/be7558162acc5578d0b2cf0c8d4c76b6076ce352 - Remove overeager assertion in logical_heap_begin_rewrite. It's legal to configure wal_level=logical and max_replication_slots=0 simultaneously. Andres Freund http://git.postgresql.org/pg/commitdiff/b2dada8f5f90ab015ca8a62b46261ef01a7c781f - Code review for logical decoding patch. Post-commit review identified a number of places where addition was used instead of multiplication or memory wasn't zeroed where it should have been. This commit also fixes one case where a structure member was mis-initialized, and moves another memory allocation closer to the place where the allocated storage is used for clarity. Andres Freund http://git.postgresql.org/pg/commitdiff/f1d8dd3647fd0c87f0fb238f7cfc45c1ce282a55 Bruce Momjian pushed: - Update 9.4 release notes with feedback from the hackers list http://git.postgresql.org/pg/commitdiff/5b8de6d4676ed9eb6df4685deb601be3db4eaa24 - Update "huge pages" description in the 9.4 release notes http://git.postgresql.org/pg/commitdiff/f8db074049be74fa100b4f97d09ee76222660e7c - Add SGML markup tags to 9.4 release notes http://git.postgresql.org/pg/commitdiff/b2f7bd72c4d3e80065725c72e85778d5f4bdfd4a - Add doc links to 9.4 release notes, and add major features list http://git.postgresql.org/pg/commitdiff/a64560d994faab23b76848b4e95027b7b11ad9a7 - Improve JSONB 9.4 release text http://git.postgresql.org/pg/commitdiff/49c683bafda8659b885b2b119042e16cba1f702a - In 9.4 release notes, add detail to pg_stat_statements items http://git.postgresql.org/pg/commitdiff/60832ea39d670cb6c39081e31ad175e0e1c555f8 - Move pg_stat_statements into its on 9.4 release note section http://git.postgresql.org/pg/commitdiff/a1c287a3836ff47e7ea01c82aceba75f15ba7c91 - Update 9.4 release notes for queryid control http://git.postgresql.org/pg/commitdiff/768fb0032655e37810ab37a22f870af85ab1108c - More rewording of pg_stat_statements for 9.4 release notes. Report by Amit Langote http://git.postgresql.org/pg/commitdiff/47faae931686536cfbd5dd70f347e4e658c5ebcc - Update typedef list in preparation for pgindent run http://git.postgresql.org/pg/commitdiff/284c464b9f7a47e3c4559a1ced75ff3dcb697e36 - Fix detection of short tar files, broken by commit 14ea89366fe321609afc5838ff9fe2ded1cd707d. Report by Noah Misch http://git.postgresql.org/pg/commitdiff/55d5ff825fae0ee9a1114a17fcd97a3e360a23b0 - Adjust pgindent to remove tabs after periods in C comments. http://git.postgresql.org/pg/commitdiff/fb85cd4320414c3f6e9c8bc69ec944200ae1e493 - pgindent run for 9.4. This includes removing tabs after periods in C comments, which was applied to back branches, so this change should not effect backpatching. http://git.postgresql.org/pg/commitdiff/0a7832005792fa6dad171f9cadb8d587fe0dd800 - Fix improperly passed file descriptors. Fix for commit 14ea89366fe321609afc5838ff9fe2ded1cd707d Report by Andres Freund http://git.postgresql.org/pg/commitdiff/4335c958154c39ef99a38dc953b3f803b13a1048 - Properly detect read and write errors in pg_dump/dumpall, and pg_restore. Previously some I/O errors were ignored. http://git.postgresql.org/pg/commitdiff/14ea89366fe321609afc5838ff9fe2ded1cd707d - Improve pgindent test instructions http://git.postgresql.org/pg/commitdiff/7c7b1f4ae5ea3b1b113682d4d4e5af4356b053bc - Remove pgindent ecpg exclusion pattern. Report by Tom Lane http://git.postgresql.org/pg/commitdiff/9516668e48abcc5c036ecb199acf15e5bcc4b008 - With ecpg exclusion removed, re-run pgindent for 9.4. Report by Tom Lane http://git.postgresql.org/pg/commitdiff/84288a86ac74dbeae486b6ff699c017f7d9517bb - docs: Mark 9.4 release notes as current as of today http://git.postgresql.org/pg/commitdiff/ea78ce1d457d8e0fef01328219a1dfd89aeba7ae Tom Lane pushed: - Fix case of pg_dump -Fc to an unseekable file (such as a pipe). This was accidentally broken in commits cfa1b4a711/5e8e794e3b. It saves a line or so to call ftello unconditionally in _CloseArchive, but we have to expect that it might fail if we're not in hasSeek mode. Per report from Bernd Helmle. In passing, improve _getFilePos to print an appropriate message if ftello fails unexpectedly, rather than just a vague complaint about "ftell mismatch". http://git.postgresql.org/pg/commitdiff/e03485ae8a2025d5deea291ebb24412229cc2fe5 - Fix possible cache invalidation failure in ReceiveSharedInvalidMessages. Commit fad153ec45299bd4d4f29dec8d9e04e2f1c08148 modified sinval.c to reduce the number of calls into sinvaladt.c (which require taking a shared lock) by keeping a local buffer of collected-but-not-yet-processed messages. However, if processing of the last message in a batch resulted in a recursive call to ReceiveSharedInvalidMessages, we could overwrite that message with a new one while the outer invalidation function was still working on it. This would be likely to lead to invalidation of the wrong cache entry, allowing subsequent processing to use stale cache data. The fix is just to make a local copy of each message while we're processing it. Spotted by Andres Freund. Back-patch to 8.4 where the bug was introduced. http://git.postgresql.org/pg/commitdiff/0f928a85ecd509b165bfb9acd71b18c40063a7a0 - Fix pg_type.typlen for newly-revived line type. Commit 261c7d4b653bc3e44c31fd456d94f292caa50d8f removed the "m" field from struct LINE, but neglected to make pg_type.h's idea of the type's size match. This resulted in reading past the end of palloc'd LINE values when inserting them into tuples etc. In principle that could cause a SIGSEGV, though the odds of detectable problems seem low. Bump catversion since this makes an incompatible on-disk format change. Note that if the line type had been in use in the field, this would break pg_upgrade'ability of databases containing line values; but it seems unlikely that there are any (they'd have had to be compiled with -DENABLE_LINE_TYPE). Spotted by Andres Freund. http://git.postgresql.org/pg/commitdiff/3727afafeef69088456acc3f6257360315220a20 - Run autoconf in wake of commit a692ee5870f0f442565b4c4bff367094599e9bdf. Heikki updated configure.in but evidently forgot to include the updated configure script in the commit. Per buildfarm. http://git.postgresql.org/pg/commitdiff/9252b8eec27bbefbeae9d60d8cd4f6b8be80b861 - hash_any returns Datum, not uint32 (and definitely not "int"). The coding in JsonbHashScalarValue might have accidentally failed to fail given current representational choices, but the key word there would be "accidental". Insert the appropriate datatype conversion macro. And use the right conversion macro for hash_numeric's result, too. In passing make the code a bit cleaner and less repetitive by factoring out the xor step from the switch. http://git.postgresql.org/pg/commitdiff/2c22afaa4e29cbd773bae3f043a941f82ff30e2d - Fix some more confusion between uint32 and Datum. http://git.postgresql.org/pg/commitdiff/1891b415f0cf45d56f29af423598f8518754d675 - Fix failure to set ActiveSnapshot while rewinding a cursor. ActiveSnapshot needs to be set when we call ExecutorRewind because some plan node types may execute user-defined functions during their ReScan calls (nodeLimit.c does so, at least). The wisdom of that is somewhat debatable, perhaps, but for now the simplest fix is to make sure the required context is valid. Failure to do this typically led to a null-pointer-dereference core dump, though it's possible that in more complex cases a function could be executed with the wrong snapshot leading to very subtle misbehavior. Per report from Leif Jensen. It's been broken for a long time, so back-patch to all active branches. http://git.postgresql.org/pg/commitdiff/04e5025be8bbe572e12b19c4ba9e2a8360b8ffe5 - Avoid buffer bloat in libpq when server is consistently faster than client. If the server sends a long stream of data, and the server + network are consistently fast enough to force the recv() loop in pqReadData() to iterate until libpq's input buffer is full, then upon processing the last incomplete message in each bufferload we'd usually double the buffer size, due to supposing that we didn't have enough room in the buffer to finish collecting that message. After filling the newly-enlarged buffer, the cycle repeats, eventually resulting in an out-of-memory situation (which would be reported misleadingly as "lost synchronization with server"). Of course, we should not enlarge the buffer unless we still need room after discarding already-processed messages. This bug dates back quite a long time: pqParseInput3 has had the behavior since perhaps 2003, getCopyDataMessage at least since commit 70066eb1a1ad in 2008. Probably the reason it's not been isolated before is that in common environments the recv() loop would always be faster than the server (if on the same machine) or faster than the network (if not); or at least it wouldn't be slower consistently enough to let the buffer ramp up to a problematic size. The reported cases involve Windows, which perhaps has different timing behavior than other platforms. Per bug #7914 from Shin-ichi Morita, though this is different from his proposed solution. Back-patch to all supported branches. http://git.postgresql.org/pg/commitdiff/2f557167b19af79ffecb8faedf8b7bce4d48f3e1 - Allow for platforms that have optreset but not <getopt.h>. Reportedly, some versions of mingw are like that, and it seems plausible in general that older platforms might be that way. However, we'd determined experimentally that just doing "extern int" conflicts with the way Cygwin declares these variables, so explicitly exclude Cygwin. Michael Paquier, tweaked by me to hopefully not break Cygwin http://git.postgresql.org/pg/commitdiff/0c15a524c532c1006a7bd36d3a680f8e8b8db9fc - Fix comment. Previous commit was confused about the case we're handling: actually, what the patch is dealing with is platforms that have optreset, *and* have <getopt.h>, but the latter fails to declare the former. Because we use a linking probe to set HAVE_INT_OPTRESET, we need to be sure we have a declaration even if <getopt.h> doesn't think it exists. http://git.postgresql.org/pg/commitdiff/1e81f8462aceb07d520daaabdc999b879381bd12 - Revert "Auto-tune effective_cache size to be 4x shared buffers". This reverts commit ee1e5662d8d8330726eaef7d3110cb7add24d058, as well as a remarkably large number of followup commits, which were mostly concerned with the fact that the implementation didn't work terribly well. It still doesn't: we probably need some rather basic work in the GUC infrastructure if we want to fully support GUCs whose default varies depending on the value of another GUC. Meanwhile, it also emerged that there wasn't really consensus in favor of the definition the patch tried to implement (ie, effective_cache_size should default to 4 times shared_buffers). So whack it all back to where it was. In a followup commit, I'll do what was recently agreed to, which is to simply change the default to a higher value. http://git.postgresql.org/pg/commitdiff/a16d421ca4fc639929bc964b2585e8382cf16e33 - Increase the default value of effective_cache_size to 4GB. Per discussion, the old value of 128MB is ridiculously small on modern machines; in fact, it's not even any larger than the default value of shared_buffers, which it certainly should be. Increase to 4GB, which is unlikely to be any worse than the old default for anyone, and should be noticeably better for most. Eventually we might have an autotuning scheme for this setting, but the recent attempt crashed and burned, so for now just do this. http://git.postgresql.org/pg/commitdiff/b910d7ea358b0134d170ebf4002248df25a5f244 - Document permissions needed for pg_database_size and pg_tablespace_size. Back in 8.3, we installed permissions checks in these functions (see commits 8bc225e7990a and cc26599b7206). But we forgot to document that anywhere in the user-facing docs; it did get mentioned in the 8.3 release notes, but nobody's looking at that any more. Per gripe from Suya Huang. http://git.postgresql.org/pg/commitdiff/fb1974cc6b58cd21a269dd7ab8aea0120906ec3b - Fix missing dependencies in ecpg's test Makefiles. Ensure that ecpg preprocessor output files are rebuilt when re-testing after a change in the ecpg preprocessor itself, or a change in any of several include files that get copied verbatim into the output files. The lack of these dependencies was what created problems for Kevin Grittner after the recent pgindent run. There's no way for --enable-depend to discover these dependencies automatically, so we've gotta put them into the Makefiles by hand. While at it, reduce the amount of duplication in the ecpg invocations. http://git.postgresql.org/pg/commitdiff/14d309cc55d88b73d4c9d1fa51b535ae491405fd - Improve key representation for GIN jsonb_ops, and fix existence-search bug. Change the key representation so that values that would exceed 127 bytes are hashed into short strings, and so that the original JSON datatype of each value is recorded in the index. The hashing rule eliminates the major objection to having this opclass be the default for jsonb, namely that it could fail for plausible input data (due to GIN's restrictions on maximum key length). Preserving datatype information doesn't really buy us much right now, but it requires no extra space compared to the previous way, and it might be useful later. Also, change the consistency-checking functions to request recheck for exists (jsonb ? text) and related operators. The original analysis that this is an exactly checkable query was incorrect, since the index does not preserve information about whether a key appears at top level in the indexed JSON object. Add a test case demonstrating the problem. Make some other, mostly cosmetic improvements to the code in jsonb_gin.c as well. catversion bump due to on-disk data format change in jsonb_ops indexes. http://git.postgresql.org/pg/commitdiff/46dddf7673c5820be7c78a8b0e098fdbc65d003d - Fix typcategory labeling of jsonb. Dunno who had the cute idea of labeling jsonb as typcategory 'C', but it is not a composite type. Label it 'U', since that's what json is using. http://git.postgresql.org/pg/commitdiff/bdf9dd4db78a5f23e863f2d4d8500969dc261fd0 - Teach add_json() that jsonb is of TYPCATEGORY_JSON. This code really needs to be refactored so that there aren't so many copies that can diverge. Not to mention that this whole approach is probably wrong. But for the moment I'll just stick my finger in the dike. Per report from Michael Paquier. http://git.postgresql.org/pg/commitdiff/62e57ff040e5d0acd303b94e86fff689effc5957 - Get rid of bogus dependency on typcategory in to_json() and friends. These functions were relying on typcategory to identify arrays and composites, which is not reliable and not the normal way to do it. Using typcategory to identify boolean, numeric types, and json itself is also pretty questionable, though the code in those cases didn't seem to be at risk of anything worse than wrong output. Instead, use the standard lsyscache functions to identify arrays and composites, and rely on a direct check of the type OID for the other cases. In HEAD, also be sure to look through domains so that a domain is treated the same as its base type for conversions to JSON. However, this is a small behavioral change; given the lack of field complaints, we won't back-patch it. In passing, refactor so that there's only one copy of the code that decides which conversion strategy to apply, not multiple copies that could (and have) gotten out of sync. http://git.postgresql.org/pg/commitdiff/0ca6bda8e7501947c05f30c127f6d12ff90b5a64 - Improve user-facing JSON documentation. I started out with the intention of just fixing the info about the jsonb operator classes, but soon found myself copy-editing most of the JSON material. Hopefully it's more readable now. http://git.postgresql.org/pg/commitdiff/0b92a77c17ebe8bec08e250e1a929b07efef1008 - Fix broken allocation logic in recently-rewritten jsonb_util.c. reserveFromBuffer() failed to consider the possibility that it needs to more-than-double the current buffer size. Beyond that, it seems likely that we'd someday need to worry about integer overflow of the buffer length variable. Rather than reinvent the logic that's already been debugged in stringinfo.c, let's go back to using that logic. We can still have the same targeted API, but we'll rely on stringinfo.c to manage reallocation. Per report from Alexander Korotkov. http://git.postgresql.org/pg/commitdiff/3d8c2b496fc1fed2b8ff8a403d3a17329325466e - Fix bogus documentation of json_object_agg(). It takes two arguments, not one. http://git.postgresql.org/pg/commitdiff/17e4082b6312383075e397b4b2ae324c90716c5b - Update config.guess and config.sub http://git.postgresql.org/pg/commitdiff/7fa5bc43aaaf01e23c3a6ab59a57c19273f6f7f4 - Accept tcl 8.6 in configure's probe for tclsh. Usually the search would find plain "tclsh" without any trouble, but some installations might only have the version-numbered flavor of that program. No compatibility problems have been reported with 8.6, so we might as well back-patch this to all active branches. Christoph Berg http://git.postgresql.org/pg/commitdiff/eaba54c20c5ab2cb6aaffa574444fd4990dfe2c7 - More work on the JSON/JSONB user documentation. Document existence operator adequately; fix obsolete claim that no Unicode-escape semantic checks happen on input (it's still true for json, but not for jsonb); improve examples; assorted wordsmithing. http://git.postgresql.org/pg/commitdiff/f825c7c850dbe683d62defd7e5bd31664ee3302c - Rename min_recovery_apply_delay to recovery_min_apply_delay. Per discussion, this seems like a more consistent choice of name. Fabrízio de Royes Mello, after a suggestion by Peter Eisentraut; some additional documentation wordsmithing by me http://git.postgresql.org/pg/commitdiff/0d0b2bf175a53dfedcc0cb69eaba7576b0c286f2 - Rename jsonb_hash_ops to jsonb_path_ops. There's no longer much pressure to switch the default GIN opclass for jsonb, but there was still some unhappiness with the name "jsonb_hash_ops", since hashing is no longer a distinguishing property of that opclass, and anyway it seems like a relatively minor detail. At the suggestion of Heikki Linnakangas, we'll use "jsonb_path_ops" instead; that captures the important characteristic that each index entry depends on the entire path from the document root to the indexed value. Also add a user-facing explanation of the implementation properties of these two opclasses. http://git.postgresql.org/pg/commitdiff/12e611d43e6efbf0e36014a3055ed47366facee7 - Find postgresql.auto.conf in PGDATA even when postgresql.conf is elsewhere. The original coding for ALTER SYSTEM made a fundamentally bogus assumption that postgresql.auto.conf could be sought relative to the main config file if we hadn't yet determined the value of data_directory. This fails for common arrangements with the config file elsewhere, as reported by Christoph Berg. The simplest fix is to not try to read postgresql.auto.conf until after SelectConfigFiles has chosen (and locked down) the data_directory setting. Because of the logic in ProcessConfigFile for handling resetting of GUCs that've been removed from the config file, we cannot easily read the main and auto config files separately; so this patch adopts a brute force approach of reading the main config file twice during postmaster startup. That's a tad ugly, but the actual time cost is likely to be negligible, and there's no time for a more invasive redesign before beta. With this patch, any attempt to set data_directory via ALTER SYSTEM will be silently ignored. It would probably be better to throw an error, but that can be dealt with later. This bug, however, would prevent any testing of ALTER SYSTEM by a significant fraction of the userbase, so it seems important to get it fixed before beta. http://git.postgresql.org/pg/commitdiff/195e81aff5d63da1e1f9dd0314a13859ec15c7c0 - Stamp 9.4beta1. http://git.postgresql.org/pg/commitdiff/e6df2e1be6330660ba4d81daa726ae4a71535aa9 Michael Meskes pushed: - Fix handling of array of char pointers in ecpglib. When array of char * was used as target for a FETCH statement returning more than one row, it tried to store all the result in the first element. Instead it should dump array of char pointers with right offset, use the address instead of the value of the C variable while reading the array and treat such variable as char **, instead of char * for pointer arithmetic. Patch by Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> http://git.postgresql.org/pg/commitdiff/8d6a07fa01cece1bd3508a81e59c0c0cbc0bb867 Simon Riggs pushed: - Correct comment in Hot Standby nbtree handling. Logic is correct, matching handling of LP_DEAD elsewhere. http://git.postgresql.org/pg/commitdiff/2e54d88af137da5c1cf4749e2b9d4371224bbd47 - pg_basebackup streaming: adjust version check msg. Commit d298b50a3b469c088bb40a4d36d38111b4cd574d by Heikki Linnakangas requested that the version check message be updated at next release, suggesting that the appropriate text would be “9.3 or later”. The logic used for the check indicates that the correct text for 9.4 is “9.3 or 9.4”, since the logic would cause this to fail for later releases. http://git.postgresql.org/pg/commitdiff/08317edc2d4200e3716deaf585925069601c8965 - pg_basebackup streaming: adjust version check msg. Allow for translatable string, rather than use "or" http://git.postgresql.org/pg/commitdiff/250f259a44411d341e75928401503a681844c59d Peter Eisentraut pushed: - doc: Fix DocBook XML validity The main problem is that DocBook SGML allows indexterm elements just about everywhere, but DocBook XML is stricter. For example, this common pattern <varlistentry> <indexterm>...</indexterm> <term>...</term> ... </varlistentry> needs to be changed to something like <varlistentry> <term>...<indexterm>...</indexterm></term> ... </varlistentry> See also bb4eefe7bf518e42c73797ea37b033a5d8a8e70a. There is currently nothing in the build system that enforces that things stay valid, because that requires additional tools and will receive separate consideration. http://git.postgresql.org/pg/commitdiff/3a9d430af515e9dd8a9d34a4011367e667a66521 - Translation updates http://git.postgresql.org/pg/commitdiff/e136271a947d142eaa7093a789e6fa9ceda18c17 Jeff Davis pushed: - Improve comment for tricky aspect of index-only scans. Index-only scans avoid taking a lock on the VM buffer, which would cause a lot of contention. To be correct, that requires some intricate assumptions that weren't completely documented in the previous comment. Reviewed by Robert Haas. http://git.postgresql.org/pg/commitdiff/35c0cd3b05b0be18dc2d049c33b38a2d13993ffe - Fix interval test, which was broken for floating-point timestamps. Commit 4318daecc959886d001a6e79c6ea853e8b1dfb4b introduced a test that couldn't be made consistent between integer and floating-point timestamps. It was designed to test the longest possible interval output length, so removing four zeros from the number of hours, as this patch does, is not ideal. But the test still has some utility for its original purpose, and there aren't a lot of other good options. Noah Misch suggested a different approach where we test that the output either matches what we expect from integer timestamps or what we expect from floating-point timestamps. That seemed to obscure an otherwise simple test, however. Reviewed by Tom Lane and Noah Misch. http://git.postgresql.org/pg/commitdiff/348aa75a678069569923c501206d5a1ca03654e3 Noah Misch pushed: - Un-break ecpg test suite under --disable-integer-datetimes. Commit 4318daecc959886d001a6e79c6ea853e8b1dfb4b broke it. The change in sub-second precision at extreme dates is normal. The inconsistent truncation vs. rounding is essentially a bug, albeit a longstanding one. Back-patch to 8.4, like the causative commit. http://git.postgresql.org/pg/commitdiff/08c8e8962f56c23c6799178d52d3b31350a0708f == Rejected Patches (for now) == No one was disappointed this week :-) == Pending Patches == Robert Haas sent in a patch to avoiding tuple copying in btree index builds. Thomas Munro sent in three revisions of a patch to include the (non-default) cluster name in ps output. Heikki Linnakangas sent in a patch to fix a race condition between PREPARE TRANSACTION and COMMIT PREPARED. Robert Haas sent in a patch to create a new memory allocator, sb_alloc. Heikki Linnakangas sent in a patch to prevent a doPickSplit stack buffer overflow in XLogInsert by removing MAXALIGNs in SP-GiST WAL. Andreas Karlsson sent in a patch to fix tab completion for DROP TRIGGER/RULE and ALTER TABLE ... DISABLE/ENABLE in psql. Andres Freund sent in two more revisions of a patch to add a pg_shmem_allocations view. Michael Paquier, Andres Freund, and Fabrízio de Royes Mello traded patches to fix an issue where the new pg_lsn type doesn't have hash/btree opclasses, resulting in inability to do certain relativel simple queries with them. Kaigai Kouhei sent in another revision of a patch to implement a custom plan API. Jaime Casanova sent in a WIP patch to show index maintenance in EXPLAIN ANALYZE VERBOSE. Andres Freund sent in a patch to fix harmless access to uninitialized memory in ri_triggers.c. Robert Haas sent in a doc patch to fix what appeared to be an issue where PQputCopyEnd didn't adhere to its API contract. MauMau sent in another revision of a patch to fix an issue on Windows where pg_ctl always uses the same event source. Peter Eisentraut sent in a patch to fix imprecise pg_basebackup documentation about excluded files. Christoph Berg sent in a patch to update config.guess/config.sub for ppc64le. Alexander Korotkov sent in a patch to fix a breakage of lossy bitmap scans in GIN indexes. Fabrízio de Royes Mello sent in a patch to rename min_recovery_apply_delay to recovery_min_apply_delay. Peter Eisentraut sent in a patch to enable accepting empty values as xml "content" values, per the XML spec.
pgsql-announce by date: