Re: [HACKERS] exposing pg_controldata and pg_config as functions

2015-09-06 Thread Peter Eisentraut
On 9/6/15 3:34 PM, Joe Conway wrote: > On 09/02/2015 02:54 PM, Alvaro Herrera wrote: >> Josh Berkus wrote: >>> On 09/02/2015 02:34 PM, Alvaro Herrera wrote: I think trying to duplicate the exact strings isn't too nice an interface. >>> >>> Well, for pg_controldata, no, but what else

Re: [HACKERS] Reusing abbreviated keys during second pass of ordered [set] aggregates

2015-09-06 Thread Thomas Munro
On Sat, Jul 11, 2015 at 10:05 AM, Peter Geoghegan wrote: > Currently, there are certain aggregates that sort some tuples before > making a second pass over their memtuples array (through the tuplesort > "gettuple" interface), calling one or more attribute equality operator >

Re: [HACKERS] pg_rewind tap test unstable

2015-09-06 Thread Michael Paquier
On Mon, Sep 7, 2015 at 1:16 PM, Noah Misch wrote: > On Tue, Aug 04, 2015 at 02:21:16PM +0900, Michael Paquier wrote: >> >> On Tue, Jul 28, 2015 at 5:57 PM, Christoph Berg wrote: >> >> > for something between 10% and 20% of the devel builds for >> >> >

Re: [HACKERS] checkpointer continuous flushing

2015-09-06 Thread Amit Kapila
On Mon, Sep 7, 2015 at 3:09 AM, Andres Freund wrote: > > On 2015-09-06 16:05:01 +0200, Fabien COELHO wrote: > > >Wouldn't it be just as easy to put this logic into the checkpointing code? > > > > Not sure it would simplify anything, because the checkpointer currently > > knows

Re: [HACKERS] Horizontal scalability/sharding

2015-09-06 Thread Ashutosh Bapat
On Sat, Sep 5, 2015 at 4:22 AM, Ozgun Erdogan wrote: > Hey Robert, > > Now the question is, where should the code that does all of this live? >> postgres_fdw? Some new, sharding-specific FDW? In core? I don't >> know for sure, but what I do know is that we could make a

Re: [HACKERS] Waits monitoring

2015-09-06 Thread Amit Kapila
On Sun, Sep 6, 2015 at 5:58 PM, Andres Freund wrote: > > On 2015-09-04 23:44:21 +0100, Simon Riggs wrote: > > I see the need for both current wait information and for cumulative > > historical detail. > > > > I'm willing to wait before reviewing this, but not for more than 1

Re: [HACKERS] Multi-column distinctness.

2015-09-06 Thread Kyotaro HORIGUCHI
Hello, > > 5) syntax > > - > > The syntax might be one of the pain points if we eventually decide to > commit the multivariate stats patch. I have no intention in blocking this > patch for that reasons, but if we might design the syntax to make it > compatible with the multivariate patch,

Re: [HACKERS] checkpointer continuous flushing

2015-09-06 Thread Andres Freund
On 2015-09-06 16:05:01 +0200, Fabien COELHO wrote: > >Wouldn't it be just as easy to put this logic into the checkpointing code? > > Not sure it would simplify anything, because the checkpointer currently > knows about buffers but flushing is about files, which are hidden from > view. It'd not

Re: [HACKERS] Too many duplicated condition query return wrong value

2015-09-06 Thread Jeff Janes
On Thu, Sep 3, 2015 at 10:55 PM, Atsushi Yoshida wrote: > >> Can you give an "explain (analyze, buffers)" for each query? Maybe > you have a corrupted index, and one query uses the index and the other does > not. > > > > > > Index Scan using idx_attend_00 on attend

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2015-09-06 Thread and...@anarazel.de
On 2015-09-06 22:57:04 +0300, Ildus Kurbangaliev wrote: > Ok, I've kept only one tranche for individual LWLocks But you've added the lock names as a statically sized array to all tranches? Why not just a pointer to an array that's either NULL ('not individualy named locks') or appropriately

Re: [HACKERS] Multi-column distinctness.

2015-09-06 Thread Kyotaro HORIGUCHI
Hello, > FWIW Horiguchi-san is one of the few people who actually took time to > review I personally think such kind of things should not to be counted in judging this issue:) > the multivariate stats patch, and I don't quite see this patch > as conflicting with the multivariate one. > > It

Re: [HACKERS] Getting total and free disk space from paths in PGDATA

2015-09-06 Thread Tom Lane
Michael Paquier writes: > statvfs is part of the POSIX spec and is "normally" present on modern > platforms (BSD, OSX, Linux and Solaris have it as far as I saw, still > there may be some strange platform without it). There are considerably less strange platforms that

