Re: [HACKERS] Abbreviated keys for Numeric

2015-03-20 Thread Andrew Gierth
> "Peter" == Peter Geoghegan writes: >> This is simply wrong. The reason why the cost model (in my version) >> tracks non-null values by having its own counter is precisely >> BECAUSE the passed-in memtupcount includes nulls, and therefore the >> code will UNDERESTIMATE the fraction of su

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Jaime Casanova
On Fri, Mar 20, 2015 at 11:29 PM, Michael Paquier wrote: > On Sat, Mar 21, 2015 at 2:47 AM, Peter Geoghegan wrote: >> On Fri, Mar 20, 2015 at 9:52 AM, Joshua D. Drake >> wrote: >>> There are just as many people that are running with scissors that are now >>> running (or attempting to run) our e

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

2015-03-20 Thread Pavel Stehule
2015-03-21 0:27 GMT+01:00 Jim Nasby : > On 3/20/15 2:48 PM, Pavel Stehule wrote: > >> >> >> 2015-03-20 18:47 GMT+01:00 Tom Lane > >: >> >> Alvaro Herrera > > writes: >> > Pavel Stehule wrote: >> >> I am thinking, so it is

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Michael Paquier
On Sat, Mar 21, 2015 at 2:47 AM, Peter Geoghegan wrote: > On Fri, Mar 20, 2015 at 9:52 AM, Joshua D. Drake > wrote: >> There are just as many people that are running with scissors that are now >> running (or attempting to run) our elephant in production. Does it make >> sense to remove fsync (an

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-20 Thread Peter Geoghegan
On Fri, Mar 20, 2015 at 7:10 PM, Andrew Gierth wrote: > Peter> Other than that, I've tried to keep things closer to the text > Peter> opclass. For example, the cost model now has a few debugging > Peter> traces (disabled by default). I have altered the ad-hoc cost > Peter> model so that it no

Re: [HACKERS] double vacuum in initdb

2015-03-20 Thread Bruce Momjian
On Thu, Dec 11, 2014 at 08:35:43PM -0500, Peter Eisentraut wrote: > On 12/11/14 11:44 AM, Kevin Grittner wrote: > > We want to finish with VACUUM FREEZE without the FULL, unless we > > don't care about missing visibility maps and free space maps. I have create the attached initdb patch to update t

Re: [HACKERS] pg_recvlogical description

2015-03-20 Thread Bruce Momjian
On Mon, Dec 8, 2014 at 11:53:48AM -0300, Euler Taveira wrote: > Hi, > > The pg_recvlogical docs was rewritten but someone forgot to tweak the > help description. It is a bit late in the 9.4 cycle but let be consistent. Patch applied --- thank you. -- Bruce Momjian http://momjian.us

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-20 Thread Andrew Gierth
> "Peter" == Peter Geoghegan writes: Peter> Attached is a revision of this patch, that I'm calling v2. What Peter> do you think, Andrew? "No." is I think the best summary of my response. I strongly suggest whichever committer ends up looking at this consider my original version unchanged

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

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 06:53:29PM -0700, David G. Johnston wrote: > On Friday, March 20, 2015, Bruce Momjian wrote: > > On Fri, Mar 20, 2015 at 05:50:03PM -0700, David G. Johnston wrote: > > ​I'm not sure that this particular feature of the standard is something > we > > should e

Re: [HACKERS] GSSAPI, SSPI - include_realm default

2015-03-20 Thread Bruce Momjian
On Tue, Dec 9, 2014 at 05:38:25PM -0500, Stephen Frost wrote: > > My comment that include_realm is supported back to 8.4 was because there > > is an expectation that a pg_hba.conf file can be used unchanged across > > several major releases. So when 9.5 comes out and people update their > > pg_hb

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

2015-03-20 Thread David G. Johnston
On Friday, March 20, 2015, Bruce Momjian wrote: > On Fri, Mar 20, 2015 at 05:50:03PM -0700, David G. Johnston wrote: > > ​I'm not sure that this particular feature of the standard is something > we > > should encourage. > > > > Its actually quite useful in this situation, and so maybe the novelty

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

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 05:50:03PM -0700, David G. Johnston wrote: > ​I'm not sure that this particular feature of the standard is something we > should encourage. > > Its actually quite useful in this situation, and so maybe the novelty is just > making me nervous,​ but the only reason I know of

Re: [HACKERS] PATCH: pgbench - merging transaction logs

2015-03-20 Thread Tomas Vondra
Hi, On 20.3.2015 13:43, Fabien COELHO wrote: > > Hello Robert, > >>> The fprintf we are talking about occurs at most once per pgbench >>> transaction, possibly much less when aggregation is activated, >>> and this transaction involves networks exchanges and possibly >>> disk writes on the serve

Re: [HACKERS] GSoC - Idea Discussion

2015-03-20 Thread Kouhei Kaigai
> KaiGai Kohei: > >It seems to me you are a little bit optimistic. > >Unlike CPU code, GPU-Sorting logic has to reference device memory space, > >so all the data to be compared needs to be transferred to GPU devices. > >Any pointer on host address space is not valid on GPU calculation. > >Amount of

Re: [HACKERS] Abbreviated keys for Numeric

2015-03-20 Thread Peter Geoghegan
Attached is a revision of this patch, that I'm calling v2. What do you think, Andrew? I've cut the int32 representation/alternative !USE_FLOAT8_BYVAL encoding scheme entirely, which basically means that 32-bit systems don't get to have this optimization. 64-bit systems have been commonplace now fo

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

2015-03-20 Thread David G. Johnston
On Fri, Mar 20, 2015 at 1:47 PM, Alvaro Herrera wrote: > Bruce Momjian wrote: > > On Fri, Mar 20, 2015 at 08:54:24AM -0700, David G. Johnston wrote: > > > > 1. The layout of the format version is different, with respect to > newlines, > > > than the quote version; but while using newlines for the

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-20 Thread Jim Nasby
On 3/19/15 9:07 AM, Thom Brown wrote: > jsonb_to_array > -- >{a, 1, b, c, 2, d, 3, 4} Is there a use-case for the example you've given above, where you take JSON containing objects and arrays, and flatten them out into a one-dimensi

Re: [HACKERS] Superuser connect during smart shutdown

2015-03-20 Thread Jim Nasby
On 3/20/15 9:44 AM, Kevin Grittner wrote: Robert Haas wrote: On Thu, Mar 19, 2015 at 10:42 PM, Bruce Momjian wrote: 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, b

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

2015-03-20 Thread Jim Nasby
On 3/20/15 2:48 PM, Pavel Stehule wrote: 2015-03-20 18:47 GMT+01:00 Tom Lane mailto:t...@sss.pgh.pa.us>>: Alvaro Herrera mailto:alvhe...@2ndquadrant.com>> writes: > Pavel Stehule wrote: >> I am thinking, so it is ok - it returns a offset, not position. > So you can't use it as

Re: [HACKERS] Patch: Add launchd Support

2015-03-20 Thread David E. Wheeler
On Mar 20, 2015, at 4:21 PM, Jim Nasby wrote: > > On 3/20/15 6:11 PM, David E. Wheeler wrote: >> ProgramArguments >> >> /usr/local/pgsql/bin/postgres >> -D >> /usr/local/pgsql/data >> > > Hrm, would /var/db/postgres be better? I'm not sure

Re: [HACKERS] Patch: Add launchd Support

2015-03-20 Thread Jim Nasby
On 3/20/15 6:11 PM, David E. Wheeler wrote: ProgramArguments /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data Hrm, would /var/db/postgres be better? I'm not sure if the stuff Apple does with /private/ would cause p

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Jim Nasby
On 3/20/15 6:09 PM, Robert Haas wrote: On Fri, Mar 20, 2015 at 3:26 PM, Joshua D. Drake wrote: Fair enough. I am not going to name names but over the years (and just today) I ran into another user that corrupted their database by turning off fsync. My experience is different than yours: I hav

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Jim Nasby
On 3/20/15 2:49 PM, Stephen Frost wrote: How about a big warning around fsync and make it more indepenent from the options around it? +1, and the same for full_page_writes and wal_sync_method. I think that's the best we can do at this point. As for why; Postgres already has a big reputation

Re: [HACKERS] Patch: Add launchd Support

2015-03-20 Thread David E. Wheeler
On Mar 19, 2015, at 8:12 PM, Bruce Momjian wrote: > Where are we on this? I suggested this plist: Disabled Label org.postgresql.postgresql UserName postgres GroupName postgres ProgramArguments /us

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 3:26 PM, Joshua D. Drake wrote: > Fair enough. I am not going to name names but over the years (and just > today) I ran into another user that corrupted their database by turning off > fsync. My experience is different than yours: I haven't found this to be a particularly

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

2015-03-20 Thread Max Filippov
On Fri, Mar 20, 2015 at 3:43 PM, Max Filippov wrote: > Ok, one more attempt: maybe instead of checking that stderr is empty > we could check that stderr has changed in the presence of the option > that we test? The patch: http://www.postgresql.org/message-id/1426860321-13586-1-git-send-email-jcmv

Re: [HACKERS] Change of pg_ctl's default shutdown method

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 6:19 PM, Bruce Momjian wrote: > I have not re-ordered the shutdown method options because I am trying to > keep the list logical, from least to most severe, so "smart" is still > listed first. It is odd that the default is the middle option, but I > don't see any other ide

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

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 2:51 PM, Andrew Gierth wrote: >> "Robert" == Robert Haas writes: > >> Then maybe stderr tests should grep output for a specific option, > >> the one we're currently testing, not just any noise? > > Robert> That sounds awfully fragile to me. It can't really be safe

Re: [HACKERS] PITR failing to stop before DROP DATABASE

2015-03-20 Thread Bruce Momjian
On Wed, Nov 26, 2014 at 12:35:27PM +0100, Christoph Berg wrote: > Re: Heikki Linnakangas 2014-11-26 <54759bc0.4070...@vmware.com> > > >Oh ok. So this is an artifact of the non-transactionality (is this a > > >word?) of CREATE DATABASE. > > > > DROP DATABASE. CREATE DATABASE is a different story. I

Re: [HACKERS] A possbile typo in src/bin/pg_dump.c

2015-03-20 Thread Bruce Momjian
On Tue, Nov 25, 2014 at 02:45:00PM +0900, Amit Langote wrote: > > Hi, > > I found in pg_dump.c what I believe to be a typo. > > -* relationships are set up by doing ALTER INHERIT rather than > using > +* relationships are set up by doing ALTER TABLE INHERIT > rath

Re: [HACKERS] GIN code managing entry insertion not able to differentiate fresh and old indexes

2015-03-20 Thread Bruce Momjian
On Thu, Nov 20, 2014 at 05:22:02PM +0900, Michael Paquier wrote: > Hi all, > > While playing with the GIN code for an upcoming patch, I noticed that > when inserting a new entry in a new index, this code path is not able > to make the difference if the index is in a build state or not. > Basically

[HACKERS] Change of pg_ctl's default shutdown method

2015-03-20 Thread Bruce Momjian
We originally chose "smart" as the default pg_ctl shutdown method because it was the least disruptive, but experience has shown that it is too polite, so the current default is inconvenient. We have discussed changing the default shutdown mode to "fast", and 9.5 might be the release where we do th

Re: [HACKERS] vacuumdb: Help text for --analyze-only.

2015-03-20 Thread Bruce Momjian
On Tue, Nov 18, 2014 at 12:40:51AM +0100, Mats Erik Andersson wrote: > Hello there, > > I observe that the help text of vacuumdb for --analyze, > --analyze-only, and --analyze-in-stages could do with > a little clarification in order to be self-documenting > and thus improve the user experience of

Re: [HACKERS] WIP: multivariate statistics / proof of concept

2015-03-20 Thread Tomas Vondra
Hello, On 20.3.2015 09:33, Kyotaro HORIGUCHI wrote: > Hello, > > > Patch 0001 needs changes for OIDs since my patch was > committed. The attached is compatible with current master. Thanks. I plan to submit a new version of the patch in a few days, with significant progress in various directions

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

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 06:05:35PM -0300, Alvaro Herrera wrote: > Bruce Momjian wrote: > > On Fri, Mar 20, 2015 at 05:47:49PM -0300, Alvaro Herrera wrote: > > > > BTW very long lines are undesirable because they are truncated in the > > > PDF output. > > > > True, but the length was only 95 chara

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

2015-03-20 Thread Alvaro Herrera
Bruce Momjian wrote: > On Fri, Mar 20, 2015 at 05:47:49PM -0300, Alvaro Herrera wrote: > > BTW very long lines are undesirable because they are truncated in the > > PDF output. > > True, but the length was only 95 characters --- is that too long for our > PDFs? I built some PDFs when I did the A

Re: [HACKERS] Typos in CREATE TABLE doc

2015-03-20 Thread Bruce Momjian
On Thu, Nov 13, 2014 at 08:30:49PM +0900, Etsuro Fujita wrote: > (2014/11/13 20:07), Heikki Linnakangas wrote: > > On 11/13/2014 12:45 PM, Etsuro Fujita wrote: > >> It seems to me there are typos in the reference page for CREATE TABLE. > > > > The structure of the sentence is a bit funky, but it s

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

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 05:47:49PM -0300, Alvaro Herrera wrote: > Bruce Momjian wrote: > > On Fri, Mar 20, 2015 at 08:54:24AM -0700, David G. Johnston wrote: > > > > 1. The layout of the format version is different, with respect to > > > newlines, > > > than the quote version; but while using new

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

2015-03-20 Thread Alvaro Herrera
Bruce Momjian wrote: > On Fri, Mar 20, 2015 at 08:54:24AM -0700, David G. Johnston wrote: > > 1. The layout of the format version is different, with respect to newlines, > > than the quote version; but while using newlines for the mandatory > > concatenation is good having an excessively long form

Re: [HACKERS] Repeatable read and serializable transactions see data committed after tx start

2015-03-20 Thread Bruce Momjian
On Sat, Nov 8, 2014 at 09:53:18PM +0100, Álvaro Hernández Tortosa wrote: > > On 07/11/14 22:02, Greg Sabino Mullane wrote: > >Kevin Grittner wrote: > >>>I think most people have always assumed that > >>>BEGIN starts the transaction and that is the point at > >>>which the snapshot is obtained. > >

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

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 08:54:24AM -0700, David G. Johnston wrote: > ​Looking at ​http://momjian.us/tmp/pgsql/plpgsql-statements.html# > PLPGSQL-STATEMENTS-EXECUTING-DYN > > The paired example at the top of the patch has two things worth considering. > > 1. The layout of the format version is dif

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

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 08:43:21AM -0700, David G. Johnston wrote: > On Thu, Mar 19, 2015 at 6:49 PM, Bruce Momjian wrote: > It is making a point about nulls and stuff.  There are later queries > that use format(). > > I thought maybe you meant those but your specific mention of "​ > ​ > T

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Stephen Frost
* Joshua D. Drake (j...@commandprompt.com) wrote: > On 03/20/2015 10:45 AM, Tom Lane wrote: > >I would object to that, because it would make it vastly more difficult > >to use fsync=off easily for development. > > How so? alter system fsync on/off (meta) > restart > > That seems easier than editi

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

2015-03-20 Thread Pavel Stehule
2015-03-20 18:47 GMT+01:00 Tom Lane : > Alvaro Herrera writes: > > Pavel Stehule wrote: > >> I am thinking, so it is ok - it returns a offset, not position. > > > So you can't use it as a subscript? That sounds unfriendly. Almost > > every function using this will be subtly broken. > > I concur

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Greg Stark
On Fri, Mar 20, 2015 at 7:29 PM, Joshua D. Drake wrote: > I am not going to raise a huge stink or anything but it seems rather > simple. > ALTER SYSTEM is, if anything, more accessible and easier to do without reading comments and warnings than config files. If it were a green field then namin

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Gavin Flower
On 21/03/15 08:15, Tom Lane wrote: My Salesforce colleagues noticed some tests flapping as a result of table CHECK constraints not always being enforced in the same order; ie, if a tuple insertion/update violates more than one CHECK constraint, it's not deterministic which one is reported. This

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Tom Lane
=?UTF-8?Q?Fabr=C3=ADzio_de_Royes_Mello?= writes: > On Fri, Mar 20, 2015 at 4:19 PM, Peter Geoghegan wrote: >> On Fri, Mar 20, 2015 at 12:15 PM, Tom Lane wrote: >>> We could fix it by, say, having CheckConstraintFetch() sort the >>> constraints by name after loading them. >> What not by OID, as

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Joshua D. Drake
On 03/20/2015 10:47 AM, Peter Geoghegan wrote: On Fri, Mar 20, 2015 at 9:52 AM, Joshua D. Drake wrote: There are just as many people that are running with scissors that are now running (or attempting to run) our elephant in production. Does it make sense to remove fsync (and possibly full_pag

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Joshua D. Drake
On 03/20/2015 10:45 AM, Tom Lane wrote: "Joshua D. Drake" writes: There are just as many people that are running with scissors that are now running (or attempting to run) our elephant in production. Evidence please. Fair enough. I am not going to name names but over the years (and just to

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Fabrízio de Royes Mello
On Fri, Mar 20, 2015 at 4:19 PM, Peter Geoghegan wrote: > > On Fri, Mar 20, 2015 at 12:15 PM, Tom Lane wrote: > > We could fix it by, say, having CheckConstraintFetch() sort the > > constraints by name after loading them. > > > What not by OID, as with indexes? Are you suggesting that this would

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Stephen Frost
* Tom Lane (t...@sss.pgh.pa.us) wrote: > My Salesforce colleagues noticed some tests flapping as a result of table > CHECK constraints not always being enforced in the same order; ie, if a > tuple insertion/update violates more than one CHECK constraint, it's not > deterministic which one is report

Re: [HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Peter Geoghegan
On Fri, Mar 20, 2015 at 12:15 PM, Tom Lane wrote: > We could fix it by, say, having CheckConstraintFetch() sort the > constraints by name after loading them. What not by OID, as with indexes? Are you suggesting that this would become documented behavior? -- Peter Geoghegan -- Sent via pgsql

[HACKERS] Order of enforcement of CHECK constraints?

2015-03-20 Thread Tom Lane
My Salesforce colleagues noticed some tests flapping as a result of table CHECK constraints not always being enforced in the same order; ie, if a tuple insertion/update violates more than one CHECK constraint, it's not deterministic which one is reported. This is evidently because relcache.c's Che

Re: [HACKERS] inherit support for foreign tables

2015-03-20 Thread Tom Lane
Etsuro Fujita writes: > I noticed that the latter disallows TRUNCATE on inheritance trees that > contain at least one child foreign table. But I think it would be > better to allow it, with the semantics that we quietly ignore the child > foreign tables and apply the operation to the child pla

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

2015-03-20 Thread Andrew Gierth
> "Robert" == Robert Haas writes: >> Then maybe stderr tests should grep output for a specific option, >> the one we're currently testing, not just any noise? Robert> That sounds awfully fragile to me. It can't really be safe to Robert> assume we know precisely what the warning messages

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 1:24 PM, Thom Brown wrote: >> OK, thanks. That looks like it's probably the fault of parallel seq >> scan patch rather than this one. It would help if you could build >> with debug symbols so that we can see line numbers and arguments. > > Sure. > > Program received signa

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Peter Geoghegan
On Fri, Mar 20, 2015 at 9:52 AM, Joshua D. Drake wrote: > There are just as many people that are running with scissors that are now > running (or attempting to run) our elephant in production. Does it make > sense to remove fsync (and possibly full_page_writes) from such a visible > place as postg

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

2015-03-20 Thread Tom Lane
Alvaro Herrera writes: > Pavel Stehule wrote: >> I am thinking, so it is ok - it returns a offset, not position. > So you can't use it as a subscript? That sounds unfriendly. Almost > every function using this will be subtly broken. I concur; perhaps "offset" was the design intention, but it's

Re: [HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Tom Lane
"Joshua D. Drake" writes: > There are just as many people that are running with scissors that are > now running (or attempting to run) our elephant in production. Evidence please. > Does it > make sense to remove fsync (and possibly full_page_writes) from such a > visible place as postgresql.

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

2015-03-20 Thread Pavel Stehule
2015-03-20 18:29 GMT+01:00 Alvaro Herrera : > Pavel Stehule wrote: > > 2015-03-20 17:49 GMT+01:00 Dean Rasheed : > > > > > There's an issue when the array's lower bound isn't 1: > > > > > > select array_offset('[2:4]={1,2,3}'::int[], 1); > > > array_offset > > > -- > > > 1

[HACKERS] Remove fsync ON/OFF as a visible option?

2015-03-20 Thread Joshua D. Drake
Hello, There are just as many people that are running with scissors that are now running (or attempting to run) our elephant in production. Does it make sense to remove fsync (and possibly full_page_writes) from such a visible place as postgresql.conf? I don't think we should remove the fea

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

2015-03-20 Thread Alvaro Herrera
Pavel Stehule wrote: > 2015-03-20 17:49 GMT+01:00 Dean Rasheed : > > > There's an issue when the array's lower bound isn't 1: > > > > select array_offset('[2:4]={1,2,3}'::int[], 1); > > array_offset > > -- > > 1 > > (1 row) > > > > whereas I would expect this to return 2.

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Thom Brown
On 20 March 2015 at 15:25, Robert Haas wrote: > On Fri, Mar 20, 2015 at 11:08 AM, Thom Brown wrote: >> On 20 March 2015 at 15:02, Robert Haas wrote: >>> On Fri, Mar 20, 2015 at 10:24 AM, Thom Brown wrote: 2015-03-20 14:19:31 GMT [4273]: [78-1] user=,db=,client= DEBUG: server process (

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

2015-03-20 Thread David Christensen
> On Mar 20, 2015, at 11:10 AM, David G. Johnston > wrote: > > On Fri, Mar 20, 2015 at 9:04 AM, Robert Haas wrote: > On Fri, Mar 20, 2015 at 10:54 AM, David Christensen > wrote: > > In that case, the other thought I had here is that we change the function > > signature of current_setting()

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

2015-03-20 Thread Pavel Stehule
2015-03-20 17:49 GMT+01:00 Dean Rasheed : > On 18 March 2015 at 19:03, Alvaro Herrera > wrote: > > Pushed after adding error checks there and fixing the docs to match. > > Please verify. > > > > There's an issue when the array's lower bound isn't 1: > > select array_offset('[2:4]={1,2,3}'::int[],

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

2015-03-20 Thread Dean Rasheed
On 18 March 2015 at 19:03, Alvaro Herrera wrote: > Pushed after adding error checks there and fixing the docs to match. > Please verify. > There's an issue when the array's lower bound isn't 1: select array_offset('[2:4]={1,2,3}'::int[], 1); array_offset -- 1 (1 row) wh

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

2015-03-20 Thread David G. Johnston
On Fri, Mar 20, 2015 at 9:04 AM, Robert Haas wrote: > On Fri, Mar 20, 2015 at 10:54 AM, David Christensen > wrote: > > In that case, the other thought I had here is that we change the > function signature of current_setting() to be a two-arg form where the > second argument is a boolean "throw_e

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

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 10:54 AM, David Christensen wrote: > In that case, the other thought I had here is that we change the function > signature of current_setting() to be a two-arg form where the second argument > is a boolean "throw_error", with a default argument of true to preserve > exis

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

2015-03-20 Thread David G. Johnston
​Looking at ​ http://momjian.us/tmp/pgsql/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN The paired example at the top of the patch has two things worth considering. 1. The layout of the format version is different, with respect to newlines, than the quote version; but while using newli

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

2015-03-20 Thread David G. Johnston
On Thu, Mar 19, 2015 at 6:49 PM, Bruce Momjian wrote: > 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 exam

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 11:08 AM, Thom Brown wrote: > On 20 March 2015 at 15:02, Robert Haas wrote: >> On Fri, Mar 20, 2015 at 10:24 AM, Thom Brown wrote: >>> 2015-03-20 14:19:31 GMT [4273]: [78-1] user=,db=,client= DEBUG: >>> server process (PID 4285) was terminated by signal 11: Segmentation >

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Thom Brown
On 20 March 2015 at 15:02, Robert Haas wrote: > On Fri, Mar 20, 2015 at 10:24 AM, Thom Brown wrote: >> 2015-03-20 14:19:31 GMT [4273]: [78-1] user=,db=,client= DEBUG: >> server process (PID 4285) was terminated by signal 11: Segmentation >> fault > > Any chance you can get us a stack backtrace of

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 10:24 AM, Thom Brown wrote: > 2015-03-20 14:19:31 GMT [4273]: [78-1] user=,db=,client= DEBUG: > server process (PID 4285) was terminated by signal 11: Segmentation > fault Any chance you can get us a stack backtrace of this crash? -- Robert Haas EnterpriseDB: http://www.

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

2015-03-20 Thread David Christensen
> On Mar 19, 2015, at 6:27 PM, Tom Lane wrote: > > 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

Re: [HACKERS] Superuser connect during smart shutdown

2015-03-20 Thread Kevin Grittner
Robert Haas wrote: > On Thu, Mar 19, 2015 at 10:42 PM, Bruce Momjian wrote: >> 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 wa

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

2015-03-20 Thread Alvaro Herrera
By the way, acx-pthread.m4 has an outdated link to upstream acx_pthread.m4. The correct link is http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=history;f=m4/ax_pthread.m4 -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA,

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Thom Brown
On 20 March 2015 at 13:55, Thom Brown wrote: > On 20 March 2015 at 13:16, Alvaro Herrera wrote: >> Thom Brown wrote: >>> On 18 March 2015 at 16:01, 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: >>>

Re: [HACKERS] printing table in asciidoc with psql

2015-03-20 Thread Bruce Momjian
On Wed, Dec 3, 2014 at 03:52:30PM +0900, Michael Paquier wrote: > > I see a trailing spaces, but I don't see a described effect. Please, can you > > send some more specific test case? > > This formatting problem is trivial to reproduce: > =# create table "foo" (); > > CREATE TABLE > Time: 9.826

[HACKERS] [PATCH] Compare linker/compiler output with their default output

2015-03-20 Thread Max Filippov
linker and compiler may have noisy output by default, making acx_pthread.m4 believe that pthread options that it tries are ignored as invalid. Record default compiler and linker output and see if adding pthread option changes that, instead of assuming that linker and compiler are silent by default

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Thom Brown
On 20 March 2015 at 13:16, Alvaro Herrera wrote: > Thom Brown wrote: >> On 18 March 2015 at 16:01, 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 hur

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

2015-03-20 Thread Alvaro Herrera
Andres Freund wrote: > On 2015-03-20 10:23:51 -0300, Alvaro Herrera wrote: > > Andres Freund wrote: > > > FWIW, I think emitting such errors at link time is utterly pointless and > > > rather annoying. I can see a point of emitting them them when compiling > > > code that uses deprecated functions.

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

2015-03-20 Thread Andres Freund
On 2015-03-20 10:23:51 -0300, Alvaro Herrera wrote: > Andres Freund wrote: > > FWIW, I think emitting such errors at link time is utterly pointless and > > rather annoying. I can see a point of emitting them them when compiling > > code that uses deprecated functions. But we quite obviously can't d

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-20 Thread Dmitry Dolgov
> Would this also be the case for this function?... > # jsonb_add_to_path('{"b": {"c": ["d", "f"]}}'::jsonb, {b, c}::text[], > '{"g":4}'::jsonb); > jsonb_add_to_path > > {"b": {"c": ["d", "f", {"g": 4}]}} Yes, sure (the similar logic already implemented

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

2015-03-20 Thread Alvaro Herrera
Andres Freund wrote: > Hi, > > On 2015-03-20 03:14:48 +0300, Max Filippov wrote: > > and the toolchain emits the following warning at linking step: > > > > libcrypto.so: warning: gethostbyname is obsolescent, use > > getnameinfo() instead. > > FWIW, I think emitting such errors at link time is

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Alvaro Herrera
Thom Brown wrote: > On 18 March 2015 at 16:01, 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 p

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

2015-03-20 Thread Andres Freund
Hi, On 2015-03-20 03:14:48 +0300, Max Filippov wrote: > and the toolchain emits the following warning at linking step: > > libcrypto.so: warning: gethostbyname is obsolescent, use > getnameinfo() instead. FWIW, I think emitting such errors at link time is utterly pointless and rather annoying.

[HACKERS] Re: [BUGS] BUG #11805: Missing SetServiceStatus call during service shutdown in pg_ctl (Windows only)

2015-03-20 Thread Bruce Momjian
On Tue, Oct 28, 2014 at 07:02:41AM +, krystian.bi...@gmail.com wrote: > The following bug has been logged on the website: > > Bug reference: 11805 > Logged by: Krystian Bigaj > Email address: krystian.bi...@gmail.com > PostgreSQL version: 9.3.5 > Operating system: Windows

Re: [HACKERS] POLA violation with \c service=

2015-03-20 Thread David Fetter
On Fri, Feb 27, 2015 at 08:42:29AM -0800, David Fetter wrote: > On Mon, Feb 23, 2015 at 05:56:12PM -0300, Alvaro Herrera wrote: > > > > David Fetter wrote: > > > > > My thinking behind this was that the patch is a bug fix and intended > > > to be back-patched, so I wanted to mess with as little i

Re: [HACKERS] PATCH: pgbench - merging transaction logs

2015-03-20 Thread Fabien COELHO
Hello Robert, The fprintf we are talking about occurs at most once per pgbench transaction, possibly much less when aggregation is activated, and this transaction involves networks exchanges and possibly disk writes on the server. random() was occurring four times per transaction rather than

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

2015-03-20 Thread Max Filippov
On Fri, Mar 20, 2015 at 3:05 PM, Robert Haas wrote: > On Fri, Mar 20, 2015 at 7:01 AM, Max Filippov wrote: >> On Fri, Mar 20, 2015 at 6:08 AM, Tom Lane wrote: >>> We don't want every link step producing a useless warning. >>> Ideally, "make -s" would print nothing whatsoever; to the extent that

Re: [HACKERS] "snapshot too large" error when initializing logical replication (9.4)

2015-03-20 Thread Bruce Momjian
On Mon, Nov 17, 2014 at 03:52:38PM +0100, Andres Freund wrote: > On 2014-11-17 11:51:54 -0300, Alvaro Herrera wrote: > > Andres Freund wrote: > > > Hi, > > > > > > On 2014-10-25 18:09:36 -0400, Steve Singer wrote: > > > > I sometimes get the error "snapshot too large" from my logical > > > > repl

Re: [HACKERS] Incorrect comment in tablecmds.c

2015-03-20 Thread Bruce Momjian
On Thu, Oct 23, 2014 at 06:29:07PM +0900, Etsuro Fujita wrote: > I don't think that the lock level mentioned in the following comment in > MergeAttributes() in tablecmds.c is right, since that that function has > opened the relation with ShareUpdateExclusiveLock, not with > AccessShareLock. Patch

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

2015-03-20 Thread Bruce Momjian
On Fri, Mar 20, 2015 at 08:05:48AM -0400, Robert Haas wrote: > On Fri, Mar 20, 2015 at 7:01 AM, Max Filippov wrote: > > On Fri, Mar 20, 2015 at 6:08 AM, Tom Lane wrote: > >> We don't want every link step producing a useless warning. > >> Ideally, "make -s" would print nothing whatsoever; to the e

Re: [HACKERS] assessing parallel-safety

2015-03-20 Thread Thom Brown
On 18 March 2015 at 16:01, 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 parallel-

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

2015-03-20 Thread Robert Haas
On Fri, Mar 20, 2015 at 7:01 AM, Max Filippov wrote: > On Fri, Mar 20, 2015 at 6:08 AM, Tom Lane wrote: >> We don't want every link step producing a useless warning. >> Ideally, "make -s" would print nothing whatsoever; to the extent that >> tools produce unsuppressable routine chatter, that's ev

Re: [HACKERS] Superuser connect during smart shutdown

2015-03-20 Thread Robert Haas
On Thu, Mar 19, 2015 at 10:42 PM, Bruce Momjian wrote: > 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

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-20 Thread Thom Brown
On 20 March 2015 at 11:21, Dmitry Dolgov <9erthali...@gmail.com> wrote: >> Perhaph it's my misunderstanding, but this would seem to be more of an >> intersection operation on keys rather than a delete. > Hm...why? We remove all elements, which are contains in the first and second > jsonb ("f": [4,

Re: [HACKERS] GSoC - Idea Discussion

2015-03-20 Thread hitesh ramani
Hello devs, Thank you so much for the feedback, to answer to your questions: Tomas:>So you've created an array of 1M integers, and it's 7x faster on GPU >compared to pg_qsort(), correct? No, I meant general sorting, not on pg_qsort() >Well, it might surprise you, but PostgreSQL almost never sorts

Re: [HACKERS] GSoC 2015: Extra Jsonb functionality

2015-03-20 Thread Dmitry Dolgov
> Perhaph it's my misunderstanding, but this would seem to be more of an intersection operation on keys rather than a delete. Hm...why? We remove all elements, which are contains in the first and second jsonb ("f": [4, 5] in this case) from the first one. > Could there be a corresponding jsonb_exc

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

2015-03-20 Thread Max Filippov
On Fri, Mar 20, 2015 at 6:08 AM, Tom Lane wrote: > We don't want every link step producing a useless warning. > Ideally, "make -s" would print nothing whatsoever; to the extent that > tools produce unsuppressable routine chatter, that's evil because it > makes it harder to notice actually-useful w

  1   2   >