Re: [HACKERS] Minmax indexes

2013-09-25 Thread Erik Rijkers
On Wed, September 25, 2013 00:14, Alvaro Herrera wrote: [minmax-4-incr.patch] After a --data-checksums initdb (successful), the following error came up: after the statement: create index t_minmax_idx on t using minmax (r); WARNING: page verification failed, calculated checksum 25951 but

Re: [HACKERS] pg_dump/restore encoding woes

2013-09-25 Thread Amit Khandekar
On 27 August 2013 20:06, Heikki Linnakangas hlinnakan...@vmware.com wrote: On 26.08.2013 18:59, Tom Lane wrote: Heikki Linnakangashlinnakangas@**vmware.com hlinnakan...@vmware.com writes: The pg_dump -E option just sets client_encoding, but I think it would be better for -E to only set

[HACKERS] invalid regexp crashes the server on windows or 9.3

2013-09-25 Thread Marc Mamin
Hi, This regexp call freezes with almost 100% CPU usage, so I guess it creates an infinite loop. With Postgres 9.1 on Linux, I can kill the backend cleanly and get following message: cic_db=# select regexp_matches ('aa bb aa ba baa x','(^((?!aa)))+','gx'); ERROR: invalid regular expression:

Re: [HACKERS] Minmax indexes

2013-09-25 Thread Amit Kapila
On Sun, Sep 15, 2013 at 5:44 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Hi, Here's a reviewable version of what I've dubbed Minmax indexes. Some people said they would like to use some other name for this feature, but I have yet to hear usable ideas, so for now I will keep calling

Re: [HACKERS] invalid regexp crashes the server on windows or 9.3

2013-09-25 Thread Erik Rijkers
On Wed, September 25, 2013 09:33, Marc Mamin wrote: Hi, This regexp call freezes with almost 100% CPU usage, so I guess it creates an infinite loop. With Postgres 9.1 on Linux, I can kill the backend cleanly and get following message: cic_db=# select regexp_matches ('aa bb aa ba baa

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-25 Thread David Rowley
On Wed, Sep 25, 2013 at 1:20 AM, Robert Haas robertmh...@gmail.com wrote: On Tue, Sep 24, 2013 at 5:04 AM, David Rowley dgrowle...@gmail.com wrote: So... I guess the question that I'd ask is, if you write a PL/pgsql function that does RAISE NOTICE in a loop a large number of times, can

Re: [HACKERS] [PATCH] Revive line type

2013-09-25 Thread Jeevan Chalke
Hi, I had a look over this patch and here are my review points: 1. Patch applies cleanly. 2. make, make install and make check is good. 3. I did lot of random testing and didn't find any issue. 4. Test coverage is very well. It has all scenarios and all operators are tested with line. That's

Re: [HACKERS] Freezing without write I/O

2013-09-25 Thread Heikki Linnakangas
On 18.09.2013 22:55, Jeff Janes wrote: On Mon, Sep 16, 2013 at 6:59 AM, Heikki Linnakangashlinnakan...@vmware.com wrote: Here's a rebased version of the patch, including the above-mentioned fixes. Nothing else new. I've applied this to 0892ecbc015930d, the last commit to which it applies

[HACKERS] Cube extension split algorithm fix

2013-09-25 Thread Stas Kelvich
Hello, hackers. I've fixed split algorithm that was implemented in cube extension. I've changed it according to the original Guttman paper (old version was more simple algorithm) and also ported Alexander Korotkov's algorithm from box datatype indexing that work faster and better on low

Re: [HACKERS] UTF8 national character data type support WIP patch and list of open issues.

2013-09-25 Thread MauMau
From: Peter Eisentraut pete...@gmx.net On Tue, 2013-09-24 at 21:04 +0900, MauMau wrote: 4. I guess some users really want to continue to use ShiftJIS or EUC_JP for database encoding, and use NCHAR for a limited set of columns to store international text in Unicode: - to avoid code conversion

Re: [HACKERS] Freezing without write I/O

2013-09-25 Thread Peter Eisentraut
On 9/25/13 5:31 AM, Heikki Linnakangas wrote: Attached is a new version, which adds that field to HeapTupleData. Most of the issues on you listed above have been fixed, plus a bunch of other bugs I found myself. The bug that Jeff ran into with his count.pl script has also been fixed. This

Re: [HACKERS] GIN improvements part 1: additional information

