Re: [HACKERS] 2PC support for pglogical

2016-03-22 Thread Craig Ringer
On 10 March 2016 at 22:50, Stas Kelvich wrote: > Hi. > > Here is proof-of-concept version of two phase commit support for logical > replication. I missed this when you posted it, so sorry for the late response. I've read through this but not tested it yet. I really

Re: [HACKERS] multivariate statistics v14

2016-03-22 Thread Tatsuo Ishii
>> I am now looking into the create statistics doc to see if the example >> appearing in it is working. I will get back if I find any. I have the ref doc: CREATE STATISTICS There are nice examples how the multivariate statistics gives better row number estimation. So I gave them a try. "Create

Re: [HACKERS] Timeline following for logical slots

2016-03-22 Thread Craig Ringer
On 22 March 2016 at 19:48, Andres Freund wrote: > On 2016-03-15 21:04:12 +0800, Craig Ringer wrote: > > Thanks very much for the review. > > Are you planning to update the patch? > > Updated patch attached. It removes the questionable cleanups, fixes the randAccess comment

Re: [HACKERS] Odd system-column handling in postgres_fdw join pushdown patch

2016-03-22 Thread Ashutosh Bapat
On Wed, Mar 23, 2016 at 8:20 AM, Etsuro Fujita wrote: > On 2016/03/22 21:10, Ashutosh Bapat wrote: > >> On Tue, Mar 22, 2016 at 5:05 PM, Etsuro Fujita >> > wrote: >> On 2016/03/22 14:54, Ashutosh

[HACKERS] README for src/backend/replication/logical

2016-03-22 Thread Craig Ringer
Hi all As part of some internal training/discussion I wrote some notes on logical decoding's structure and flow that seemed worth polishing up into a draft README for src/backend/replication/logical . When learning this code I found that while the individual pieces are documented it's pretty

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-03-22 Thread Michael Paquier
On Wed, Mar 23, 2016 at 1:21 PM, Fujii Masao wrote: > On Wed, Mar 23, 2016 at 2:28 AM, Masahiko Sawada > wrote: >> Attached patch incorporates above comments. >> Please find it. > > Attached is the latest version of the patch based on your patch.

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-03-22 Thread Fujii Masao
On Wed, Mar 23, 2016 at 2:28 AM, Masahiko Sawada wrote: > On Tue, Mar 22, 2016 at 11:08 PM, Fujii Masao wrote: >> On Tue, Mar 22, 2016 at 9:58 PM, Kyotaro HORIGUCHI >> wrote: >>> Thank you for the revised patch. >>

Re: [HACKERS] Show dropped users' backends in pg_stat_activity

2016-03-22 Thread Jim Nasby
On 3/22/16 10:35 PM, Kyotaro HORIGUCHI wrote: Even if we maintained some interlock for a backend's login role identity, >I hardly think it would be practical to e.g. lock during transient SET >ROLE or security-definer-function-call operations. So it's not like we >can let the permissions system

Re: [HACKERS] WAL logging problem in 9.4.3?

2016-03-22 Thread Michael Paquier
On Wed, Mar 23, 2016 at 11:11 AM, David Steele wrote: > I would prefer not to bump it to the next CF unless we decide this will > not get fixed for 9.6. It may make sense to add that to the list of open items for 9.6 instead. That's not a feature. -- Michael -- Sent via

[HACKERS] Bug in searching path in jsonb_set when walking through JSONB array

2016-03-22 Thread Vitaly Burovoy
Hello, Hackers! While I was reviewed a patch with "json_insert" function I found a bug which wasn't connected with the patch and reproduced at master. It claims about non-integer whereas input values are obvious integers and in an allowed range. More testing lead to understanding it appears when

Re: [HACKERS] Show dropped users' backends in pg_stat_activity

2016-03-22 Thread Kyotaro HORIGUCHI
I had the same problem and thought similar thing. At Wed, 16 Mar 2016 11:48:10 -0400, Tom Lane wrote in <16068.1458143...@sss.pgh.pa.us> > Robert Haas writes: > > Gee, I would have expected the DROP to be blocked until the user > > disconnected, like

Re: [HACKERS] Improve error handling in pltcl

2016-03-22 Thread Jim Nasby
On 3/20/16 8:42 PM, Jim Nasby wrote: The doc example also makes me think that more effort should get expended on converting internalquery/internalpos to just be query/cursorpos. It seems unlikely to me that a Tcl function could ever see a case where the latter fields are useful directly. Is

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-03-22 Thread Jim Nasby
On 3/22/16 9:36 AM, Amit Kapila wrote: > > Note, that we are doing it only when a transaction has less than equal to > > 64 sub transactions. > > So? > They should fall on one page, unless they are heavily interleaved as pointed by you. I think either subtransactions are present or not,

