Re: [HACKERS] ERRCODE_T_R_DEADLOCK_DETECTED

2015-03-19 Thread Tatsuo Ishii
>> I think the solution for this is assigning a unique id to each >> message. This is already done in some commercial databases. They are >> pretty usefull for tech supports. > > We already have file and line number recorded. Problem with it is, the line number (and sometimes the file name) chan

Re: [HACKERS] compress method for spgist

2015-03-19 Thread Bruce Momjian
On Wed, Oct 22, 2014 at 05:41:19PM +0400, Teodor Sigaev wrote: > When we developed SP-GiST we missed analogue of GiST's compress > method. There was two reasons for that: lack of imagination to > imagine case with different types of indexed value and column, and > we didn't want call some method wh

Re: [HACKERS] btree_gin and ranges

2015-03-19 Thread Bruce Momjian
On Fri, Dec 26, 2014 at 01:33:26PM +0300, Teodor Sigaev wrote: > >Teodor's patch could use some more comments. The > >STOP_SCAN/MATCH_SCAN/CONT_SCAN > >macros are a good idea, but they probably should go into > >src/include/access/gin.h so that they can be used in all compare_partial > >implementa

Re: [HACKERS] Performance improvement for joins where outer side is unique

2015-03-19 Thread Kyotaro HORIGUCHI
Hello, > Hello, The attached is non-search version of unique join. This is a quite bucket-brigade soye makes many functions got changes to have new parameter only to convey the new bool information. I know it's very bad. After some consideration, I removed almost all of such parameters from path

Re: [HACKERS] Patch: Add launchd Support

2015-03-19 Thread Bruce Momjian
On Mon, Oct 20, 2014 at 03:59:01PM -0700, David E. Wheeler wrote: > Hackers, > > In Mac OS X 10.10 “Yosemite,” Apple removed SystemStarter, upon > which our OS X start script has relied since 2007. So here is a patch > that adds support for its replacement, launchd. It includes 7 day log > rotation

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-19 Thread Tom Lane
Andrew Gierth writes: > "Max" == Max Filippov writes: > Max> Sorry, I must be not clear enough: why checking compiler/linker > Max> output instead of checking their exit code or presence of produced > Max> object/ executable files? > Going by the comment some lines above, my guess would be "b

Re: [HACKERS] ERRCODE_T_R_DEADLOCK_DETECTED

2015-03-19 Thread Tom Lane
Tatsuo Ishii writes: >> Sure. It's always a balance. If you go to the extreme of your argument >> every possible error gets one individual error code. But then error >> handling gets too complex. > I think the solution for this is assigning a unique id to each > message. This is already done in

Re: [HACKERS] Superuser connect during smart shutdown

2015-03-19 Thread Bruce Momjian
On Mon, Oct 20, 2014 at 03:10:50PM -0400, Tom Lane wrote: > Robert Haas writes: > > On Sun, Oct 19, 2014 at 12:27 PM, Tom Lane wrote: > >> I've certainly objected to it in the past, but I don't believe > >> I was the only one objecting. > > > What's your feeling now? > > I'm prepared to yield o

Re: [HACKERS] get_actual_variable_range vs idx_scan/idx_tup_fetch

2015-03-19 Thread Bruce Momjian
On Sat, Oct 18, 2014 at 02:20:45PM -0400, Bruce Momjian wrote: > On Sat, Oct 18, 2014 at 06:15:03PM +0200, Marko Tiikkaja wrote: > > On 10/18/14, 5:46 PM, Tom Lane wrote: > > >Marko Tiikkaja writes: > > >>Yes, exactly; if I had had the option to disable the index from the > > >>optimizer's point o

Re: [HACKERS] ERRCODE_T_R_DEADLOCK_DETECTED