Re: [HACKERS] pg_rewind tap test unstable

2015-09-06 Thread Noah Misch
On Tue, Aug 04, 2015 at 02:21:16PM +0900, Michael Paquier wrote: > >> On Tue, Jul 28, 2015 at 5:57 PM, Christoph Berg wrote: > >> > for something between 10% and 20% of the devel builds for > >> > apt.postgresql.org > >> > (which happen every 6h if there's a git change, so it

Re: [HACKERS] Multi-column distinctness.

2015-09-06 Thread Kyotaro HORIGUCHI
Hello, Thank you for pointing that. It is one crucial point of this patch. Sorry for not mentioning on the point. At Sun, 6 Sep 2015 09:24:48 +0100, Simon Riggs wrote in > > Tomas Vondra is now working

Re: [HACKERS] src/test/ssl broken on HEAD

2015-09-06 Thread Noah Misch
On Thu, Sep 03, 2015 at 01:15:47AM +0200, Andres Freund wrote: > On 2015-09-02 17:03:46 -0400, Robert Haas wrote: > > On Wed, Sep 2, 2015 at 4:50 PM, Andrew Dunstan wrote: > > > Tell me what's needed and I'll look at creating a buildfarm test module > > > for > > > it. > >

Re: [HACKERS] Multi-column distinctness.

2015-09-06 Thread Tomas Vondra
Hello, On 09/06/2015 10:24 AM, Simon Riggs wrote: On 28 August 2015 at 09:33, Kyotaro HORIGUCHI > wrote: Tomas Vondra is now working on heavily-equipped multivariate statistics for OLAP usage. In contrast, this is

Re: [HACKERS] Multi-column distinctness.

2015-09-06 Thread Simon Riggs
On 5 September 2015 at 20:46, Bruce Momjian wrote: > On Fri, Aug 28, 2015 at 05:33:34PM +0900, Kyotaro HORIGUCHI wrote: > > Hello, this patch enables planner to be couscious of inter-column > > correlation. > > > > Sometimes two or more columns in a table has some correlation >

Re: [HACKERS] Using quicksort for every external sort run

2015-09-06 Thread Marc Mamin
>I will sketch a simple implementation of parallel sorting based on the >patch series that may be workable, and requires relatively little >implementation effort compare to other ideas that were raised at >various times: Hello, I've only a very superficial understanding on your work, please

Re: [HACKERS] Multi-column distinctness.

2015-09-06 Thread Simon Riggs
On 28 August 2015 at 09:33, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > Tomas Vondra is now working on heavily-equipped multivariate > statistics for OLAP usage. In contrast, this is a lightly > implemented solution which calculates only the ratio between a > rows estimated by

Re: [HACKERS] Multi-column distinctness.

2015-09-06 Thread Tomas Vondra
Hello Horiguchi-san, On 08/28/2015 10:33 AM, Kyotaro HORIGUCHI wrote: Hello, this patch enables planner to be couscious of inter-column correlation. Sometimes two or more columns in a table has some correlation which brings underestimate, which leads to wrong join method and ends with slow

Re: [HACKERS] Outdated documentation for PageHeaderData

2015-09-06 Thread Julien Rouhaud
On 06/09/2015 01:39, Michael Paquier wrote: > > On Sun, Sep 6, 2015 at 5:11 AM, Julien Rouhaud > > wrote: > > I just noticed that part of storage.sgml was not updated when 9.3 > introduced checksum (and removed pd_tli from

Re: [HACKERS] replication slot restart_lsn initialization

2015-09-06 Thread Michael Paquier
On Sun, Sep 6, 2015 at 8:32 PM, Andres Freund wrote: > [fixes] > > Committed, thanks for the patch. > Visibly I missed one/two things when hacking out this stuff. Thanks for the extra cleanup and the commit. -- Michael

Re: [HACKERS] Allow a per-tablespace effective_io_concurrency setting

2015-09-06 Thread Julien Rouhaud
Hi, Please find attached a v2 of the patch. See below for changes. On 02/09/2015 15:53, Andres Freund wrote: > > Hi, > > On 2015-07-18 12:17:39 +0200, Julien Rouhaud wrote: >> I didn't know that the thread must exists on -hackers to be able to add >> a commitfest entry, so I transfer the

[HACKERS] Separating Buffer LWlocks

2015-09-06 Thread Simon Riggs
Looks like the right time to post this patch. It separates the Buffer LWLocks from the main LW locks, allowing them to have different padding. Tests showed noticeable/significant performance gain due to reduced false sharing on main LWlocks, though without wasting memory on the buffer LWlocks.

Re: [HACKERS] Separating Buffer LWlocks

2015-09-06 Thread Andres Freund
Hi, On 2015-09-06 14:10:24 +0100, Simon Riggs wrote: > It separates the Buffer LWLocks from the main LW locks, allowing them to > have different padding. > > Tests showed noticeable/significant performance gain due to reduced false > sharing on main LWlocks, though without wasting memory on the

Re: [HACKERS] checkpointer continuous flushing

2015-09-06 Thread Fabien COELHO
Hello Andres, Here's a bunch of comments on this (hopefully the latest?) Who knows?! :-) version of the patch: * I'm not sure I like the FileWrite & FlushBuffer API changes. Do you forsee other callsites needing similar logic? I foresee that the bgwriter should also do something more

Re: [HACKERS] Using quicksort for every external sort run

2015-09-06 Thread Peter Geoghegan
On Sun, Sep 6, 2015 at 1:51 AM, Marc Mamin wrote: > Have you considered performances for cases where multiple CREATE INDEX are > running in parallel? > One of our typical use case are large daily tables (50-300 Mio rows) with up > to 6 index creations > that start

Re: [HACKERS] Multi-column distinctness.

2015-09-06 Thread Tomas Vondra
On Sep 6, 2015 10:31, "Tomas Vondra" wrote: > > 5) syntax > - > The syntax might be one of the pain points if we eventually decide to commit the multivariate stats patch. I have no intention in blocking this patch for that reasons, but if we might design the

Re: [HACKERS] [PATCH] SQL function to report log message

2015-09-06 Thread dinesh kumar
On Sun, Sep 6, 2015 at 4:00 PM, dinesh kumar wrote: > On Sun, Sep 6, 2015 at 3:39 PM, Pavel Stehule > wrote: > >> Hi >> >> attached patch with fixed broken error message >> >> Regards >> >> Pavel >> > > Hi Pavel, > > Thanks much for taking care

Re: [HACKERS] Add support for RADIUS passwords longer than 16 octets

2015-09-06 Thread Magnus Hagander
On Tue, Aug 18, 2015 at 11:36 PM, Marko Tiikkaja wrote: > On 2015-08-15 17:55, I wrote: > >> The attached patch adds support for RADIUS passwords longer than 16 >> octets. >> > > Improved the coding and comments a bit, new version attached. Looks good to me. Applied, thanks!

Re: [HACKERS] [PATCH] SQL function to report log message

2015-09-06 Thread Pavel Stehule
Hi attached patch with fixed broken error message Regards Pavel diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml new file mode 100644 index b3b78d2..b7a2cc2 *** a/doc/src/sgml/func.sgml --- b/doc/src/sgml/func.sgml *** postgres=# SELECT * FROM pg_xlogfile_nam ***

Re: [HACKERS] [PATCH] SQL function to report log message

2015-09-06 Thread Pavel Stehule
2015-09-06 13:12 GMT+02:00 dinesh kumar : > > On Sun, Sep 6, 2015 at 4:00 PM, dinesh kumar > wrote: > >> On Sun, Sep 6, 2015 at 3:39 PM, Pavel Stehule >> wrote: >> >>> Hi >>> >>> attached patch with fixed broken error

Re: [HACKERS] replication slot restart_lsn initialization

2015-09-06 Thread Andres Freund
On 2015-08-15 21:16:11 +0900, Michael Paquier wrote: > Well, this has taken less time than I thought: > =# CREATE_REPLICATION_SLOT toto PHYSICAL; > slot_name | consistent_point | snapshot_name | output_plugin > ---+--+---+--- > toto | 0/0

Re: [HACKERS] [PATCH] SQL function to report log message

2015-09-06 Thread Pavel Stehule
Hi I am sending little bit modified version. 1. sqlstate should be text, not boolean - a boolean is pretty useless 3. fixed formatting and code style Questions: I dislike the using empty message when message parameter is null. We have to show some text or we have to disallow it? Regards

Re: [HACKERS] [PATCH] SQL function to report log message

2015-09-06 Thread dinesh kumar
On Sun, Sep 6, 2015 at 3:39 PM, Pavel Stehule wrote: > Hi > > attached patch with fixed broken error message > > Regards > > Pavel > Hi Pavel, Thanks much for taking care of it. Patch looks great. -- Regards, Dinesh manojadinesh.blogspot.com

Re: [HACKERS] [PATCH] SQL function to report log message

2015-09-06 Thread dinesh kumar
On Sun, Sep 6, 2015 at 4:46 PM, Pavel Stehule wrote: > > > 2015-09-06 13:12 GMT+02:00 dinesh kumar : > >> >> On Sun, Sep 6, 2015 at 4:00 PM, dinesh kumar >> wrote: >> >>> On Sun, Sep 6, 2015 at 3:39 PM, Pavel Stehule

Re: [HACKERS] Summary of plans to avoid the annoyance of Freezing

2015-09-06 Thread Andres Freund
On 2015-08-10 07:03:02 +0100, Simon Riggs wrote: > I was previously a proponent of (2) as a practical way forwards, but my > proposal here today is that we don't do anything further on 2) yet, and > seek to make progress on 5) instead. > > If 5) fails to bring a workable solution by the Jan 2016

Re: [HACKERS] checkpointer continuous flushing

2015-09-06 Thread Andres Freund
Hi, Here's a bunch of comments on this (hopefully the latest?) version of the patch: * I'm not sure I like the FileWrite & FlushBuffer API changes. Do you forsee other callsites needing similar logic? Wouldn't it be just as easy to put this logic into the checkpointing code? * We don't do

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2015-09-06 Thread and...@anarazel.de
Hi, On 2015-09-05 12:48:12 +0300, Ildus Kurbangaliev wrote: > Another parts require a some discussion so I didn't touch them yet. At this point I don't see any point in further review until these are addressed. > The idea to create an individual tranches for individual LWLocks have > come from

Re: [HACKERS] Waits monitoring

2015-09-06 Thread Andres Freund
On 2015-09-04 23:44:21 +0100, Simon Riggs wrote: > I see the need for both current wait information and for cumulative > historical detail. > > I'm willing to wait before reviewing this, but not for more than 1 more CF. > > Andres, please decide whether we should punt to next CF now, based upon

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-09-06 Thread Pavel Stehule
Hi > Any suggestions/comments on this proposed approach? > This is interesting functionality - The same was requested by one important Czech customer. I'll do review Regards Pavel

Re: [HACKERS] checkpointer continuous flushing

2015-09-06 Thread Petr Jelinek
On 2015-09-06 19:05, Fabien COELHO wrote: Here is a rebased two-part v11. function parameters are always in the same line as the function name ISTM that I did that, or maybe I did not understand what I've done wrong. I see one instance of this issue +static int +NextBufferToWrite( +

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-09-06 Thread Joe Conway
On 09/05/2015 09:14 AM, Joe Conway wrote: > On 09/05/2015 09:05 AM, Tom Lane wrote: >> I wrote: >>> If there are not major objections, I'll work on cleaning up and >>> committing the patch. >> >> Pushed. I'm not too sure about the expected outputs for python other >> than 2.6, nor for sepgsql,

Re: [HACKERS] checkpointer continuous flushing

2015-09-06 Thread Fabien COELHO
Hello Petr, function parameters are always in the same line as the function name ISTM that I did that, or maybe I did not understand what I've done wrong. I see one instance of this issue +static int +NextBufferToWrite( + TableSpaceCheckpointStatus *spcStatus, int nb_spaces, +

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2015-09-06 Thread Pavel Stehule
Hi > postgres=# select pg_hba_lookup('postgres','all'); > pg_hba_lookup > --- > (84,local,"[""all""]","[""all""]",,,trust,{}) > (86,host,"[""all""]","[""all""]",127.0.0.1,,trust,{}) >

Re: [HACKERS] checkpointer continuous flushing

2015-09-06 Thread Fabien COELHO
Here is a rebased two-part v11. * We don't do one-line ifs; I've found one instance. function parameters are always in the same line as the function name ISTM that I did that, or maybe I did not understand what I've done wrong. -- Fabien.diff --git a/doc/src/sgml/config.sgml

Re: [HACKERS] PL/pgSQL, RAISE and error context

2015-09-06 Thread Tom Lane
Joe Conway writes: >> On 09/05/2015 09:05 AM, Tom Lane wrote: >>> Pushed. I'm not too sure about the expected outputs for python other >>> than 2.6, nor for sepgsql, but hopefully the buildfarm will provide >>> feedback. > One-liner required for sepgsql -- attached committed

[HACKERS] Discussion summary: Proposal: Implement failover on libpq connect level.

2015-09-06 Thread Victor Wagner
First of all, I wish to thank all the participants of the discussion for their useful suggestions and critics. I see that people are really interested in this feature. Now, list of syntax and behavior changes against original proposal: 1. There is similar feature in JDBC, so syntax of URL-style

Re: [HACKERS] exposing pg_controldata and pg_config as functions

2015-09-06 Thread Joe Conway
On 09/02/2015 02:54 PM, Alvaro Herrera wrote: > Josh Berkus wrote: >> On 09/02/2015 02:34 PM, Alvaro Herrera wrote: >>> I think trying to duplicate the exact strings isn't too nice an >>> interface. >> >> Well, for pg_controldata, no, but what else would you do for pg_config? > > I was primarily