Re: [HACKERS] multivariate statistics v14

2016-03-22 Thread Tatsuo Ishii
>>> I believe this is because reference.sgml is missing a call to >>> (per report by Alvaro Herrera). >> >> Ok, I will patch reference.sgml. > > Here are some comments on docs. > > - There's no docs for pg_mv_statistic (should be added to "49. System > Catalogs") > > - The word

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-03-22 Thread Constantin S. Pan
On Fri, 18 Mar 2016 20:40:16 +0300 Dmitry Ivanov wrote: > - Currently there's no documentation regarding parallel gin build > feature and provided GUC variables. > You could replace direct access to 'rd_id' field with the > RelationGetRelid macro. > Parameter 'r' is

Re: [HACKERS] multivariate statistics v14

2016-03-22 Thread Tatsuo Ishii
>> I believe this is because reference.sgml is missing a call to >> (per report by Alvaro Herrera). > > Ok, I will patch reference.sgml. Here are some comments on docs. - There's no docs for pg_mv_statistic (should be added to "49. System Catalogs") - The word "multivariate statistics" or

Re: [HACKERS] Odd system-column handling in postgres_fdw join pushdown patch

2016-03-22 Thread Etsuro Fujita
On 2016/03/22 21:10, Ashutosh Bapat wrote: On Tue, Mar 22, 2016 at 5:05 PM, Etsuro Fujita > wrote: On 2016/03/22 14:54, Ashutosh Bapat wrote: Earlier in this mail chain, I suggested that the core should take

Re: [HACKERS] WAL logging problem in 9.4.3?

2016-03-22 Thread David Steele
On 3/22/16 8:54 PM, Michael Paquier wrote: > On Wed, Mar 23, 2016 at 9:52 AM, Michael Paquier > wrote: >> On Wed, Mar 23, 2016 at 1:38 AM, David Steele wrote: >>> On 3/15/16 10:01 PM, Kyotaro HORIGUCHI wrote: >>> Ok, I understand that this is

Re: [HACKERS] multivariate statistics v14

2016-03-22 Thread Tatsuo Ishii
>> Thanks for the explanation. I will look into patch 0001 to 0005 so >> that they could get into 9.6. >> >> In the mean time after applying patch 0001 to 0005 of v16, I get this >> while compiling SGML docs. >> >> openjade:ref/create_statistics.sgml:281:26:X: reference to >> non-existent ID

Re: [HACKERS] [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-03-22 Thread Vitaly Burovoy
On 2016-03-16, Dmitry Dolgov <9erthali...@gmail.com> wrote: > Hi Vitaly, thanks for the review. I've attached a new version of path with > improvements. Few notes: > >> 7. Why did you remove "skip"? It is a comment what "true" means... > > Actually, I thought that this comment was about skipping

Re: [HACKERS] multivariate statistics v14

2016-03-22 Thread Tomas Vondra
On 03/23/2016 02:53 AM, Tatsuo Ishii wrote: The users will be able to define statistics with the limitation that only a single one (the one covering the most columns referenced by the clauses) can be used when estimating a query. Which is not perfect, but I think it's a valuable improvement.

Re: [HACKERS] multivariate statistics v14

2016-03-22 Thread Tatsuo Ishii
> The users will be able to define statistics with the limitation that > only a single one (the one covering the most columns referenced by the > clauses) can be used when estimating a query. Which is not perfect, > but I think it's a valuable improvement. > > It might also be possible to split

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Fabrízio de Royes Mello
On Tue, Mar 22, 2016 at 6:16 PM, Yury Zhuravlev wrote: > > Fabrízio de Royes Mello wrote: >> >> >> You're correct. Yury please add your patch to the next commitfest. > > Done. But I do not have restrictions as part of our PostgresPro distr. I think this patch will be

Re: [HACKERS] [PATCH] fix DROP OPERATOR to reset links to itself on commutator and negator

2016-03-22 Thread Tomas Vondra
Hi, On 03/23/2016 12:50 AM, Roma Sokolov wrote: Hi, Tomas, thanks for review and comments! I have to admit I find the existing code a bit convoluted, particularly the part that deals with the (commId == negId) case. And the patch does not really improve the situation, quite the contrary.

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Fabrízio de Royes Mello
On Tue, Mar 22, 2016 at 6:04 PM, Yury Zhuravlev wrote: > > I was not sure about the syntax, so this was a prototype. Now, like all completed yet. > >> >> 1) I think this syntax is wrong... Instead the common should be: >> >> PREPARE [IF NOT EXISTS] ... > > You right.

