Re: [HACKERS] Fixed xloginsert_locks for 9.4

2014-10-02 Thread Peter Geoghegan
On Thu, Oct 2, 2014 at 5:08 PM, Greg Smith wrote: > When 9.4 is already giving a more than 100% gain on this targeted test case, > I can't see that chasing after maybe an extra 10% is worth having yet > another GUC around. Especially when it will probably take multiple tuning > steps before you'r

Re: [HACKERS] Per table autovacuum vacuum cost limit behaviour strange

2014-10-02 Thread Stephen Frost
* Alvaro Herrera (alvhe...@2ndquadrant.com) wrote: > Alvaro Herrera wrote: > > Basically, if you are on 9.3.5 or earlier any per-table options for > > autovacuum cost delay will misbehave (meaning: any such table will be > > processed with settings flattened according to balancing of the standard >

Re: [HACKERS] Patch to add support of "IF NOT EXISTS" to others "CREATE" statements

2014-10-02 Thread Marti Raudsepp
On Tue, Aug 26, 2014 at 4:20 PM, Heikki Linnakangas wrote: > On 04/14/2014 10:31 PM, Fabrízio de Royes Mello wrote: >> The attached patch contains CINE for sequences. >> >> I just strip this code from the patch rejected before. > > Committed with minor changes Hmm, the CommitFest app lists Marko

Re: [HACKERS] CREATE IF NOT EXISTS INDEX

2014-10-02 Thread Marti Raudsepp
On Fri, Oct 3, 2014 at 2:15 AM, Marti Raudsepp wrote: > + ereport(NOTICE, > + (errcode(ERRCODE_DUPLICATE_TABLE), > + errmsg("relation \"%s\" already exists, skipping", > + indexRelationName))); > > 1. Clearly "relation" should be "in

Re: [HACKERS] TAP test breakage on MacOS X

2014-10-02 Thread Robert Haas
On Thu, Oct 2, 2014 at 5:09 PM, Peter Eisentraut wrote: > On 10/2/14 3:19 PM, Robert Haas wrote: >> 1..2 >> ok 1 - initdb with invalid option nonzero exit code >> ok 2 - initdb with invalid option prints error message >> # Looks like your test exited with 256 just after 2. >> not o

Re: [HACKERS] pg_receivexlog and replication slots

2014-10-02 Thread Michael Paquier
On Thu, Oct 2, 2014 at 12:44 AM, Andres Freund wrote: > I pushed the first part. > Thanks. Attached is a rebased version of patch 2, implementing the actual feature. One thing I noticed with more testing is that if --create is used and that the destination folder does not exist, pg_receivexlog wa

[HACKERS] GiST splitting on empty pages

2014-10-02 Thread Andrew Gierth
This is from Bug #11555, which is still in moderation as I type this (analysis was done via IRC). The GiST insertion code appears to have no length checks at all on the inserted entry. index_form_tuple checks for length <= 8191, with the default blocksize, but obviously a tuple less than 8191 byte

Re: [HACKERS] TAP test breakage on MacOS X

2014-10-02 Thread Tom Lane
Robert Haas writes: > make check-world dies ingloriously for me, like this: FWIW, it works fine for me on my Mac laptop, using the Perl 5.16.2 that comes standard with OSX 10.9.5. I did have to install IPC::Run from CPAN though. > # Failed test 'initdb options handling' > # at /opt/local/li

Re: [HACKERS] Patch to add support of "IF NOT EXISTS" to others "CREATE" statements

2014-10-02 Thread Fabrízio de Royes Mello
On Thu, Oct 2, 2014 at 9:38 PM, Marti Raudsepp wrote: > > On Tue, Aug 26, 2014 at 4:20 PM, Heikki Linnakangas > wrote: > > On 04/14/2014 10:31 PM, Fabrízio de Royes Mello wrote: > >> The attached patch contains CINE for sequences. > >> > >> I just strip this code from the patch rejected before. >

Re: [HACKERS] DDL Damage Assessment

2014-10-02 Thread Jim Nasby
On 10/2/14, 2:43 PM, Josh Berkus wrote: >Questions: > > 1. Do you agree that a systematic way to report what a DDL command (or > script, or transaction) is going to do on your production database > is a feature we should provide to our growing user base? Yes. +1 > 2. What do you thin

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

2014-10-02 Thread Jim Nasby
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 format('UPDATE tbl SET %I = newvalue WHERE key = $1', colname) USING keyvalue; Better, b

Re: [HACKERS] TAP test breakage on MacOS X

2014-10-02 Thread Tom Lane
I wrote: > Also, noticing that what you're using is evidently Perl 5.12, I'm > wondering whether our TAP test scripts require a fairly new Perl version. > I recall some of my Salesforce colleagues griping that the TAP scripts > didn't work with older Perls. Well, they definitely don't work with Pe

Re: [HACKERS] CREATE IF NOT EXISTS INDEX

2014-10-02 Thread Fabrízio de Royes Mello
On Thu, Oct 2, 2014 at 8:15 PM, Marti Raudsepp wrote: > > On Wed, Oct 1, 2014 at 2:42 PM, Fabrízio de Royes Mello > wrote: > > So, what's the correct/best grammar? > > CREATE [ IF NOT EXISTS ] [ UNIQUE ] INDEX index_name > > or > > CREATE [ UNIQUE ] INDEX [ IF NOT EXISTS ] index_name > > I've ele

Re: [HACKERS] CREATE IF NOT EXISTS INDEX

2014-10-02 Thread Fabrízio de Royes Mello
On Thu, Oct 2, 2014 at 9:55 PM, Marti Raudsepp wrote: > > On Fri, Oct 3, 2014 at 2:15 AM, Marti Raudsepp wrote: > > + ereport(NOTICE, > > + (errcode(ERRCODE_DUPLICATE_TABLE), > > + errmsg("relation \"%s\" already exists, skipping", > > +

Re: [HACKERS] CREATE IF NOT EXISTS INDEX

2014-10-02 Thread Fabrízio de Royes Mello
On Fri, Oct 3, 2014 at 12:29 AM, Fabrízio de Royes Mello < fabriziome...@gmail.com> wrote: > > > > On Thu, Oct 2, 2014 at 9:55 PM, Marti Raudsepp wrote: > > > > On Fri, Oct 3, 2014 at 2:15 AM, Marti Raudsepp wrote: > > > + ereport(NOTICE, > > > + (errcode(ERRCODE_DUPLICATE_TABLE),

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

2014-10-02 Thread David G Johnston
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 format('UPDATE tbl SET %I = newvalue WHERE key = $1', >> coln

[HACKERS] How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale

2014-10-02 Thread Kouhei Kaigai
Hello, I recently got a trouble on development of my extension that utilizes the shared buffer when it released each buffer page. This extension transfers contents of the shared buffers to GPU device using DMA feature, then kicks a device kernel code. Usually 8KB (= BLCKSZ) is too small as a unit

Re: [HACKERS] How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale

2014-10-02 Thread Tom Lane
Kouhei Kaigai writes: > Idea-1) Put ResourceOwnerForgetBuffer() O(1) logic, instead of O(N^2). > The source of problem come from data structure in ResourceOwnerData, > so a straightforward way is to apply O(1) logic based on hashing, > instead of the linear search. I will bet that this is a dead

Re: [HACKERS] DDL Damage Assessment

2014-10-02 Thread Claudio Freire
On Fri, Oct 3, 2014 at 12:07 AM, Jim Nasby wrote: > On 10/2/14, 2:43 PM, Josh Berkus wrote: >>> >>> >Questions: >>> > >>> > 1. Do you agree that a systematic way to report what a DDL command (or >>> > script, or transaction) is going to do on your production database >>> > is a feature we

Re: [HACKERS] How to make ResourceOwnerForgetBuffer() O(1), instead of O(N^2) scale

2014-10-02 Thread Kouhei Kaigai
> Kouhei Kaigai writes: > > Idea-1) Put ResourceOwnerForgetBuffer() O(1) logic, instead of O(N^2). > > The source of problem come from data structure in ResourceOwnerData, > > so a straightforward way is to apply O(1) logic based on hashing, > > instead of the linear search. > > I will bet that t

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

2014-10-02 Thread Pavel Stehule
Hi 2014-10-03 5:16 GMT+02:00 Jim Nasby : > 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 > No it isn't. I is 100% safe > EXECUTE format('UPDATE tbl

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

2014-10-02 Thread Pavel Stehule
2014-10-03 6:06 GMT+02:00 David G Johnston : > 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 format('UPDATE tbl SE

<    1   2