2013-09-25 Thread Peter Eisentraut
On 9/23/13 5:36 PM, Alexander Korotkov wrote: In the attached version of patch double finding of ItemPointer during insert is avoided. Overhead becomes lower as expected. Fails cpluspluscheck: ./src/include/access/gin_private.h: In function ‘char* ginDataPageLeafReadItemPointer(char*,

Re: [HACKERS] Cube extension kNN support

2013-09-25 Thread Peter Eisentraut
On 9/22/13 7:38 PM, Stas Kelvich wrote: Here is the patch that introduces kNN search for cubes with euclidean, taxicab and chebyshev distances. cube and earthdistance regression tests fail. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] invalid regexp crashes the server on windows or 9.3

2013-09-25 Thread Tom Lane
Erik Rijkers e...@xs4all.nl writes: On Wed, September 25, 2013 09:33, Marc Mamin wrote: This regexp call freezes with almost 100% CPU usage, so I guess it creates an infinite loop. cic_db=# select regexp_matches ('aa bb aa ba baa x','(^((?!aa)))+','gx'); I poked into this a bit and decided

Re: [HACKERS] Freezing without write I/O

2013-09-25 Thread Heikki Linnakangas
On 25.09.2013 15:48, Peter Eisentraut wrote: On 9/25/13 5:31 AM, Heikki Linnakangas wrote: Attached is a new version, which adds that field to HeapTupleData. Most of the issues on you listed above have been fixed, plus a bunch of other bugs I found myself. The bug that Jeff ran into with his

Re: [HACKERS] Some interesting news about Linux 3.12 OOM

2013-09-25 Thread Greg Stark
On Wed, Sep 25, 2013 at 12:15 AM, Daniel Farina dan...@heroku.com wrote: Enable the memcg OOM killer only for user faults, where it's really the only option available. Is this really a big deal? I would expect most faults to be user faults. It's certainly a big deal that we need to ensure we

Re: [HACKERS] logical changeset generation v6

2013-09-25 Thread Steve Singer
On 09/17/2013 10:31 AM, Andres Freund wrote: This patch set now fails to apply because of the commit Rename various freeze multixact variables. And I am even partially guilty for that patch... Rebased patches attached. While testing the logical replication changes against my WIP logical

[HACKERS] Re: UTF8 national character data type support WIP patch and list of open issues.

2013-09-25 Thread Greg Stark
On Tue, Sep 24, 2013 at 1:04 PM, MauMau maumau...@gmail.com wrote: Yes, so Tatsuo san suggested to restrict server encoding - NCHAR encoding combination to those with lossless conversion. If it's not lossy then what's the point? From the client's point of view it'll be functionally equivalent

Re: [HACKERS] logical changeset generation v6

2013-09-25 Thread Andres Freund
On 2013-09-25 11:01:44 -0400, Steve Singer wrote: On 09/17/2013 10:31 AM, Andres Freund wrote: This patch set now fails to apply because of the commit Rename various freeze multixact variables. And I am even partially guilty for that patch... Rebased patches attached. While testing the

Re: [HACKERS] SSI freezing bug

2013-09-25 Thread Heikki Linnakangas
On 22.09.2013 00:12, Hannu Krosing wrote: On 09/21/2013 10:46 PM, Andres Freund wrote: Heikki Linnakangashlinnakan...@vmware.com schrieb: Kevin Grittnerkgri...@ymail.com wrote: Andres Freundand...@2ndquadrant.com wrote: On 2013-09-20 13:55:36 +0300, Heikki Linnakangas wrote: When a

Re: [HACKERS] record identical operator

2013-09-25 Thread Kevin Grittner
Kevin Grittner kgri...@ymail.com wrote: Here is v2 of the patch which changes from the universally disliked operator names v1 used.  It also fixes bugs in the row comparisons for pass-by-reference types, fixes a couple nearby comments, and adds regression tests for a matview containing a box

Re: [HACKERS] SSI freezing bug

2013-09-25 Thread Heikki Linnakangas
On 21.09.2013 23:46, Andres Freund wrote: Heikki Linnakangashlinnakan...@vmware.com schrieb: Kevin Grittnerkgri...@ymail.com wrote: Andres Freundand...@2ndquadrant.com wrote: On 2013-09-20 13:55:36 +0300, Heikki Linnakangas wrote: When a tuple is predicate-locked, the key of the lock is

Re: [HACKERS] Cube extension types support

2013-09-25 Thread Peter Eisentraut
On 9/24/13 11:44 AM, Stas Kelvich wrote: In this patch I've implemented support for different storage types for cubes. Doesn't build: gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-25 Thread Peter Eisentraut
On 9/25/13 4:46 AM, David Rowley wrote: Please find attached the new patch ... version v0.5 and also updated benchmark results. Please fix compiler warnings: elog.c: In function ‘log_line_prefix.isra.3’: elog.c:2436:22: warning: ‘padding’ may be used uninitialized in this function

Re: [HACKERS] Cube extension split algorithm fix