Re: [HACKERS] about google summer of code 2016

2016-03-22 Thread Álvaro Hernández Tortosa
On 23/03/16 01:56, Amit Langote wrote: On 2016/03/23 9:19, Álvaro Hernández Tortosa wrote: - Regarding GSoC: it looks to me that we failed to submit in time. Is this what happened, or we weren't selected? If the former (and no criticism here, just realizing a fact) what can we do next year to

Re: [HACKERS] Patch: fix lock contention for HASHHDR.mutex

2016-03-22 Thread Robert Haas
On Mon, Mar 21, 2016 at 4:48 AM, Aleksander Alekseev wrote: >> This is the point where I think I am missing something about patch. >> As far as I can understand, it uses the same freelist index >> (freelist_idx) for allocating and putting back the entry, so I think >>

Re: [HACKERS] about google summer of code 2016

2016-03-22 Thread Amit Langote
On 2016/03/23 9:19, Álvaro Hernández Tortosa wrote: > - Regarding GSoC: it looks to me that we failed to submit in time. Is this > what happened, or we weren't selected? If the former (and no criticism > here, just realizing a fact) what can we do next year to avoid this > happening again? Is

Re: [HACKERS] WAL logging problem in 9.4.3?

2016-03-22 Thread Michael Paquier
On Wed, Mar 23, 2016 at 9:52 AM, Michael Paquier wrote: > On Wed, Mar 23, 2016 at 1:38 AM, David Steele wrote: >> On 3/15/16 10:01 PM, Kyotaro HORIGUCHI wrote: >> >>> Ok, I understand that this is not an issue in a hurry. I'll go to >>> another

Re: [HACKERS] WAL logging problem in 9.4.3?

2016-03-22 Thread Michael Paquier
On Wed, Mar 23, 2016 at 1:38 AM, David Steele wrote: > On 3/15/16 10:01 PM, Kyotaro HORIGUCHI wrote: > >> Ok, I understand that this is not an issue in a hurry. I'll go to >> another patch that needs review. > > Since we're getting towards the end of the CF is it time to pick

Re: [HACKERS] Timeline following for logical slots

2016-03-22 Thread Craig Ringer
On 22 March 2016 at 19:48, Andres Freund wrote: > On 2016-03-15 21:04:12 +0800, Craig Ringer wrote: > > Thanks very much for the review. > > Are you planning to update the patch? > Yes. I just spoke to Álvaro earlier. I'll pick up his modified version of my patch, remove the

