[COMMITTERS] pgsql: Fix unsafe references to errno within error messaging logic.

2014-01-29 Thread Tom Lane
Fix unsafe references to errno within error messaging logic. 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 chance

[COMMITTERS] pgsql: Fix unsafe references to errno within error messaging logic.

2014-01-29 Thread Tom Lane
Fix unsafe references to errno within error messaging logic. 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 chance

[COMMITTERS] pgsql: Fix unsafe references to errno within error messaging logic.

2014-01-29 Thread Tom Lane
Fix unsafe references to errno within error messaging logic. 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 chance

[COMMITTERS] pgsql: Fix unsafe references to errno within error messaging logic.

2014-01-29 Thread Tom Lane
Fix unsafe references to errno within error messaging logic. 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 chance

[COMMITTERS] pgsql: Fix unsafe references to errno within error messaging logic.

2014-01-29 Thread Tom Lane
Fix unsafe references to errno within error messaging logic. 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 chance

[COMMITTERS] pgsql: Fix unsafe references to errno within error messaging logic.

2014-01-29 Thread Tom Lane
Fix unsafe references to errno within error messaging logic. 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 chance

[COMMITTERS] pgsql: Silence compiler warnings about possibly unset variables.

2014-01-29 Thread Andrew Dunstan
Silence compiler warnings about possibly unset variables. They are in fact set in every case where they are needed, but the compiler doesn't know that. Per gripe from Tom Lane. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/120c5cc761e0d99a9a2f3349f4031850b0dbd5a0

Re: [COMMITTERS] pgsql: Add json_array_elements_text function.

2014-01-29 Thread Tom Lane
Andrew Dunstan writes: > Add json_array_elements_text function. Not 100% sure if this is from this commit or some earlier one, but in any case please fix it: jsonfuncs.c: In function 'populate_record_worker': jsonfuncs.c:1286: warning: 'tupType' may be used uninitialized in this function jsonfun

[COMMITTERS] pgsql: Forgot to bump catalog version for json_array_elements_text.

2014-01-29 Thread Andrew Dunstan
Forgot to bump catalog version for json_array_elements_text. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/5e52e9d6d467d352c28141f16a95db6c2df71ecc Modified Files -- src/include/catalog/catversion.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[COMMITTERS] pgsql: Include planning time in EXPLAIN ANALYZE output.

2014-01-29 Thread Robert Haas
Include planning time in EXPLAIN ANALYZE output. 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. B

[COMMITTERS] pgsql: Add json_array_elements_text function.

2014-01-29 Thread Andrew Dunstan
Add json_array_elements_text function. This was a notable omission from the json functions added in 9.3 and there have been numerous complaints about its absence. Laurence Rowe. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/5264d9154178d3aeaa0359b43a450298a7ce7281

[COMMITTERS] pgsql: Fix thinko in huge_tlb_pages patch.

2014-01-29 Thread Heikki Linnakangas
Fix thinko in huge_tlb_pages patch. 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. Branch -- master Details --

[COMMITTERS] pgsql: Further optimize GIN multi-key searches.

2014-01-29 Thread Heikki Linnakangas
Further optimize GIN multi-key searches. 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. Branch -- master

Re: [COMMITTERS] pgsql: Allow using huge TLB pages on Linux (MAP_HUGETLB)

2014-01-29 Thread Christian Kruse
Hi, On 29/01/14 11:17, Peter Geoghegan wrote: > On Wed, Jan 29, 2014 at 4:12 AM, Heikki Linnakangas > wrote: > > Allow using huge TLB pages on Linux (MAP_HUGETLB) > > The documentation says: > […] I rewrote the whole part. Giving such a formula is a bad idea since shared buffers is not the only

Re: [COMMITTERS] pgsql: Allow using huge TLB pages on Linux (MAP_HUGETLB)

2014-01-29 Thread Peter Geoghegan
On Wed, Jan 29, 2014 at 4:12 AM, Heikki Linnakangas wrote: > Allow using huge TLB pages on Linux (MAP_HUGETLB) The documentation says: +Remember that you will need at least shared_buffers / huge page size + +1 huge TLB pages. So for example for a system with 6GB shared buffers +

[COMMITTERS] pgsql: Fix pointer processing in new entab.c function

2014-01-29 Thread Bruce Momjian
Fix pointer processing in new entab.c function Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/8440897b38be38903ecc2041002bba08e08308ad Modified Files -- src/tools/entab/entab.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- Sent via pgsql-

[COMMITTERS] pgsql: Add C functions to centralize entab processing

2014-01-29 Thread Bruce Momjian
Add C functions to centralize entab processing Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/e93f7253a7999531b3768080fa4e58817ed8b112 Modified Files -- src/tools/entab/entab.c | 46 +++--- 1 file changed, 23 inse

[COMMITTERS] pgsql: Add more C comments to entab.c.

2014-01-29 Thread Bruce Momjian
Add more C comments to entab.c. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/db90bcf8df427616a3dbce8ca3895874c2eaa9d7 Modified Files -- src/tools/entab/entab.c | 33 - 1 file changed, 28 insertions(+), 5 deletions(-)

[COMMITTERS] pgsql: Further optimize multi-key GIN searches.

2014-01-29 Thread Heikki Linnakangas
Further optimize multi-key GIN searches. 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. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff

[COMMITTERS] pgsql: Allow skipping some items in a multi-key GIN search.

2014-01-29 Thread Heikki Linnakangas
Allow skipping some items in a multi-key GIN search. 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,

[COMMITTERS] pgsql: Remedy two small omissions in the new json functions docs.

2014-01-29 Thread Andrew Dunstan
Remedy two small omissions in the new json functions docs. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/2013e5eef7e08d924237c03196b76a9edf43254a Modified Files -- doc/src/sgml/func.sgml |5 - 1 file changed, 4 insertions(+), 1 deletion(-) --

[COMMITTERS] pgsql: Fix docs build.

2014-01-29 Thread Heikki Linnakangas
Fix docs build. Broken by the huge_tlb_pages patch. Vik Fearing. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/991659dcd768163c77924e67a75088e91c713189 Modified Files -- doc/src/sgml/config.sgml |2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[COMMITTERS] pgsql: Allow using huge TLB pages on Linux (MAP_HUGETLB)

2014-01-29 Thread Heikki Linnakangas
Allow using huge TLB pages on Linux (MAP_HUGETLB) 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 at