2015-03-19 Thread Tatsuo Ishii
>> It is sad for users the only way to distinguish the conditions is by >> looking at the error messages. They want to know the root of the >> problem. > > Sure. It's always a balance. If you go to the extreme of your argument > every possible error gets one individual error code. But then error >

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-19 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 05:15:51AM +0300, Max Filippov wrote: > On Fri, Mar 20, 2015 at 5:09 AM, Bruce Momjian wrote: > > On Fri, Mar 20, 2015 at 04:51:55AM +0300, Max Filippov wrote: > >> xtensa-linux-gcc -o conftest -Wall -Wmissing-prototypes > >> -Wpointer-arith -Wdeclaration-after-statement -W

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-19 Thread Andrew Gierth
> "Max" == Max Filippov writes: Max> Sorry, I must be not clear enough: why checking compiler/linker Max> output instead of checking their exit code or presence of produced Max> object/ executable files? Going by the comment some lines above, my guess would be "because some compilers acce

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-19 Thread Max Filippov
On Fri, Mar 20, 2015 at 5:09 AM, Bruce Momjian wrote: > On Fri, Mar 20, 2015 at 04:51:55AM +0300, Max Filippov wrote: >> xtensa-linux-gcc -o conftest -Wall -Wmissing-prototypes >> -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels >> -Wmissing-format-attribute -Wformat-security -fno-stri

Re: [HACKERS] Shapes on the regression test for polygon

2015-03-19 Thread Bruce Momjian
On Tue, Oct 14, 2014 at 11:00:47AM -0400, Bruce Momjian wrote: > On Tue, Oct 14, 2014 at 05:40:06PM +0300, Emre Hasegeli wrote: > > > I extracted Emre's diagram adjustments from the patch and applied it, > > > and no tabs now. Emre, I assume your regression changes did not affect > > > the diagram

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-19 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 04:51:55AM +0300, Max Filippov wrote: > xtensa-linux-gcc -o conftest -Wall -Wmissing-prototypes > -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels > -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing > -fwrapv -fexcess-precision=standard -D_LARGEFI

Re: [HACKERS] Lets delete src/test/performance

