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

2013-09-22 Thread MauMau
From: "Tatsuo Ishii" I don't think the bind placeholder is the case. That is processed by exec_bind_message() in postgres.c. It has enough info about the type of the placeholder, and I think we can easily deal with NCHAR. Same thing can be said to COPY case. Yes, I've learned it. Agreed. If

Re: [HACKERS] LDAP: bugfix and deprecated OpenLDAP API

2013-09-22 Thread Abhijit Menon-Sen
At 2013-08-19 11:47:36 +, laurenz.a...@wien.gv.at wrote: > > To repeat: this fixes a bug in LDAP connection parameter lookup Hi. I read through the patch, and it looks sensible. I would have preferred the ldap_simple_bind_s() call in the HAVE_LIBLDAP branch to not be inside an else {} (the i

Re: [HACKERS] Cube extension kNN support

2013-09-22 Thread Oleg Bartunov
Do you have any benchmarks ? On Mon, Sep 23, 2013 at 3:38 AM, Stas Kelvich wrote: > Hello, hackers. > > Here is the patch that introduces kNN search for cubes with euclidean, > taxicab and chebyshev distances. > > Following distance operators introduced: > > <#> taxicab distance > <-> euclidean

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

2013-09-22 Thread Fabien COELHO
Hello Josh, As long as you're hacking pgbench output, what about offering a JSON option instead of the text output? I'm working on automating pgbench performance testing, and having the output in a proper delimited format would be really helpful. I'm more a "grep | cut | ..." person, but I d

Re: [HACKERS] [RFC] Extend namespace of valid guc names

2013-09-22 Thread Amit Kapila
On Fri, Sep 20, 2013 at 9:48 AM, Amit Kapila wrote: > On Thu, Sep 19, 2013 at 2:48 PM, Andres Freund wrote: >> On 2013-09-18 11:02:50 +0200, Andres Freund wrote: >>> On 2013-09-18 11:55:24 +0530, Amit Kapila wrote: >>> >>> > > I think that ship has long since sailed. postgresql.conf has allowed >

Re: [HACKERS] dynamic shared memory

2013-09-22 Thread Amit Kapila
On Mon, Sep 23, 2013 at 12:34 AM, Noah Misch wrote: > On Sun, Sep 22, 2013 at 01:17:52PM +0530, Amit Kapila wrote: >> On Fri, Sep 20, 2013 at 5:14 PM, Andres Freund >> wrote: >> > On 2013-09-19 11:44:34 -0400, Robert Haas wrote: >> >> On Wed, Sep 18, 2013 at 1:42 PM, Andres Freund >> >> wrote:

Re: [HACKERS] Assertions in PL/PgSQL

2013-09-22 Thread Pavel Stehule
2013/9/22 Jaime Casanova > > El 21/09/2013 17:16, "Jaime Casanova" escribió: > > > > > On Fri, Sep 20, 2013 at 5:17 AM, Marko Tiikkaja wrote: > > > On 9/20/13 12:09 PM, Amit Khandekar wrote: > > >> > > >> On 16 September 2013 03:43, Marko Tiikkaja wrote: > > >>> > > >>> I think it would be ext

[HACKERS] Cube extension kNN support

2013-09-22 Thread Stas Kelvich
Hello, hackers. Here is the patch that introduces kNN search for cubes with euclidean, taxicab and chebyshev distances. Following distance operators introduced: <#> taxicab distance <-> euclidean distance <=> chebyshev distance For example: SELECT * FROM objects ORDER BY objects.coord <-> '(1

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

2013-09-22 Thread Peter Geoghegan
On Sun, Sep 22, 2013 at 1:39 PM, Andres Freund wrote: > I still fail to see how that's relevant. For every index there's two > things that can happen: > a) there's a conflicting tuple. In that case we can fail at that > point/convert to an update. No Bloat. Well, yes - if the conflict is in the f

Re: [HACKERS] SSI freezing bug

2013-09-22 Thread Hannu Krosing
On 09/20/2013 12:55 PM, Heikki Linnakangas wrote: > Hi, > > Prompted by Andres Freund's comments on my Freezing without Write I/O > patch, I realized that there's there's an existing bug in the way > predicate locking handles freezing (or rather, it doesn't handle it). > > When a tuple is predicate

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

2013-09-22 Thread Valentine Gogichashvili
> > > PostgreSQL has a very powerful possibilities for storing any kind of >> encoding. So maybe it makes sense to add the ENCODING as another column >> property, the same way a COLLATION was added? >> > > Some other people in this community suggested that. ANd the SQL standard > suggests the sam

Re: [HACKERS] Looking for information on our elephant

2013-09-22 Thread Oleg Bartunov
Tatsuo, you could ask Marc about archives. Probably he has original mbox files. Oleg On Sun, Sep 22, 2013 at 11:18 AM, Tatsuo Ishii wrote: > Oleg, > > Unfortunately the archives seem to miss attached files. I love to see > the attached files because they are logo images. Any idea? > -- > Tat

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

2013-09-22 Thread Andres Freund
On 2013-09-22 12:54:57 -0700, Peter Geoghegan wrote: > On Sun, Sep 22, 2013 at 2:10 AM, Andres Freund wrote: > > I can't follow here. Why does e.g. the promise tuple approach bloat more > > than the subxact example? > > The protocol is roughly: > > 1) Insert index pointer containing an xid to be w

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

2013-09-22 Thread Peter Geoghegan
On Sun, Sep 22, 2013 at 2:10 AM, Andres Freund wrote: > I can't follow here. Why does e.g. the promise tuple approach bloat more > than the subxact example? > The protocol is roughly: > 1) Insert index pointer containing an xid to be waiting upon instead of >the target tid into all indexes > 2