Re: [HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread David G. Johnston
Please don't top-post. On Tuesday, March 22, 2016, Peter Krauss wrote: > Subjective notes to contextualize (try to explain on bad-English) my > "precedence order" and JSONB visions: > > JSON datatype is perfect as workaround, and for many simple and less > exigent

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-03-22 Thread Craig Ringer
On 23 March 2016 at 00:14, Magnus Hagander wrote: > Doing it in the backup label file is obviously a different target, where > we might need to consider backwards compatibility, Should we? > As part of the failover slots a few folks at 2ndQ looked into whether tools would

Re: [HACKERS] about google summer of code 2016

2016-03-22 Thread Álvaro Hernández Tortosa
On 22/02/16 23:23, Álvaro Hernández Tortosa wrote: On 22/02/16 05:10, Tom Lane wrote: Heikki Linnakangas writes: On 19/02/16 10:10, Ã�lvaro Hernández Tortosa wrote: Oleg and I discussed recently that a really good addition to a GSoC item would be to study whether it's

Re: [HACKERS] [PATCH] fix DROP OPERATOR to reset links to itself on commutator and negator

2016-03-22 Thread Roma Sokolov
Hi, Tomas, thanks for review and comments! > I have to admit I find the existing code a bit convoluted, particularly the > part that deals with the (commId == negId) case. And the patch does not > really improve the situation, quite the contrary. > > Perhaps it’s time to get rid of this

Re: [HACKERS] Proposal: "Causal reads" mode for load balancing reads without stale data

2016-03-22 Thread Robert Haas
On Mon, Mar 14, 2016 at 2:38 PM, Thomas Munro wrote: >> What's with the extra block? > > Yeah, that's silly, thanks. Tidied up for the next version. Some more comments on 0001: +remote_write, remote_apply, local, and off. Extra space. + * apply

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

2016-03-22 Thread Tomas Vondra
Hi, On 03/22/2016 11:07 PM, Peter Geoghegan wrote: On Tue, Mar 22, 2016 at 2:27 PM, Tomas Vondra wrote: Each query was executed 5x for each work_mem value (between 8MB and 1GB), and then a median of the runs was computed and that's what's on the "comparison".

Re: [HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread Peter Krauss
Subjective notes to contextualize (try to explain on bad-English) my "precedence order" and JSONB visions: JSON datatype is perfect as workaround, and for many simple and less exigent applications. JSONB is the "first class" datatype for user community, we expected years (!) for it ... Need some

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

2016-03-22 Thread Peter Geoghegan
On Tue, Mar 22, 2016 at 2:27 PM, Tomas Vondra wrote: > Each query was executed 5x for each work_mem value (between 8MB and 1GB), > and then a median of the runs was computed and that's what's on the > "comparison". This compares a414d96ad2b without (master) and with

Re: [HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread David G. Johnston
On Tue, Mar 22, 2016 at 1:52 PM, Peter Krauss wrote: > Seems that parser not using precedence ideal order, and that casting > obligation losts performance. > > The first problem is self-evident in this example: > > SELECT '{"x":1}'::jsonb || (('{"A":{"y":2}}'::jsonb)->'A') >

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Yury Zhuravlev
Fabrízio de Royes Mello wrote: You're correct. Yury please add your patch to the next commitfest. Done. But I do not have restrictions as part of our PostgresPro distr. I think this patch will be in production a month. Big Thanks. -- Yury Zhuravlev Postgres Professional:

Re: [HACKERS] WIP: Access method extendability

2016-03-22 Thread Alvaro Herrera
Robert Haas wrote: > On Tue, Mar 22, 2016 at 5:50 AM, Alexander Korotkov > wrote: > >> And then Alexander posted this version, without any discussion that > >> evidenced that those old objections were overridden. What happened > >> here? Did somebody discuss this in

Re: [HACKERS] WIP: Access method extendability

2016-03-22 Thread Robert Haas
On Tue, Mar 22, 2016 at 5:50 AM, Alexander Korotkov wrote: >> And then Alexander posted this version, without any discussion that >> evidenced that those old objections were overridden. What happened >> here? Did somebody discuss this in unarchived meetings? If so, it >>

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Yury Zhuravlev
I was not sure about the syntax, so this was a prototype. Now, like all completed yet. 1) I think this syntax is wrong... Instead the common should be: PREPARE [IF NOT EXISTS] ... You right. Done. 2) All of CINE statements we emit a NOTICE skipping message, so you should emit a message

Re: [HACKERS] WIP: Access method extendability

2016-03-22 Thread Alvaro Herrera
Alexander Korotkov wrote: > On Tue, Mar 22, 2016 at 1:26 AM, Alvaro Herrera > wrote: > > I noticed this state of affairs because I started reading the complete > > thread in order to verify whether a consensus had been reached regarding > > the move of IndexQualInfo and

[HACKERS] problem with precendence order in JSONB merge operator

2016-03-22 Thread Peter Krauss
Seems that parser not using precedence ideal order, and that casting obligation losts performance. The first problem is self-evident in this example: SELECT '{"x":1}'::jsonb || (('{"A":{"y":2}}'::jsonb)->'A') -- it is ok, expected result with (x,y) SELECT '{"x":1}'::jsonb ||

Re: [HACKERS] pam auth - add rhost item

2016-03-22 Thread Grzegorz Sampolski
New patch, which change pamservice parameter from pamusedns to pam_use_hostname. On 03/21/2016 10:59 AM, Grzegorz Sampolski wrote: > Ok. So if no one objected to the evening - in my time zone ofcourse :) > I will change pamusedns to pam_use_hostname. > > On 03/21/2016 08:43 AM, Haribabu Kommi

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-22 Thread Peter Geoghegan
On Tue, Mar 22, 2016 at 10:57 AM, Peter Geoghegan wrote: > That's right - I have a small number of feedback items to work > through. I also determined myself that there could be a very low > probability race condition when checking the key space across sibling > pages, and will

Re: [HACKERS] BRIN is missing in multicolumn indexes documentation

