Re: [HACKERS] Relation extension scalability

2016-03-26 Thread Dilip Kumar
On Sat, Mar 26, 2016 at 8:07 AM, Robert Haas wrote: > I think we need to start testing these patches not only in terms of > how *fast* they are but how *large* the relation ends up being when > we're done. A patch that inserts the rows slower but the final > relation is

Re: [HACKERS] multivariate statistics v14

2016-03-26 Thread Tatsuo Ishii
> Fair point. Attached is v18 of the patch, after pgindent cleanup. Here are some feedbacks to v18 patch. 1) regarding examples in create_statistics manual Here are numbers I got. "with statistics" referrers to the case where multivariate statistics are used. "without statistics" referrers to

[HACKERS] Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c

2016-03-26 Thread Piotr Stefaniak
Hi, using sqlsmith and UBSan I have found these two division by zero errors: src/backend/optimizer/plan/planner.c:4846 /* Convert absolute # of tuples to a fraction; no need to clamp */ if (tuple_fraction >= 1.0) { tuple_fraction /= best_path->rows;

[HACKERS] Building PL/Perl with ActiveState Perl 5.22 and MSVC

2016-03-26 Thread Victor Wagner
Collegues, Since patches to support building postgres itself with newest version of ActivePerl was commited into REL9_5_STABLE branch, I've tried to build postgres with PL/Perl using this version of Perl. I'm using Visual Studio 2013 Community edition. It turns out that while ActiveState seems

Re: [HACKERS] Alter or rename enum value

2016-03-26 Thread Andrew Dunstan
On 03/26/2016 10:25 AM, Tom Lane wrote: Andrew Dunstan writes: We don't have the luxury of being able to redesign this as a green fields development. I'm not actually convinced that we need to do anything. SQL already has a perfectly good mechanism for enforcing that a

Re: [HACKERS] Can we amend gitignore so git postgresql works with git on windows using Msys/Mingw64

2016-03-26 Thread Tom Lane
David Rowley writes: > On 26 March 2016 at 09:26, Regina Obe wrote: >> The problem is I can't compile from git postgresql, and the issue is I think >> because my git when it pulls down the files they come in as CRLF which gets >> all screwed up when

Re: [HACKERS] If a schema is created as part of an extension, should all user created tables created in that schema be considered part of the extension?

2016-03-26 Thread Tom Lane
"Regina Obe" writes: > I just discovered something which was a little alarming to me. > In the postgis_tiger_geocoder extension, I had switched to having the schema > where user data download is stored created as part of create extension > script so I wouldn't need to check during

Re: [HACKERS] pg_rewind test race condition..?

2016-03-26 Thread Michael Paquier
On Wed, Apr 29, 2015 at 10:03 PM, Stephen Frost wrote: > Another thought would be to provide an option to pg_rewind to have it do > an explicit checkpoint before it reads the control file.. I'm not > against having it simply always do it as I don't see pg_rewind being a >

Re: [HACKERS] Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c

2016-03-26 Thread Tom Lane
Piotr Stefaniak writes: > using sqlsmith and UBSan I have found these two division by zero errors: Hmm, thanks. Seems there's a bit of a disagreement as to whether path->rows is allowed to be zero or not. It normally isn't; but we've created an exception that

Re: [HACKERS] Can we amend gitignore so git postgresql works with git on windows using Msys/Mingw64

2016-03-26 Thread David Rowley
On 26 March 2016 at 09:26, Regina Obe wrote: > The problem is I can't compile from git postgresql, and the issue is I think > because my git when it pulls down the files they come in as CRLF which gets > all screwed up when compiling under msys/ mingw64. > So I end up with

Re: [HACKERS] Alter or rename enum value

2016-03-26 Thread Andrew Dunstan
On 03/26/2016 12:35 AM, David G. Johnston wrote: On Friday, March 25, 2016, Andrew Dunstan > wrote: On 03/25/2016 04:13 AM, Matthias Kurz wrote: Hopefully at the commitfest at least the transaction limitation will/could

Re: [HACKERS] Alter or rename enum value

2016-03-26 Thread Tom Lane
Andrew Dunstan writes: > We don't have the luxury of being able to redesign this as a green > fields development. I'm not actually convinced that we need to do anything. SQL already has a perfectly good mechanism for enforcing that a column contains only values of a

Re: [HACKERS] Performance degradation in commit 6150a1b0

2016-03-26 Thread Ashutosh Sharma
Hi, I am getting some reject files while trying to apply "*pinunpin-cas-5.patch*" attached with the thread, *http://www.postgresql.org/message-id/capphfdsrot1jmsnrnccqpnzeu9vut7tx6b-n1wyouwwfhd6...@mail.gmail.com

Re: [HACKERS] Two division by 0 errors in optimizer/plan/planner.c and optimizer/path/costsize.c

2016-03-26 Thread Piotr Stefaniak
I'm not saying this is necessarily a bug since the whole function deals with floats, but perhaps it's interesting to note that ndistinct can be 0 in src/backend/utils/adt/selfuncs.c:estimate_hash_bucketsize: /* * Initial estimate of bucketsize fraction is 1/nbuckets as long as

Re: [HACKERS] multivariate statistics v14

2016-03-26 Thread Alvaro Herrera
Tomas Vondra wrote: > There are a few places where I reverted the pgindent formatting, because it > seemed a bit too weird - the first one are the lists of function prototypes > in common.h/mvstat.h, the second one are function calls to > _greedy/_exhaustive methods. Function prototypes being

[HACKERS] Typo in comment

2016-03-26 Thread Thomas Munro
Hi, Here are a couple of patches to fix a typo in a comment in latch.c: - * The memory barrier has be to be placed here to ensure that any flag + * The memory barrier has to be placed here to ensure that any flag Thanks, -- Thomas Munro http://www.enterprisedb.com typo.patch Description:

Re: [HACKERS] Performance degradation in commit 6150a1b0

2016-03-26 Thread Ashutosh Sharma
Hi, As mentioned in my earlier mail i was not able to apply *pinunpin-cas-5.patch* on commit *6150a1b0, *therefore i thought of applying it on the latest commit and i was able to do it successfully. I have now taken the performance readings at latest commit i.e. *76281aa9* with and without

Re: [HACKERS] WIP: Detecting SSI conflicts before reporting constraint violations

2016-03-26 Thread Thomas Munro
On Sat, Mar 26, 2016 at 5:04 AM, David Steele wrote: > Hi Thomas, > > On 3/13/16 8:20 PM, Thomas Munro wrote: > >> <...> I will have another look at this in >> a few days but for now I need to do some other things, so I'm posting >> these observations in case they are in

[HACKERS] Draft release notes for next week's releases

2016-03-26 Thread Tom Lane
I've prepared a first cut at next week's release notes: http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=29b6123ecb4113e366325245cec5a5c221dae691 (As usual, I will make the notes for older branches by extracting relevant items from this list, after it's been reviewed.) Please

Re: [HACKERS] Fix for OpenSSL error queue bug

2016-03-26 Thread Peter Geoghegan
On Wed, Mar 23, 2016 at 9:18 PM, Tom Lane wrote: > in the other order, so as not to assume that ERR_clear_error doesn't > set errno. On the other hand, if it does, things are probably hopelessly > broken anyway; so I'm not sure there is any case where this helps. I'm fine

Re: [HACKERS] Fix for OpenSSL error queue bug

2016-03-26 Thread Tom Lane
Peter Geoghegan writes: > Will this make it into the next point release? I was rather hoping it would. I dunno. I certainly haven't reviewed it carefully enough to commit it. Perhaps Peter has, but time grows short ... regards, tom lane -- Sent via

Re: [HACKERS] If a schema is created as part of an extension, should all user created tables created in that schema be considered part of the extension?

2016-03-26 Thread Regina Obe
> I think the chain of events is that the tiger_data schema is marked as not to be backed up (because it belongs to an extension) and then all of its tables are marked as not to be backed up because they're in a schema that's not to be backed up. The latter > behavior is meant to implement

Re: [HACKERS] Can we amend gitignore so git postgresql works with git on windows using Msys/Mingw64

2016-03-26 Thread Regina Obe
> You can change the setting with: > git config --global core.autocrlf input > Still, it's fair to wonder if we shouldn't add an entry for this to our .gitattributes. I'm actually wondering why we wouldn't apply it to ALL text files in git, not just the extensions Regina mentioned.

Re: [HACKERS] Draft release notes for next week's releases

2016-03-26 Thread Jeff Janes
On Sat, Mar 26, 2016 at 4:34 PM, Tom Lane wrote: > I've prepared a first cut at next week's release notes: > > http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=29b6123ecb4113e366325245cec5a5c221dae691 > > (As usual, I will make the notes for older branches by

Re: [HACKERS] Draft release notes for next week's releases

2016-03-26 Thread Tom Lane
Jeff Janes writes: > On Sat, Mar 26, 2016 at 4:34 PM, Tom Lane wrote: > + Correctly handle wraparound cases in the pg_subtrans > + startup logic for hot standby (Jeff Janes) > This applies to all recovery scenarios, whether they are hot

[HACKERS] AssertArg failure in src/backend/executor/functions.c:check_sql_fn_retval()

2016-03-26 Thread Piotr Stefaniak
Hi, using sqlsmith I found a way to induce an AssertArg failure in src/backend/executor/functions.c:check_sql_fn_retval() for assert-enabled builds. It boils down to creating a function and calling it like this: CREATE FUNCTION bad_argument_assert(anyarray, integer) RETURNS anyarray

Re: [HACKERS] Alter or rename enum value

2016-03-26 Thread Christophe Pettus
On Mar 26, 2016, at 7:40 AM, Andrew Dunstan wrote: > It would be nice if we could find a less broad brush approach to dealing with > the issue. I don't know how doable this is, but could we use the existing mechanism of marking an index invalid if it contains an enum type