- 31 Jan, 2014 7 commits
-
-
Bruce Momjian authored
Allows typedefs to be specified on the command line, per request from Andrew.
-
Fujii Masao authored
-
Bruce Momjian authored
Add new entab options to process only C comment whitespace after periods, and to protect leading whitespace.
-
Andrew Dunstan authored
Per gripe from hubert depesz lubaczewski. Also improve examples for this and json_array_elements so they match the example results.
-
Tom Lane authored
The buildfarm says commit 58274728 doesn't work so well on Windows. This is because the encoding part of Windows locale names can be just a code page number, eg "1252", which we don't consider to be a valid encoding name. Add a check to accept encoding parts that are case-insensitively string equal; this at least ensures that the new code doesn't reject any cases that the old code allowed.
-
Bruce Momjian authored
This requires a new version of pg_bsd_indent, version 1.3, to be downloaded.
-
Tom Lane authored
Even though the server tries to canonicalize stored locale names, the platform often doesn't cooperate, so it's entirely possible that one DB thinks its locale is, say, "en_US.UTF-8" while the other has "en_US.utf8". Rather than failing, we should try to allow this where it's clearly OK. There is already pretty robust encoding lookup in encnames.c, so make use of that to compare the encoding parts of the names. The locale identifier parts are just compared case-insensitively, which we were already doing. The major problem known to exist in the field is variant encoding-name spellings, so hopefully this will be Good Enough. If not, we can try being even laxer. Pavel Raiskup, reviewed by Rushabh Lathia
-
- 30 Jan, 2014 8 commits
-
-
Tom Lane authored
Thinko in error report (and a typo in the message text, too). We're failing anyway, but it would be good to print something useful first. Noted while reviewing a patch to make pg_upgrade's locale code laxer.
-
Robert Haas authored
Vik Fearing, reviewed by Pavel Stehule and myself
-
Tom Lane authored
When pulling a "postponed" qual from a LATERAL subquery up into the quals of an outer join, we must make sure that the postponed qual is included in those seen by make_outerjoininfo(). Otherwise we might compute a too-small min_lefthand or min_righthand for the outer join, leading to "JOIN qualification cannot refer to other relations" failures from distribute_qual_to_rels. Subtler errors in the created plan seem possible, too, if the extra qual would only affect join ordering constraints. Per bug #9041 from David Leverton. Back-patch to 9.3.
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
Backpatch to 9.3 Greg Smith
-
Bruce Momjian authored
New checks include input, month/day/time internal adjustments, addition, subtraction, multiplication, and negation. Also adjust docs to correctly specify interval size in bytes. Report from Rok Kralj
-
Tom Lane authored
Various places were supposing that errno could be expected to hold still within an ereport() nest or similar contexts. This isn't true necessarily, though in some cases it accidentally failed to fail depending on how the compiler chanced to order the subexpressions. This class of thinko explains recent reports of odd failures on clang-built versions, typically missing or inappropriate HINT fields in messages. Problem identified by Christian Kruse, who also submitted the patch this commit is based on. (I fixed a few issues in his patch and found a couple of additional places with the same disease.) Back-patch as appropriate to all supported branches.
-
- 29 Jan, 2014 15 commits
-
-
Andrew Dunstan authored
They are in fact set in every case where they are needed, but the compiler doesn't know that. Per gripe from Tom Lane.
-
Andrew Dunstan authored
-
Robert Haas authored
This doesn't work for prepared queries, but it's not too easy to get the information in that case and there's some debate as to exactly what the right thing to measure is, so just do this for now. Andreas Karlsson, with slight doc changes by me.
-
Andrew Dunstan authored
This was a notable omission from the json functions added in 9.3 and there have been numerous complaints about its absence. Laurence Rowe.
-
Heikki Linnakangas authored
We calculated the rounded-up size for the allocation, but then failed to use the rounded-up value in the mmap() call. Oops. Also, initialize allocsize, to silence warnings seen with some compilers, as pointed out by Jeff Janes.
-
Heikki Linnakangas authored
When skipping over some items in a posting tree, re-find the new location by descending the tree from root, rather than walking the right links. This can save a lot of I/O. Heavily modified from Alexander Korotkov's fast scan patch.
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Heikki Linnakangas authored
If we're skipping past a certain TID, avoid decoding posting list segments that only contain smaller TIDs. Extracted from Alexander Korotkov's fast scan patch, heavily modified.
-
Heikki Linnakangas authored
In a multi-key search, ie. something like "col @> 'foo' AND col @> 'bar'", as soon as we find the next item that matches the first criteria, we don't need to check the second criteria for TIDs smaller the first match. That saves a lot of effort, especially if one of the terms is rare, while the second occurs very frequently. Based on ideas from Alexander Korotkov's fast scan patch.
-
Andrew Dunstan authored
-
Heikki Linnakangas authored
Broken by the huge_tlb_pages patch. Vik Fearing.
-
Heikki Linnakangas authored
This patch adds an option, huge_tlb_pages, which allows requesting the shared memory segment to be allocated using huge pages, by using the MAP_HUGETLB flag in mmap(). This can improve performance. The default is 'try', which means that we will attempt using huge pages, and fall back to non-huge pages if it doesn't work. Currently, only Linux has MAP_HUGETLB. On other platforms, the default 'try' behaves the same as 'off'. In the passing, don't try to round the mmap() size to a multiple of pagesize. mmap() doesn't require that, and there's no particular reason for PostgreSQL to do that either. When using MAP_HUGETLB, however, round the request size up to nearest 2MB boundary. This is to work around a bug in some Linux kernel versions, but also to avoid wasting memory, because the kernel will round the size up anyway. Many people were involved in writing this patch, including Christian Kruse, Richard Poole, Abhijit Menon-Sen, reviewed by Peter Geoghegan, Andres Freund and me.
-
Robert Haas authored
Per a report by Rajeev Rastogi.
-
- 28 Jan, 2014 9 commits
-
-
Andrew Dunstan authored
Thom Brown.
-
Andrew Dunstan authored
These do not run any specific schedule of tests, but only those specified as part of the invocation, e.g.: make check-tests TESTS="json jsonb"
-
Andrew Dunstan authored
json_build_array() and json_build_object allow for the construction of arbitrarily complex json trees. json_object() turns a one or two dimensional array, or two separate arrays, into a json_object of name/value pairs, similarly to the hstore() function. json_object_agg() aggregates its two arguments into a single json object as name value pairs. Catalog version bumped. Andrew Dunstan, reviewed by Marko Tiikkaja.
-
Fujii Masao authored
This view shows the statistics about the WAL archiver process's activity. Gabriele Bartolini, reviewed by Michael Paquier, refactored a bit by me.
-
Tom Lane authored
generate_normalized_query() no longer needs to truncate text, but this one comment didn't get the memo. Per Peter Geoghegan.
-
Bruce Momjian authored
Revert 89774b58
-
Bruce Momjian authored
Rajeev rastogi
-
Stephen Frost authored
Per the expanded comment- As we're just trying to reset these to go to DEVNULL, there's not much point in checking for failure from the close/dup2 calls here, if they fail then presumably the file descriptors are closed and any writes will go into the bitbucket anyway. Pointed out by Tom.
-
Tom Lane authored
It's worth distinguishing these cases from run-of-the-mill wrong-password problems, since users have been known to waste lots of time pursuing the wrong theory about what's failing. Now, our longstanding policy about how to report authentication failures is that we don't really want to tell the *client* such things, since that might be giving information to a bad guy. But there's nothing wrong with reporting the details to the postmaster log, and indeed the comments in this area of the code contemplate that interesting details should be so reported. We just weren't handling these particular interesting cases usefully. To fix, add infrastructure allowing subroutines of ClientAuthentication() to return a string to be added to the errdetail_log field of the main authentication-failed error report. We might later want to use this to report other subcases of authentication failure the same way, but for the moment I just dealt with password cases. Per discussion of a patch from Josh Drake, though this is not what he proposed.
-
- 27 Jan, 2014 1 commit
-
-
Tom Lane authored
This change allows us to eliminate the previous limit on stored query length, and it makes the shared-memory hash table very much smaller, allowing more statements to be tracked. (The default value of pg_stat_statements.max is therefore increased from 1000 to 5000.) In typical scenarios, the hash table can be large enough to hold all the statements commonly issued by an application, so that there is little "churn" in the set of tracked statements, and thus little need to do I/O to the file. To further reduce the need for I/O to the query-texts file, add a way to retrieve all the columns of the pg_stat_statements view except for the query text column. This is probably not of much interest for human use but it could be exploited by programs, which will prefer using the queryid anyway. Ordinarily, we'd need to bump the extension version number for the latter change. But since we already advanced pg_stat_statements' version number from 1.1 to 1.2 in the 9.4 development cycle, it seems all right to just redefine what 1.2 means. Peter Geoghegan, reviewed by Pavel Stehule
-