2016-03-22 Thread Petr Jediný
> Good catch! > > In addtion to your patch, we should add the description for > the multicolumn brin index, like the following one in the doc? > > --- > A multicolumn GIN index can be used with query conditions that > involve any subset of the index's columns. Unlike B-tree or GiST, >

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-22 Thread Peter Geoghegan
On Tue, Mar 22, 2016 at 9:33 AM, David Steele wrote: > It looks like an updated patch is expected here, though it seems that > the only requests are for updates to comments. That's right - I have a small number of feedback items to work through. I also determined myself that

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Fabrízio de Royes Mello
On Tue, Mar 22, 2016 at 2:19 PM, Yury Zhuravlev wrote: > > Yury Zhuravlev wrote: >>> >>> You already have a patch? If yes I'm glad to review it. >>> >> Please. Patch in attachment. > > > Fix bug, forgot change attr number in parser. And, I forgot example: > PREPARE

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Fabrízio de Royes Mello
On Tue, Mar 22, 2016 at 2:32 PM, Alvaro Herrera wrote: > > Yury Zhuravlev wrote: > > Fabrízio de Royes Mello wrote: > > >You already have a patch? If yes I'm glad to review it. > > > > If the community is not against it, I'll do it quickly. Changing the syntax > > is the

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Alvaro Herrera
Yury Zhuravlev wrote: > Fabrízio de Royes Mello wrote: > >You already have a patch? If yes I'm glad to review it. > > If the community is not against it, I'll do it quickly. Changing the syntax > is the risk. In addition, we have already missed 9.6. Also we're in the middle of a commitfest, and

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-03-22 Thread Masahiko Sawada
On Tue, Mar 22, 2016 at 11:08 PM, Fujii Masao wrote: > On Tue, Mar 22, 2016 at 9:58 PM, Kyotaro HORIGUCHI > wrote: >> Thank you for the revised patch. > > Thanks for reviewing the patch! > >> This version looks to focus on n-priority

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Yury Zhuravlev
Yury Zhuravlev wrote: You already have a patch? If yes I'm glad to review it. Please. Patch in attachment. Fix bug, forgot change attr number in parser. And, I forgot example: PREPARE usrrptplan (int) IF NOT EXISTS AS SELECT * FROM pg_operator; PREPARE New patch in attachment. --

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Yury Zhuravlev
You already have a patch? If yes I'm glad to review it. Please. Patch in attachment. -- Yury Zhuravlev Postgres Professional: http://www.postgrespro.com The Russian Postgres Companydiff --git a/src/backend/commands/prepare.c b/src/backend/commands/prepare.c index cec37ce..63d164f 100644 ---

Re: [HACKERS] Relation extension scalability