Re: [HACKERS] Improving avg performance for numeric

2013-09-22 Thread Tomas Vondra
Hi, I've reviewed the v6 of the "numeric optimize" patch (http://www.postgresql.org/message-id/CAFj8pRDQhG7Pqmf8XqXY0PnHfakkPQLPHnoRLJ_=ekfsboa...@mail.gmail.com), as Pavel did some hacking on the patch and asked me to do the review. The patch seems fine to me, the following comments are mostly

[HACKERS] trivial one-off memory leak in guc-file.l ParseConfigFile

2013-09-22 Thread didier
Hi fix a small memory leak in guc-file.l ParseConfigFile AbsoluteConfigLocation() return a strdup string but it's never free or referenced outside ParseConfigFile Courtesy Valgrind and Noah Misch MEMPOOL work. Regards Didier memory_leak_in_parse_config_file.patch Description: Binary data --

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

2013-09-22 Thread Josh Berkus
Fabien, As long as you're hacking pgbench output, what about offering a JSON option instead of the text output? I'm working on automating pgbench performance testing, and having the output in a proper delimited format would be really helpful. -- Josh Berkus PostgreSQL Experts Inc. http://pgexpe

Re: [HACKERS] dynamic shared memory

2013-09-22 Thread Noah Misch
On Sun, Sep 22, 2013 at 01:17:52PM +0530, Amit Kapila wrote: > On Fri, Sep 20, 2013 at 5:14 PM, Andres Freund wrote: > > On 2013-09-19 11:44:34 -0400, Robert Haas wrote: > >> On Wed, Sep 18, 2013 at 1:42 PM, Andres Freund > >> wrote: > >> >> + /* Create or truncate the file. */ > >> >> +

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

2013-09-22 Thread Fabien
Split 3 of the initial submission, which actually deal with data measured and reported on stderr under various options. This version currently takes into account many comments by Noah Mish. In particular, the default "no report" behavior under benchmarking is not changed, although I really t

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

2013-09-22 Thread Fabien
Split 2 of the initial submission pgbench: reduce and compensate throttling underestimation bias. This is a consequence of relying on an integer random generator, which allow to ensure that delays inserted stay reasonably in range of the target average delay. The bias was about 0.5% with 1000

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

2013-09-22 Thread Fabien COELHO
Split 1 of the initial submission. pgbench: minor update of documentation & help message. Use NUM in help message for homogeneity with other options. The target *start* time of the transaction is set by the stochastic process which is doing the throttling (--rate), not the end time. -- Fabi

Re: [HACKERS] Patch for fail-back without fresh backup

2013-09-22 Thread Sawada Masahiko
On Fri, Sep 20, 2013 at 10:33 PM, Samrat Revagade wrote: > > > > On Fri, Sep 20, 2013 at 3:40 PM, Sameer Thakur > wrote: >> >> >> >> >>> >>> >Attached patch combines documentation patch and source-code patch. >> >> >> I have had a stab at reviewing the documentation. Have a look. >> > > Than

Re: [HACKERS] [PATCH] pg_sleep(interval)

2013-09-22 Thread Fabien COELHO
Hello, There is no pg_sleep(text) function and the cast is unknown->double precision. My mistake. As I understand it, pg_sleep('12') currently works and would not anymore once your patch is applied. That is the concern raised by Robert Haas. ISTM that providing "pg_sleep(TEXT)" cleanl

Re: [HACKERS] [PATCH] pg_sleep(interval)

2013-09-22 Thread Vik Fearing
On 09/20/2013 01:59 PM, Fabien COELHO wrote: > > Here is a review of the pg_sleep(INTERVAL) patch version 1: Thank you for looking at it. > > - the new function is *not* tested anywhere! > >I would suggest simply to replace some pg_sleep(int) instances >by corresponding pg_sleep(interval

Re: [HACKERS] pgbench progress report improvements

2013-09-22 Thread Fabien COELHO
It is also printed without --rate. There is a "if" above because there is one report with "lag" (under --rate), and one without. The code I quoted is for the final report in printResults(), and that only shows latency mean/stddev when using --rate. The progress reporting in threadRun() does h

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

2013-09-22 Thread Andres Freund
Hi, I don't have time to answer the other emails today (elections, climbing), but maybe you could clarify the below? On 2013-09-21 17:07:11 -0700, Peter Geoghegan wrote: > On Sun, Sep 15, 2013 at 8:23 AM, Andres Freund wrote: > >> I'll find it very difficult to accept any implementation that is

Re: [HACKERS] pgbench progress report improvements

2013-09-22 Thread Fabien COELHO
Dear Noah, Thanks for your answers and remarks, [...] I'll split some part of the patch where there is no coupling, but I do not want to submit conflicting patches. Those benefits aren't compelling enough to counterbalance the risk of gettimeofday() overhead affecting results. (Other opin

Re: [HACKERS] dynamic shared memory

2013-09-22 Thread Amit Kapila
On Fri, Sep 20, 2013 at 5:14 PM, Andres Freund wrote: > Hi, > > > On 2013-09-19 11:44:34 -0400, Robert Haas wrote: >> On Wed, Sep 18, 2013 at 1:42 PM, Andres Freund >> wrote: > >> >> --- /dev/null >> >> +++ b/src/backend/storage/ipc/dsm.c >> >> +#define PG_DYNSHMEM_STATE_FILE

Re: [HACKERS] Looking for information on our elephant

2013-09-22 Thread Tatsuo Ishii
Oleg, Unfortunately the archives seem to miss attached files. I love to see the attached files because they are logo images. Any idea? -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese: http://www.sraoss.co.jp > Tatsuo, > > I have emails even from 1995