2015-03-19 Thread Bruce Momjian
On Tue, Oct 7, 2014 at 02:03:04PM +0200, Andres Freund wrote: > Hi, > > The code in there doesn't look very interesting - and very unlikely to > run these days. Notably it relies on a binary called 'postmaster' et > al... > > The last realy changes are from a long time ago: > > commit 142d42f93

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-19 Thread Andrew Gierth
>> if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval >> $ac_compile 2>&1 1>&5)`" = ""; then FWIW, I happened to run into this recently on IRC with someone having compile problems on FreeBSD (10.1); they were using some nonstandard compile flags, and configure's pthread test was breakin

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-19 Thread Max Filippov
Hi Tom, On Fri, Mar 20, 2015 at 3:50 AM, Tom Lane wrote: > Max Filippov writes: >> when PostgreSQL is cross-compiled in the Buildroot with uClibc toolchain >> it may not correctly detect compiler/linker flags for threading. [1] >> The reason is that config/acx_pthread.m4:146 uses compiler and li

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-19 Thread Bruce Momjian
On Thu, Mar 19, 2015 at 06:05:52PM -0700, David G. Johnston wrote: > On Thu, Mar 19, 2015 at 5:18 PM, Bruce Momjian wrote: > There are other places later in the docs where we explain all the quote* > functions and show examples of query construction using string > concatenation, but I

Re: [HACKERS] Add regression tests for autocommit-off mode for psql and fix some omissions

2015-03-19 Thread Bruce Momjian
On Mon, Oct 6, 2014 at 03:49:37PM +0200, Feike Steenbergen wrote: > On 6 October 2014 14:09, Michael Paquier wrote: > > That's a good catch and it should be a separate patch. This could even be > > considered for a back-patch down to 9.2. Thoughts? > > If I isolate "DROP INDEX concurrently", thi

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-19 Thread David G. Johnston
On Thu, Mar 19, 2015 at 5:18 PM, Bruce Momjian wrote: > On Thu, Mar 19, 2015 at 04:01:32PM -0700, David G. Johnston wrote: > > ​Prefacing it with: "You may also see the following syntax in the wild > since > > format was only recently introduced."​ > > > > ​may solve your lack of reason for incl

Re: [HACKERS] "cancelling statement due to user request error" occurs but the transaction has committed.

2015-03-19 Thread Bruce Momjian
On Thu, Mar 19, 2015 at 08:43:52PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Thu, Mar 19, 2015 at 06:59:20PM -0300, Alvaro Herrera wrote: > >> I don't understand why aren't interrupts held until after the commit is > >> done -- including across the mentioned ereports. > > > Uh, I thin

Re: [HACKERS] GSoC - Idea Discussion

2015-03-19 Thread Kouhei Kaigai
> I think you reference the old branch in my personal repository. > Could you confirm the repository URL? Below is the latest. > https://github.com/pg-strom/devel > Sorry, it is not a problem of pg-strom repository. Please use the "custom_join" branch of the tree below: https://github.com/kaig

Re: [HACKERS] configure can't detect proper pthread flags

2015-03-19 Thread Tom Lane
Max Filippov writes: > when PostgreSQL is cross-compiled in the Buildroot with uClibc toolchain > it may not correctly detect compiler/linker flags for threading. [1] > The reason is that config/acx_pthread.m4:146 uses compiler and linker > stdout and stderr to make decision if acx_pthread_ok shou

Re: [HACKERS] "cancelling statement due to user request error" occurs but the transaction has committed.

2015-03-19 Thread Bruce Momjian
On Thu, Mar 19, 2015 at 07:19:02PM -0400, Tom Lane wrote: > The core issue here, I think, is that xact.c only holds off interrupts > during what it considers to be the commit critical section --- which is > okay from the standpoint of transactional consistency. But the complaint > has to do with w

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-19 Thread Bruce Momjian
On Thu, Mar 19, 2015 at 04:01:32PM -0700, David G. Johnston wrote: > Doing some research on EXECUTE, I found that for constants, USING is > best because it _conditionally_ quotes based on the data type, and for > identifiers, format(%I) is best. > > > > ​ > ​On a nit-pick note, ISTM

Re: [HACKERS] pg_xlogdump MSVC build script oddities

2015-03-19 Thread Michael Paquier
On Thu, Mar 19, 2015 at 11:25 AM, Heikki Linnakangas wrote: > I'm guessing that the current state of affairs is just an oversight. I tried > changing it so that xlogreader.c is built into pg_xlogdump without copying, > and it seemed to work. But I'm using a very recent version of MSVC - perhaps >

[HACKERS] configure can't detect proper pthread flags

2015-03-19 Thread Max Filippov
Hi, when PostgreSQL is cross-compiled in the Buildroot with uClibc toolchain it may not correctly detect compiler/linker flags for threading. [1] The reason is that config/acx_pthread.m4:146 uses compiler and linker stdout and stderr to make decision if acx_pthread_ok should be yes or no: if te

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-19 Thread Peter Geoghegan
On Thu, Mar 19, 2015 at 4:49 PM, Andreas Karlsson wrote: > Nice fixes. Sorry about forgetting numericvar_to_int*. > > As for the reviewers those lists look pretty much correct. David Rowley > should probably be added to the second patch for his early review and > benchmarking. This also seems fin

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-19 Thread Andreas Karlsson
On 03/19/2015 07:08 PM, Andres Freund wrote: Working on committing this: Nice fixes. Sorry about forgetting numericvar_to_int*. As for the reviewers those lists look pretty much correct. David Rowley should probably be added to the second patch for his early review and benchmarking. -- And

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-19 Thread Andreas Karlsson
On 03/19/2015 04:55 PM, Julien Tachoires wrote: On 18/03/2015 19:54, Andreas Karlsson wrote: Looks good but I think one minor improvement could be to set the table space of the toast entires to the same as the tablespace of the table to reduce the amount of "SET default_tablespace". What do you

Re: [HACKERS] [PATCH] two-arg current_setting() with fallback

2015-03-19 Thread Tom Lane
David Christensen writes: > The two-arg form of the current_setting() function will allow a > fallback value to be returned instead of throwing an error when an > unknown GUC is provided. This would come in most useful when using > custom GUCs; e.g.: > -- errors out if the 'foo.bar' setting is

Re: [HACKERS] "cancelling statement due to user request error" occurs but the transaction has committed.

2015-03-19 Thread Tom Lane
Bruce Momjian writes: > On Thu, Mar 19, 2015 at 04:36:38PM -0400, Robert Haas wrote: >> So, either way, what happens if the query cancel shows up just an >> instant after you clear the flag? > Oh, good point. This version handles that case addressing only the > log_duration* block. This is just

[HACKERS] [PATCH] two-arg current_setting() with fallback

2015-03-19 Thread David Christensen
Apologies if this is a double-post. Enclosed is a patch that creates a two-arg current_setting() function. From the commit message: The two-arg form of the current_setting() function will allow a fallback value to be returned instead of throwing an error when an unknown GUC is provided. This w

Re: [HACKERS] "cancelling statement due to user request error" occurs but the transaction has committed.

2015-03-19 Thread Bruce Momjian
On Thu, Mar 19, 2015 at 06:59:20PM -0300, Alvaro Herrera wrote: > Robert Haas wrote: > > On Thu, Mar 19, 2015 at 10:23 AM, Bruce Momjian wrote: > > > > The issue with CommitTransaction() is that it only _holds_ the signal > > > --- it doesn't clear it. Now, since there are very few > > > CHECK_F

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-19 Thread David G. Johnston
On Thu, Mar 19, 2015 at 3:38 PM, Bruce Momjian wrote: > On Thu, Oct 2, 2014 at 09:06:54PM -0700, David G Johnston wrote: > > Jim Nasby-5 wrote > > > On 10/2/14, 6:51 AM, Pavel Stehule wrote: > > >> EXECUTE format('UPDATE tbl SET %I = newvalue WHERE key = %L', > > >> colname,

Re: [HACKERS] "cancelling statement due to user request error" occurs but the transaction has committed.

2015-03-19 Thread Bruce Momjian
On Thu, Mar 19, 2015 at 04:36:38PM -0400, Robert Haas wrote: > On Thu, Mar 19, 2015 at 10:23 AM, Bruce Momjian wrote: > > First attached patch is more surgical and clears a possible cancel > > request before we report the query duration in the logs --- this doesn't > > affect any after triggers th

Re: [HACKERS] proposal: doc: simplify examples of dynamic SQL

2015-03-19 Thread Bruce Momjian
On Thu, Oct 2, 2014 at 09:06:54PM -0700, David G Johnston wrote: > Jim Nasby-5 wrote > > On 10/2/14, 6:51 AM, Pavel Stehule wrote: > >> EXECUTE format('UPDATE tbl SET %I = newvalue WHERE key = %L', > >> colname, keyvalue) > >> or > > -1, because of quoting issues > >> EXECUTE f

Re: [HACKERS] GSoC - Idea Discussion

2015-03-19 Thread Kouhei Kaigai
> > Could you please elaborate more why to choose CUDA, a nvidia-only > > technology, rather than OpenCL, supported by much wider range of > > companies and projects? Why do you consider OpenCL unsuitable? > > > > Not that CUDA is bad - it certainly works better in some scenarios, but > > this is a

Re: [HACKERS] GSoC - Idea Discussion

2015-03-19 Thread Alvaro Herrera
hitesh ramani wrote: > > You mention that you ran into issues with PG Strom. What issues? > > While I was trying to compile, I ran into the error "src/main.c:27:29: fatal > error: utils/ruleutils.h: No such file or directory", when I did make to the > branch of Postgres suggested in the descri

Re: [HACKERS] "cancelling statement due to user request error" occurs but the transaction has committed.

2015-03-19 Thread Alvaro Herrera
Robert Haas wrote: > On Thu, Mar 19, 2015 at 10:23 AM, Bruce Momjian wrote: > > The issue with CommitTransaction() is that it only _holds_ the signal > > --- it doesn't clear it. Now, since there are very few > > CHECK_FOR_INTERRUPTS() calls in the typical commit process flow, the > > signal is

Re: [HACKERS] GSoC - Idea Discussion

2015-03-19 Thread Tomas Vondra
On 03/19/15 21:41, hitesh ramani wrote: Hello Tomas, > Could you please elaborate more why to choose CUDA, a nvidia-only > technology, rather than OpenCL, supported by much wider range of > companies and projects? Why do you consider OpenCL unsuitable? > > Not that CUDA is bad - it certa

Re: [HACKERS] GSoC - Idea Discussion

2015-03-19 Thread hitesh ramani
Hello Tomas, > Could you please elaborate more why to choose CUDA, a nvidia-only > technology, rather than OpenCL, supported by much wider range of > companies and projects? Why do you consider OpenCL unsuitable? > > Not that CUDA is bad - it certainly works better in some scenarios, but > this i

Re: [HACKERS] "cancelling statement due to user request error" occurs but the transaction has committed.

2015-03-19 Thread Robert Haas
On Thu, Mar 19, 2015 at 10:23 AM, Bruce Momjian wrote: > On Thu, Mar 19, 2015 at 07:54:02AM -0400, Robert Haas wrote: >> On Wed, Mar 18, 2015 at 10:56 PM, Bruce Momjian wrote: >> > I have researched this issue originally reported in June of 2014 and >> > implemented a patch to ignore cancel while

Re: [HACKERS] INSERT ... ON CONFLICT IGNORE (and UPDATE) 3.0

2015-03-19 Thread Robert Haas
On Wed, Mar 18, 2015 at 3:40 PM, Peter Geoghegan wrote: >>> I think Heikki's concern is something different, although I am not >>> altogether up to speed on this and may be confused. The issue is: >>> suppose that process A and process B are both furiously upserting into >>> the same table with t

Re: [HACKERS] parallel mode and parallel contexts

2015-03-19 Thread Robert Haas
On Wed, Mar 18, 2015 at 7:10 PM, Andres Freund wrote: > On 2015-03-18 12:02:07 -0400, Robert Haas wrote: >> diff --git a/src/backend/access/heap/heapam.c >> b/src/backend/access/heap/heapam.c >> index cb6f8a3..173f0ba 100644 >> --- a/src/backend/access/heap/heapam.c >> +++ b/src/backend/access/he

[HACKERS] pg_xlogdump MSVC build script oddities

2015-03-19 Thread Heikki Linnakangas
When a frontend program needs to compile a file from another directory, Mkvcbuild.pm usually does something like this: $pgdumpall->AddFile('src\bin\pg_dump\keywords.c'); $pgdumpall->AddFile('src\backend\parser\kwlookup.c'); But for pg_xlogdump, it does this: foreach

Re: [HACKERS] Using 128-bit integers for sum, avg and statistics aggregates

2015-03-19 Thread Andres Freund
Hi, Working on committing this: * Converted the configure test to AC_LINK_IFELSE * I dislike the way the configure test and the resulting HAVE_* is named. This imo shouldn't be so gcc specific, even if it right now only detects gcc support. Changed. * Furthermore does the test use 64bit lite

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2015-03-19 Thread Robert Haas
On Thu, Mar 19, 2015 at 12:16 PM, Bruce Momjian wrote: > On Mon, Oct 13, 2014 at 11:35:18AM -0400, Bruce Momjian wrote: >> On Mon, Oct 13, 2014 at 05:21:32PM +0200, Andres Freund wrote: >> > > If we have it, we should improve it, or remove it. We might want to use >> > > this code for something e

Re: [HACKERS] Collation-aware comparisons in GIN opclasses

2015-03-19 Thread Bruce Momjian
On Sun, Sep 28, 2014 at 10:33:33PM -0400, Bruce Momjian wrote: > On Mon, Sep 15, 2014 at 03:42:20PM -0700, Peter Geoghegan wrote: > > On Mon, Sep 15, 2014 at 12:45 PM, Tom Lane wrote: > > > No. And we don't know how to change the default opclass without > > > breaking things, either. > > > > Is

Re: [HACKERS] flags argument for dsm_create

2015-03-19 Thread Robert Haas
On Thu, Mar 19, 2015 at 12:21 PM, Stephen Frost wrote: > * Tom Lane (t...@sss.pgh.pa.us) wrote: >> Robert Haas writes: >> > I'm slightly confused. Does that mean "just change it" or does that >> > mean "add dsm_create_extended instead"? >> >> FWIW, I vote for "just change it". We change C-level

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-19 Thread Alvaro Herrera
Thom Brown wrote: > On 19 March 2015 at 14:35, Alvaro Herrera wrote: > > Thom Brown wrote: > >> On 19 March 2015 at 14:12, Alvaro Herrera wrote: > >> > Dmitry Dolgov wrote: > >> > > >> >> * jsonb_slice - extract a subset of an jsonb > >> >> Example of usage: > Okay, so it pulls it all

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-19 Thread Thom Brown
On 19 March 2015 at 14:35, Alvaro Herrera wrote: > Thom Brown wrote: >> On 19 March 2015 at 14:12, Alvaro Herrera wrote: >> > Dmitry Dolgov wrote: >> > >> >> * jsonb_slice - extract a subset of an jsonb >> >> Example of usage: >> >> >> >> =# jsonb_slice('{"a": 1, "b": {"c": 2},

Re: [HACKERS] GSoC - Idea Discussion

2015-03-19 Thread Tomas Vondra
Hi Hitesh, On 18.3.2015 21:11, hitesh ramani wrote: > Hello devs, > > As stated earlier I was thinking to propose the integration of > Postgres and CUDA for faster execution of order by queries thru > optimizing the sorting code and sorting it with CUDA. I saw and tried > to run PG Strom and ran

Re: [HACKERS] flags argument for dsm_create

2015-03-19 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > I'm slightly confused. Does that mean "just change it" or does that > > mean "add dsm_create_extended instead"? > > FWIW, I vote for "just change it". We change C-level APIs all the time, > and this function has surely not got eit

Re: [HACKERS] flags argument for dsm_create

2015-03-19 Thread Andres Freund
On 2015-03-19 12:10:03 -0400, Robert Haas wrote: > On Thu, Mar 19, 2015 at 11:25 AM, Andres Freund > wrote: > > On 2015-03-19 11:21:45 -0400, Robert Haas wrote: > >> One question I struggled with is whether to keep the existing > >> dsm_create() signature intact and add a new function > >> dsm_cr

Re: [HACKERS] flags argument for dsm_create

2015-03-19 Thread Tom Lane
Robert Haas writes: > I'm slightly confused. Does that mean "just change it" or does that > mean "add dsm_create_extended instead"? FWIW, I vote for "just change it". We change C-level APIs all the time, and this function has surely not got either the longevity nor the wide usage that might arg

Re: [HACKERS] [PATCH] PostgreSQL 9.4 mmap(2) performance regression on FreeBSD...

2015-03-19 Thread Bruce Momjian
On Mon, Oct 13, 2014 at 11:35:18AM -0400, Bruce Momjian wrote: > On Mon, Oct 13, 2014 at 05:21:32PM +0200, Andres Freund wrote: > > > If we have it, we should improve it, or remove it. We might want to use > > > this code for something else in the future, so it should be improved > > > where feasi

Re: [HACKERS] flags argument for dsm_create

2015-03-19 Thread Robert Haas
On Thu, Mar 19, 2015 at 11:25 AM, Andres Freund wrote: > On 2015-03-19 11:21:45 -0400, Robert Haas wrote: >> One question I struggled with is whether to keep the existing >> dsm_create() signature intact and add a new function >> dsm_create_extended(). I eventually decided against it. The >> dsm

Re: [HACKERS] patch : Allow toast tables to be moved to a different tablespace

2015-03-19 Thread Julien Tachoires
On 18/03/2015 19:54, Andreas Karlsson wrote: > On 03/17/2015 09:00 AM, Julien Tachoires wrote: >> Here is a new version fixing this issue. I've added a new kind of TOC >> entry for being able to handle pg_restore --no-tablespace case. > > Looks good but I think one minor improvement could be to se

Re: [HACKERS] No toast table for pg_shseclabel but for pg_seclabel

2015-03-19 Thread Bruce Momjian
On Sat, Oct 11, 2014 at 06:01:58PM -0400, Stephen Frost wrote: > > I still think this the wrong direction. I really fail to see why we want > > to restrict security policies to some rather small size. > > I agree with this. > > There's no ability to store multiple labels for the same object and >

Re: [HACKERS] flags argument for dsm_create

2015-03-19 Thread Alvaro Herrera
Andres Freund wrote: > Hi, > > On 2015-03-19 11:21:45 -0400, Robert Haas wrote: > > One question I struggled with is whether to keep the existing > > dsm_create() signature intact and add a new function > > dsm_create_extended(). I eventually decided against it. The > > dsm_create() API is relat

Re: [HACKERS] flags argument for dsm_create

2015-03-19 Thread Andres Freund
Hi, On 2015-03-19 11:21:45 -0400, Robert Haas wrote: > One question I struggled with is whether to keep the existing > dsm_create() signature intact and add a new function > dsm_create_extended(). I eventually decided against it. The > dsm_create() API is relatively new at this point, so there p

Re: [HACKERS] assessing parallel-safety

2015-03-19 Thread Amit Kapila
On Wed, Mar 18, 2015 at 9:31 PM, Robert Haas wrote: > > On Tue, Mar 17, 2015 at 9:48 AM, Robert Haas wrote: > > On Tue, Mar 17, 2015 at 2:26 AM, Noah Misch wrote: > >> Neither that rule, nor its variant downthread, would hurt operator authors too > >> much. To make the planner categorically par

[HACKERS] flags argument for dsm_create

2015-03-19 Thread Robert Haas
Discussion on the parallel sequential scan thread has revealed the need for a way to make dsm_create() return NULL, instead of failing, when we hit the system-wide maximum on the number of dynamic shared memory segments than can be created. I've developed a small patch for this which I attach here

Re: [HACKERS] Parallel Seq Scan

2015-03-19 Thread Robert Haas
On Wed, Mar 18, 2015 at 11:43 PM, Amit Kapila wrote: > Patch fixes the problem and now for Rescan, we don't need to Wait > for workers to finish. > >> Assuming this actually fixes the problem, I think we should back-patch >> it into 9.4. > > +1 OK, done. -- Robert Haas EnterpriseDB: http://www.

Re: [HACKERS] assessing parallel-safety

2015-03-19 Thread Amit Kapila
On Thu, Mar 19, 2015 at 7:05 PM, Amit Kapila wrote: > > On Wed, Feb 18, 2015 at 10:53 PM, Robert Haas wrote: > > > > On Sun, Feb 15, 2015 at 6:24 PM, Noah Misch wrote: > > > It's important for parallelism to work under the extended query protocol, and > > > that's nontrivial. exec_parse_message

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-19 Thread Alvaro Herrera
Thom Brown wrote: > On 19 March 2015 at 14:12, Alvaro Herrera wrote: > > Dmitry Dolgov wrote: > > > >> * jsonb_slice - extract a subset of an jsonb > >> Example of usage: > >> > >> =# jsonb_slice('{"a": 1, "b": {"c": 2}, "d": {"f": 3}}'::jsonb, > >> ARRAY['b', 'f', 'x']); > >> >

Re: [HACKERS] ERRCODE_T_R_DEADLOCK_DETECTED

2015-03-19 Thread Andres Freund
On 2015-03-19 23:31:21 +0900, Tatsuo Ishii wrote: > > That SQLSTATE value is intended to be used where the transaction > > has failed because it was run concurrently with some other > > transaction, rather than before or after it; and it is intended to > > suggest that the transaction may succeed i

Re: [HACKERS] ERRCODE_T_R_DEADLOCK_DETECTED

2015-03-19 Thread Tatsuo Ishii
> That SQLSTATE value is intended to be used where the transaction > has failed because it was run concurrently with some other > transaction, rather than before or after it; and it is intended to > suggest that the transaction may succeed if run after the competing > transaction has completed. If

Re: [HACKERS] "cancelling statement due to user request error" occurs but the transaction has committed.

2015-03-19 Thread Bruce Momjian
On Thu, Mar 19, 2015 at 07:54:02AM -0400, Robert Haas wrote: > On Wed, Mar 18, 2015 at 10:56 PM, Bruce Momjian wrote: > > I have researched this issue originally reported in June of 2014 and > > implemented a patch to ignore cancel while we are completing a commit. > > I am not clear if this is th

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-19 Thread Thom Brown
On 19 March 2015 at 14:12, Alvaro Herrera wrote: > Dmitry Dolgov wrote: > >> * jsonb_slice - extract a subset of an jsonb >> Example of usage: >> >> =# jsonb_slice('{"a": 1, "b": {"c": 2}, "d": {"f": 3}}'::jsonb, >> ARRAY['b', 'f', 'x']); >> >>jsonb_slice >>

Re: [HACKERS] How about to have relnamespace and relrole?

2015-03-19 Thread Alvaro Herrera
Kyotaro HORIGUCHI wrote: > # I hope the CF app to add the author as a receiver when issueing > # a mail. Moreover, it should add everyone who was in To, From, CC in the email that the commitfest app is replying to; if the patch authors are not listed, add them as well. -- Álvaro Herrera

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-19 Thread Alvaro Herrera
Dmitry Dolgov wrote: > * jsonb_slice - extract a subset of an jsonb > Example of usage: > > =# jsonb_slice('{"a": 1, "b": {"c": 2}, "d": {"f": 3}}'::jsonb, > ARRAY['b', 'f', 'x']); > >jsonb_slice > --- > {"b": {"c": 2},

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-19 Thread Thom Brown
On 19 March 2015 at 13:23, Dmitry Dolgov <9erthali...@gmail.com> wrote: > Synopsis: Althrough Jsonb was introduced in PostgreSQL 9.4, there are > several functions, that still missing. Partially this missing functionality > was implemented in this extension [1] and the corresponding patch [2]. The

Re: [HACKERS] assessing parallel-safety

2015-03-19 Thread Amit Kapila
On Wed, Feb 18, 2015 at 10:53 PM, Robert Haas wrote: > > On Sun, Feb 15, 2015 at 6:24 PM, Noah Misch wrote: > > It's important for parallelism to work under the extended query protocol, and > > that's nontrivial. exec_parse_message() sets cursorOptions. > > exec_bind_message() runs the planner.

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-19 Thread Dmitry Dolgov
Synopsis: Althrough Jsonb was introduced in PostgreSQL 9.4, there are several functions, that still missing. Partially this missing functionality was implemented in this extension [1] and the corresponding patch [2]. The purpose of this work is to implement the rest of functions accordingly to impo

[HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-19 Thread Dmitry Dolgov
Hi, everyone I'm Dmitry Dolgov, a phd student at the KemSU, Russia. I would like to submit a proposal to the GSoC about additional jsonb functionality, and I want to get any feedback and thougths about this.

Re: [HACKERS] ERRCODE_T_R_DEADLOCK_DETECTED

2015-03-19 Thread Andres Freund
On 2015-03-19 12:50:09 +, Kevin Grittner wrote: > For me the big question is whether software written to retry a > transaction from the beginning when it gets this SQLSTATE would be > doing something dumb to retry transactions (perhaps after a brief > delay) for the conflict with recovery. If

Re: [HACKERS] ERRCODE_T_R_DEADLOCK_DETECTED

2015-03-19 Thread Kevin Grittner
Tatsuo Ishii wrote: > ereport(ERROR, > (errcode(ERRCODE_T_R_DEADLOCK_DETECTED), > errmsg("canceling statement due to conflict with recovery"), > errdetail("User transaction caused buffer deadlock with recovery."))); > > ereport(ERROR, > (errcode(E

Re: [HACKERS] Variable referencing itself in example of pgbench.sgml

2015-03-19 Thread Robert Haas
On Thu, Mar 19, 2015 at 7:20 AM, Michael Paquier wrote: > While looking at some recent commit related to pgbench I noticed this > example in the docs: > \set aid (1021 * :aid) % (10 * :scale) + 1 > This actually would fail because aid references itself. There's no special prohibition against

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-19 Thread Alvaro Herrera
Pavel Stehule wrote: > 2015-03-18 20:03 GMT+01:00 Alvaro Herrera : > > Pushed after adding error checks there and fixing the docs to match. > > Please verify. > > > > it is looking well, thank you. Thanks for checking. > small issue - there is not documented, so multidimensional arrays are not

Re: [HACKERS] "cancelling statement due to user request error" occurs but the transaction has committed.

2015-03-19 Thread Robert Haas
On Wed, Mar 18, 2015 at 10:56 PM, Bruce Momjian wrote: > I have researched this issue originally reported in June of 2014 and > implemented a patch to ignore cancel while we are completing a commit. > I am not clear if this is the proper place for this code, though a > disable_timeout() call on th

[HACKERS] Variable referencing itself in example of pgbench.sgml

2015-03-19 Thread Michael Paquier
Hi all, While looking at some recent commit related to pgbench I noticed this example in the docs: \set aid (1021 * :aid) % (10 * :scale) + 1 This actually would fail because aid references itself. Attached is a patch to change this example as follows: -\set aid (1021 * :aid) % (10 * :sca

Re: [HACKERS] How about to have relnamespace and relrole?

2015-03-19 Thread Kyotaro HORIGUCHI
Hello, Thank you for reviewing, and sorry to have overlooked this. # I hope the CF app to add the author as a receiver when issueing # a mail. regards, At Thu, 12 Mar 2015 11:06:29 +, Jeevan Chalke wrote in <20150312110629.2540.70807.p...@coridan.postgresql.org> > The following review has

Re: [HACKERS] pg_dump quietly ignore missing tables - is it bug?

2015-03-19 Thread Pavel Stehule
2015-03-15 16:09 GMT+01:00 Tom Lane : > Pavel Stehule writes: > > other variant, I hope better than previous. We can introduce new long > > option "--strict". With this active option, every pattern specified by -t > > option have to have identifies exactly only one table. It can be used for > > a

Re: [HACKERS] proposal: searching in array function - array_position

2015-03-19 Thread Pavel Stehule
2015-03-18 20:03 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > 2015-03-18 12:41 GMT+01:00 Marko Tiikkaja : > > > >> I am thinking, so this behave is correct (there is no other > > >> possible), but it is only corner case for this functionality - and > > >> if you are thinking, so better to