2016-03-22 Thread Petr Jelinek
On 22/03/16 10:15, Dilip Kumar wrote: On Mon, Mar 21, 2016 at 8:10 PM, Amit Kapila > wrote: 11. +{ +/* +* First try to get the lock in no-wait mode, if succeed extend one + * block, else get the lock in normal

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2016-03-22 Thread David Steele
Hi Kyotaro, On 3/18/16 3:22 AM, Pavel Stehule wrote: > I am looking this patch. It looks well, but this feature doesn't > respect upper or lower chars. It enforce upper chars. This is not > consistent with any other autocomplete. > > > I checked it against sql help and these

Re: [HACKERS] pg_ctl promote wait

2016-03-22 Thread David Steele
On 3/16/16 12:19 PM, David Steele wrote: > Hi Peter, > > On 3/9/16 3:08 PM, Michael Paquier wrote: > >> Here are some comments about 0002 > <...> >> I think that we had better do something like the attached first. >> Thoughts? > > It's been a week since Michael reviewed this patch. Could you

Re: [HACKERS] WAL logging problem in 9.4.3?

2016-03-22 Thread David Steele
On 3/15/16 10:01 PM, Kyotaro HORIGUCHI wrote: > Ok, I understand that this is not an issue in a hurry. I'll go to > another patch that needs review. Since we're getting towards the end of the CF is it time to pick this up again? Thanks, -- -David da...@pgmasters.net -- Sent via

Re: [HACKERS] amcheck (B-Tree integrity checking tool)

2016-03-22 Thread David Steele
On 3/15/16 3:42 AM, Peter Geoghegan wrote: > On Tue, Mar 15, 2016 at 12:31 AM, Amit Langote > wrote: >> Ah, I see the nuance. Thanks for the explanation. Maybe, >> bt_index_check() and bt_index_parent_child_check() / >> bt_index_check_parent_child(). IMHO, the

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-03-22 Thread Magnus Hagander
On Tue, Mar 22, 2016 at 5:27 PM, David Steele wrote: > On 3/22/16 12:14 PM, Magnus Hagander wrote: > > On Tue, Mar 22, 2016 at 5:08 PM, David Steele > > wrote: > > > > On 3/19/16 8:15 AM, Magnus Hagander wrote: > > > >

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-03-22 Thread David Steele
On 3/22/16 12:14 PM, Magnus Hagander wrote: > On Tue, Mar 22, 2016 at 5:08 PM, David Steele > wrote: > > On 3/19/16 8:15 AM, Magnus Hagander wrote: > > > I've attached an updated patch, which is rebased on current master and > >

Re: [HACKERS] Minor bug affecting ON CONFLICT lock wait log messages

2016-03-22 Thread Alvaro Herrera
Stephen Frost wrote: > I don't think either message really fits here, unfortunately. We're not > actually checking the uniqueness of someone else's tuple here either, > after all, we're waiting to see what happens with their tuple because > ours won't be unique if it goes in with that other

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-03-22 Thread Magnus Hagander
On Tue, Mar 22, 2016 at 5:08 PM, David Steele wrote: > > On 3/19/16 8:15 AM, Magnus Hagander wrote: > > > I've attached an updated patch, which is rebased on current master and > > includes the oid fix. > > Before doing a thorough review of this patch there are a few points

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-03-22 Thread David Steele
Hi Magnus, On 3/19/16 8:15 AM, Magnus Hagander wrote: > I've attached an updated patch, which is rebased on current master and > includes the oid fix. Before doing a thorough review of this patch there are a few points I would like to consider: * I think it's really important to provide the

Re: [HACKERS] [PATCH] we have added support for box type in SP-GiST index

2016-03-22 Thread Teodor Sigaev
Isn't this basically the same thing that the cube contrib module does? (Which has the added benefit of kNN-capable operators). No, cube module introduces new type - N-dimensional box. And adds an index support for it. Current patch suggests non-traditional indexing technique for 2D boxes by

Re: [HACKERS] [PATCH] we have added support for box type in SP-GiST index

2016-03-22 Thread Teodor Sigaev
tend to think of a *point* as having *zero* dimensions. Would it perhaps be more accurate to say we are treating a 2-dimensional box as a point in 4-dimensional space? Exactly, sorry for ambiguity. -- Teodor Sigaev E-mail: teo...@sigaev.ru

Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol

2016-03-22 Thread Magnus Hagander
On Tue, Mar 22, 2016 at 2:48 PM, Michael Paquier wrote: > On Mon, Mar 21, 2016 at 11:07 PM, Robert Haas > wrote: > > Well, I said before and I'll say again that I don't like the idea of > > multiple password verifiers. I think that's an

[HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Merlin Moncure
On Tue, Mar 22, 2016 at 9:53 AM, Andres Freund > wrote: > On 2016-03-22 09:37:15 -0500, Merlin Moncure wrote: >> On Tue, Mar 22, 2016 at 8:01 AM, Andres Freund > wrote: >> > Hi, >> > On 2016-03-22 12:41:43 +0300, Yury Zhuravlev

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Yury Zhuravlev
Fabrízio de Royes Mello wrote: Skip error if already exists when catched in src/backend/commands/prepare.c isn't enough? I think that's enough. And expand PrepareStmt of course. -- Yury Zhuravlev Postgres Professional: http://www.postgrespro.com The Russian Postgres Company -- Sent via

Re: [HACKERS] [PATCH] we have added support for box type in SP-GiST index

2016-03-22 Thread Jim Nasby
On 3/21/16 7:41 PM, Stas Kelvich wrote: While people tends to use machine learning and regressions models more and more it is interesting to have some general n-dim indexing with kNN, but I think it is different problem and should be solved in a different way. I think one of the issues here

Re: [HACKERS] Some messages of pg_rewind --debug not getting translated

2016-03-22 Thread Alvaro Herrera
Seems reasonable. For the last hunk in your patch, though, I would add a /* translator: */ comment explaining what each of the values is; otherwise it's just incomprehensible percent-sign-salad for the poor translator. Note that if the line is too long you have to use dirty tricks to avoid

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-03-22 Thread Andres Freund
On 2016-03-22 10:40:28 -0400, Robert Haas wrote: > On Tue, Mar 22, 2016 at 6:52 AM, Andres Freund wrote: > > I'm actually rather unconvinced that it's all that common that all > > subtransactions are on one page. If you have concurrency - otherwise > > there'd be not much

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Fabrízio de Royes Mello
On Tue, Mar 22, 2016 at 11:50 AM, Stephen Frost wrote: > > I agree that PREPARE IF NOT EXISTS would be nice to have, but only if we > can keep it fast somehow, which is the part that makes me wonder a bit. > Skip error if already exists when catched in

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Stephen Frost
* Andres Freund (and...@anarazel.de) wrote: > On 2016-03-22 09:37:15 -0500, Merlin Moncure wrote: > > On Tue, Mar 22, 2016 at 8:01 AM, Andres Freund wrote: > > > Hi, > > > On 2016-03-22 12:41:43 +0300, Yury Zhuravlev wrote: > > >> Do I understand correctly the only way know

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Andres Freund
On 2016-03-22 09:37:15 -0500, Merlin Moncure wrote: > On Tue, Mar 22, 2016 at 8:01 AM, Andres Freund wrote: > > Hi, > > On 2016-03-22 12:41:43 +0300, Yury Zhuravlev wrote: > >> Do I understand correctly the only way know availability PREPARE it will > >> appeal to

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Stephen Frost
* Merlin Moncure (mmonc...@gmail.com) wrote: > On Tue, Mar 22, 2016 at 8:01 AM, Andres Freund wrote: > > On 2016-03-22 12:41:43 +0300, Yury Zhuravlev wrote: > >> Do I understand correctly the only way know availability PREPARE it will > >> appeal to pg_prepared_statements? >

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-03-22 Thread Robert Haas
On Tue, Mar 22, 2016 at 6:52 AM, Andres Freund wrote: > I'm actually rather unconvinced that it's all that common that all > subtransactions are on one page. If you have concurrency - otherwise > there'd be not much point in this patch - they'll usually be heavily >

Re: [HACKERS] improving GROUP BY estimation

2016-03-22 Thread Alexander Korotkov
Hi, Tomas! On Mon, Mar 21, 2016 at 2:39 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Fri, Mar 18, 2016 at 1:20 PM, Dean Rasheed > wrote: > >> Probably a better URL to give is >> http://www.adellera.it/investigations/distinct_balls/ which has a link

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Merlin Moncure
On Tue, Mar 22, 2016 at 8:01 AM, Andres Freund wrote: > Hi, > On 2016-03-22 12:41:43 +0300, Yury Zhuravlev wrote: >> Do I understand correctly the only way know availability PREPARE it will >> appeal to pg_prepared_statements? >> I think this is not a good practice. In some

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-03-22 Thread Amit Kapila
On Tue, Mar 22, 2016 at 6:29 PM, Andres Freund wrote: > > On 2016-03-22 18:19:48 +0530, Amit Kapila wrote: > > > I'm actually rather unconvinced that it's all that common that all > > > subtransactions are on one page. If you have concurrency - otherwise > > > there'd be not

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Fabrízio de Royes Mello
On Tue, Mar 22, 2016 at 10:01 AM, Andres Freund wrote: > > Hi, > > > On 2016-03-22 12:41:43 +0300, Yury Zhuravlev wrote: > > Do I understand correctly the only way know availability PREPARE it will > > appeal to pg_prepared_statements? > > I think this is not a good practice.

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Yury Zhuravlev
Yury Zhuravlev wrote: It may be necessary to add an index on the field "statement"? Sorry. Said nonsense. We need to understand what kind of behavior should be if the name is the same but query_string not? Replace? Thanks. -- Yury Zhuravlev Postgres Professional:

Re: [HACKERS] Support for N synchronous standby servers - take 2

2016-03-22 Thread Fujii Masao
On Tue, Mar 22, 2016 at 9:58 PM, Kyotaro HORIGUCHI wrote: > Thank you for the revised patch. Thanks for reviewing the patch! > This version looks to focus on n-priority method. Stuffs for the > other methods like n-quorum has been removed. It is okay for me. I

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Yury Zhuravlev
Fabrízio de Royes Mello wrote: You already have a patch? If yes I'm glad to review it. If the community is not against it, I'll do it quickly. Changing the syntax is the risk. In addition, we have already missed 9.6. Thanks. -- Yury Zhuravlev Postgres Professional:

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Andres Freund
On 2016-03-22 16:51:26 +0300, Yury Zhuravlev wrote: > Andres Freund wrote: > >you'd still need to compare the > >statement somehow > > You right, I think about that as syntax sugar. Maybe with some performance > increase but hardly. We can save on a round trip. If anything what'd be useful would

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-22 Thread Petr Jelinek
On 22/03/16 14:40, Michael Paquier wrote: On Wed, Mar 9, 2016 at 11:10 PM, Petr Jelinek wrote: Something like attached is simplest way this would work correctly (note that I didn't really test it and it's missing comments). Note that we are falling back to the old parsing

Re: [HACKERS] NOT EXIST for PREPARE

2016-03-22 Thread Yury Zhuravlev
Andres Freund wrote: you'd still need to compare the statement somehow You right, I think about that as syntax sugar. Maybe with some performance increase but hardly. We can save on a round trip. It may be necessary to add an index on the field "statement"? Thanks. -- Yury Zhuravlev

Re: [HACKERS] multivariate statistics v14

2016-03-22 Thread Tomas Vondra
Hi, On 03/22/2016 01:46 PM, Tatsuo Ishii wrote: ... Sorry, maybe I did not explain clearly. My question is, if put patches only 0002 to 0005 into 9.6, does it still give any visible benefit to users? The users will be able to define statistics with the limitation that only a single one (the

Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol

2016-03-22 Thread Michael Paquier
On Mon, Mar 21, 2016 at 11:07 PM, Robert Haas wrote: > Well, I said before and I'll say again that I don't like the idea of > multiple password verifiers. I think that's an accident waiting to > happen, and I'm not prepared to put in the amount of time and energy > that it

Re: [HACKERS] pg_dump dump catalog ACLs

2016-03-22 Thread Alexander Korotkov
Hi, Stephen! I'm signed to review this patch. At first, patch wasn't applied cleanly, it had a conflict at the end of system_views.sql. But that way very easy to fix. On Mon, Mar 14, 2016 at 7:00 PM, Stephen Frost wrote: > I've not included it in this patch, but my thinking

Re: [HACKERS] Patch to implement pg_current_logfile() function

2016-03-22 Thread Michael Paquier
On Sat, Mar 12, 2016 at 12:46 AM, Gilles Darold wrote: > Here is the patch rewritten to use alternate file > $PGDATA/pg_log_filename to store the current log filename used by > syslogger. All examples used in the first mail of this thread work the > exact same way. If

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-22 Thread Michael Paquier
On Wed, Mar 9, 2016 at 11:10 PM, Petr Jelinek wrote: > Something like attached is simplest way this would work correctly (note that > I didn't really test it and it's missing comments). Note that we are falling > back to the old parsing in case the GetLocaleInfoEx didn't

Re: [HACKERS] Relax requirement for INTO with SELECT in pl/pgsql

2016-03-22 Thread Merlin Moncure
On Tue, Mar 22, 2016 at 12:20 AM, Pavel Stehule wrote: > > 2016-03-22 6:06 GMT+01:00 Tom Lane : >> >> Pavel Stehule writes: >> > I can live with SELECT fx(x). It is little bit dangerous, but this risk >> > can >> > be easy

Re: [HACKERS] BRIN is missing in multicolumn indexes documentation

2016-03-22 Thread Fujii Masao
On Tue, Mar 22, 2016 at 12:53 AM, Petr Jediný wrote: > Hello, > > the http://www.postgresql.org/docs/9.5/static/indexes-multicolumn.html > page doesn't mention BRIN support, but according to the > http://www.postgresql.org/docs/9.5/static/sql-createindex.html it is >

Re: [HACKERS] Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)

2016-03-22 Thread Aleksander Alekseev
> > It's possible that memset() would be more convincing. > > +1 OK, here is corrected patch. -- Best regards, Aleksander Alekseev http://eax.me/ diff --git a/src/backend/access/gist/gistxlog.c b/src/backend/access/gist/gistxlog.c index b48e97c..273e0b0 100644 ---

Re: [HACKERS] Speedup twophase transactions

2016-03-22 Thread Michael Paquier
On Tue, Mar 22, 2016 at 1:53 AM, Jesper Pedersen wrote: > On 03/18/2016 12:50 PM, Stas Kelvich wrote: >>> >>> On 11 Mar 2016, at 19:41, Jesper Pedersen >>> wrote: >>> >> >> Thanks for review, Jesper. >> >>> Some comments: >>> >>> * The

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2016-03-22 Thread Artur Zakirov
I attached the patch, which fixes the pg_trgm documentation. On 19.03.2016 01:18, Artur Zakirov wrote: 2016-03-18 23:46 GMT+03:00 Jeff Janes >: <% and <<-> are not documented at all. Is that a deliberate choice? Since they were

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-22 Thread Andres Freund
On 2016-03-22 14:03:06 +0100, Petr Jelinek wrote: > On 22/03/16 12:47, Andres Freund wrote: > >On 2016-03-21 18:10:55 +0100, Petr Jelinek wrote: > > > >>+ > >>+ > >>+ Generic Message Callback > >>+ > >>+ > >>+ The optional message_cb callback is called > >>whenever > >>+ a

  1   2   >