2013-09-25 Thread Peter Eisentraut
On 9/25/13 7:14 AM, Stas Kelvich wrote: I've fixed split algorithm that was implemented in cube extension. This patch creates a bunch of new compiler warnings. Please fix those. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] logical changeset generation v6

2013-09-25 Thread Steve Singer
On 09/25/2013 11:08 AM, Andres Freund wrote: On 2013-09-25 11:01:44 -0400, Steve Singer wrote: On 09/17/2013 10:31 AM, Andres Freund wrote: This patch set now fails to apply because of the commit Rename various freeze multixact variables. And I am even partially guilty for that patch...

Re: [HACKERS] FW: REVIEW: Allow formatting in log_line_prefix

2013-09-25 Thread David Rowley
On Thu, Sep 26, 2013 at 4:57 AM, Peter Eisentraut pete...@gmx.net wrote: On 9/25/13 4:46 AM, David Rowley wrote: Please find attached the new patch ... version v0.5 and also updated benchmark results. Please fix compiler warnings: elog.c: In function ‘log_line_prefix.isra.3’:

Re: [HACKERS] Minmax indexes

2013-09-25 Thread Alvaro Herrera
Amit Kapila escribió: On Sun, Sep 15, 2013 at 5:44 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: One thing still to tackle is when to mark ranges as unsummarized. Right now, any new tuple on a page range would cause a new index entry to be created and a new revmap update. This

Re: [HACKERS] Minmax indexes

2013-09-25 Thread Alvaro Herrera
Erik Rijkers wrote: After a --data-checksums initdb (successful), the following error came up: after the statement: create index t_minmax_idx on t using minmax (r); WARNING: page verification failed, calculated checksum 25951 but expected 0 ERROR: invalid page in block 1 of relation

Re: [HACKERS] UTF8 national character data type support WIP patch and list of open issues.

2013-09-25 Thread MauMau
From: Greg Stark st...@mit.edu If it's not lossy then what's the point? From the client's point of view it'll be functionally equivalent to text then. Sorry, what Tatsuo san suggested meant was same or compatible, not lossy. I quote the relevant part below. This is enough for the use case I

Re: [HACKERS] [PATCH] bitmap indexes

2013-09-25 Thread Alvaro Herrera
Hi, Here are some quick items while skimming this patch. I am looking at commit 6448de29d from your github repo, branch bmi. What's with the pg_bitmapindex stuff in pg_namespace.h? It doesn't seem to be used anywhere. This led me to research how these indexes are stored. I note that what

Re: [HACKERS] Minmax indexes

2013-09-25 Thread Erik Rijkers
On Wed, September 25, 2013 22:34, Alvaro Herrera wrote: [minmax-5.patch] I have the impression it's not quite working correctly. The attached program returns different results for different values of enable_bitmapscan (consistently). ( Btw, I had to make the max_locks_per_transaction higher

Re: [HACKERS] pgbench progress report improvements - split 2

2013-09-25 Thread Noah Misch
On Tue, Sep 24, 2013 at 08:42:15PM +0200, Fabien COELHO wrote: meet all those goals simultaneously with simpler code, can we not? int64 wait = (int64) (throttle_delay * Min(7.0, -log(1 - pg_erand48(thread-random_state; If you truncate roughly the

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-09-25 Thread Bruce Momjian
On Sat, Sep 21, 2013 at 05:07:11PM -0700, Peter Geoghegan wrote: In the average/uncontended case, the subxact example bloats less than all alternatives to my design proposed to date (including the unborn heap tuple idea Robert mentioned in passing to me in person the other day, which I think

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-09-25 Thread Peter Geoghegan
On Wed, Sep 25, 2013 at 8:19 PM, Bruce Momjian br...@momjian.us wrote: This thread had a lot of discussion about bloating. I wonder, does the code check to see if there is a matching row _before_ adding any data? That's pretty much what the patch does. Our test-and-set code first checks to

Re: [HACKERS] pgbench progress report improvements - split 3 v2

2013-09-25 Thread Noah Misch
On Tue, Sep 24, 2013 at 10:41:17PM +0200, Fabien COELHO wrote: These changes are coupled because measures are changed, and their reporting as well. Submitting separate patches for these different features would result in conflicting or dependent patches, so I wish to avoid that if possible.

Re: [HACKERS] pgbench - exclude pthread_create() from connection start timing

2013-09-25 Thread Noah Misch
Concerning one of the eventual would-be split patches... On Tue, Sep 24, 2013 at 10:41:17PM +0200, Fabien COELHO wrote: - Take thread start time at the beginning of the thread (!) Otherwise it includes pretty slow thread/fork system start times in the measurements. May help with bug