Re: [HACKERS] Typo in replorigin_sesssion_origin (9.5+)

2015-10-14 Thread Craig Ringer
On 14 October 2015 at 21:24, Alvaro Herrera wrote: > Craig Ringer wrote: >> Hi all >> >> Before 9.5 goes final, lets change replorigin_sesssion_origin and >> replorigin_sesssion_origin_lsn to remove the extra 's'. > > Hmm? I already fixed this two weeks ago in > http://git.postgresql.org/gitweb/?

[HACKERS] Union All View execution

2015-10-14 Thread Ivan Novick
Hi, If we have two queries, Query A and Query B that both return same columns. If we do Union All View will postgresql execute Query A and then Query B sequentially? Does the work being discussed around parallel query have the potential to parallely execute both parts of a Union All View? Also

Re: [HACKERS] Parallel Seq Scan

2015-10-14 Thread Noah Misch
On Wed, Oct 14, 2015 at 07:52:15PM -0400, Robert Haas wrote: > On Tue, Oct 13, 2015 at 9:08 PM, Noah Misch wrote: > > On Mon, Oct 12, 2015 at 11:46:08AM -0400, Robert Haas wrote: > >> Calls from SerializeParamList() need the same treatment as > >> calls from copyParamList() because it, too, will t

Re: [HACKERS] Use pg_rewind when target timeline was switched

2015-10-14 Thread Michael Paquier
On Wed, Oct 14, 2015 at 6:00 PM, Alexander Korotkov wrote: > On Sat, Sep 19, 2015 at 2:25 AM, Michael Paquier wrote: >> Alexander, what do you think about that? I think that we should be >> able to rewind with for example node 2 as target and node 3 as source, >> and vice-versa as per the example y

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-10-14 Thread Kouhei Kaigai
> -Original Message- > From: Kyotaro HORIGUCHI [mailto:horiguchi.kyot...@lab.ntt.co.jp] > Sent: Wednesday, October 14, 2015 4:40 PM > To: Kaigai Kouhei(海外 浩平) > Cc: fujita.ets...@lab.ntt.co.jp; pgsql-hackers@postgresql.org; > shigeru.han...@gmail.com; robertmh...@gmail.com > Subject: Re: [H

Re: [HACKERS] INSERT ... ON CONFLICT documentation clean-up patch

2015-10-14 Thread Peter Geoghegan
Hi, On Wed, Oct 14, 2015 at 9:38 AM, Andres Freund wrote: > "do not work sensibly" imo doesn't sound very good in docs. Maybe > something roughly along the lines of "are unlikely to work as expected > as the on conflict action is only taken in case of unique violation on > the target relation, no

Re: [HACKERS] [Proposal] Table partition + join pushdown

2015-10-14 Thread Kouhei Kaigai
> -Original Message- > From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Taiki Kondo > Sent: Thursday, October 08, 2015 5:28 PM > To: Kyotaro HORIGUCHI > Cc: Kaigai Kouhei(海外 浩平); Iwaasa Akio(岩浅 晃郎); > pgsql-hackers@postgresql.org > Subject:

[HACKERS] Fix unclear comments in tablecmds.c

2015-10-14 Thread Amit Langote
Came across a couple of unclear comments about functions returning ObjectAddress. Attached fixes them. Thanks, Amit diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index 7668c9d..403582c 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/table

Re: [HACKERS] Parallel Seq Scan

2015-10-14 Thread Robert Haas
On Tue, Oct 13, 2015 at 9:08 PM, Noah Misch wrote: > On Mon, Oct 12, 2015 at 11:46:08AM -0400, Robert Haas wrote: >> plpgsql_param_fetch() assumes that it can detect whether it's being >> called from copyParamList() by checking whether params != >> estate->paramLI. I don't know why this works, bu

Re: [HACKERS] pam auth - add rhost item

2015-10-14 Thread Euler Taveira
On 14-10-2015 17:35, kolo hhmow wrote: Yes, but this is very ugly solution, becasue you have to restart postgresql daemon each time you have added a new user. > Restart != Reload. You can even do it using SQL. This solution which I propose is give an abbility to dinamicaly manage user accounts

[HACKERS] A bunch of regular-expression improvements

2015-10-14 Thread Tom Lane
Some of you probably wondered where the heck the recent flurry of activity around regular expressions (eg, commits 9fe8fe9c9e, b63fc2877) came from. The answer is that it was mostly driven by some fuzz testing that Greg Stark reported to the PG security list: he found various random regexp patterns

Re: [HACKERS] Parallel Seq Scan

2015-10-14 Thread Robert Haas
On Wed, Oct 14, 2015 at 12:30 PM, Amit Kapila wrote: >> - I continue to think GetParallelShmToc is the wrong approach. >> Instead, each time ExecParallelInitializeDSM or >> ExecParallelInitializeDSM calls a nodetype-specific initialized >> function (as described in the previous point), have it pas

Re: [HACKERS] More work on SortSupport for text - strcoll() and strxfrm() caching

2015-10-14 Thread Peter Geoghegan
On Wed, Oct 14, 2015 at 4:09 PM, Robert Haas wrote: > I wonder if it wouldn't be better to just add a separate Boolean > indicating exactly the thing we care about. This doesn't seem > particularly easy to understand and verify. I'm not really sure that that's an improvement. But I defer to you.

Re: [HACKERS] More work on SortSupport for text - strcoll() and strxfrm() caching

2015-10-14 Thread Robert Haas
On Wed, Oct 14, 2015 at 7:05 PM, Peter Geoghegan wrote: > On Mon, Oct 12, 2015 at 12:31 PM, Peter Geoghegan wrote: >> I'll consider a more comprehensive fix. > > I attach a revised fix that considers the problem of misinterpreting > the contents of the buffers in both directions. I wonder if it

Re: [HACKERS] [PROPOSAL] DIAGNOSTICS = SKIPPED_ROW_COUNT

2015-10-14 Thread Robert Haas
On Wed, Oct 14, 2015 at 6:28 PM, dinesh kumar wrote: > I see this feature as an add on to do the parallel DML operations. > There won't be any problem, if operations are mutually exclusive. > I mean, each session operates on unique set of tuples. > > In the above case, we don't even need of SKIP L

Re: [HACKERS] More work on SortSupport for text - strcoll() and strxfrm() caching

2015-10-14 Thread Peter Geoghegan
On Mon, Oct 12, 2015 at 12:31 PM, Peter Geoghegan wrote: > I'll consider a more comprehensive fix. I attach a revised fix that considers the problem of misinterpreting the contents of the buffers in both directions. Thanks -- Peter Geoghegan From c2d4558df3ce93b939fa319dd6e0735400833df0 Mon Sep

Re: [HACKERS] [PROPOSAL] DIAGNOSTICS = SKIPPED_ROW_COUNT

2015-10-14 Thread dinesh kumar
Hi Robert, On Wed, Oct 14, 2015 at 12:56 PM, Robert Haas wrote: > On Tue, Oct 13, 2015 at 10:37 PM, dinesh kumar > wrote: > > In an existing wait policies like WAIT(default) and NO WAIT, > > one can be sure to determine(Using ROW_COUNT daignostics counter), > > how many required tuples he proce

Re: [HACKERS] pam auth - add rhost item

2015-10-14 Thread kolo hhmow
Yes, you right - my mistake. But editing pg_hba.conf with lot of entries is little inconveniet. When using pam modules with backend database like postgresql/or whatever is more efficient and convenient - this is whay among others I need pass client ip to pam modules, and then to backend database fo

Re: [HACKERS] Getting sorted data from foreign server

2015-10-14 Thread Robert Haas
On Wed, Oct 14, 2015 at 7:30 AM, Ashutosh Bapat wrote: > The patch uses a factor of 1.1 (10% increase) to multiple the startup and > total costs in fpinfo for unsorted data. > > This change has caused the plans for few queries in the test postgres_fdw to > change. There is ORDER BY and LIMIT claus

Re: [HACKERS] pam auth - add rhost item

2015-10-14 Thread kolo hhmow
Yes, but this is very ugly solution, becasue you have to restart postgresql daemon each time you have added a new user. This solution which I propose is give an abbility to dinamicaly manage user accounts without need to restart each time a user account entry has change. When you have lot of active

Re: [HACKERS] Performance improvement for joins where outer side is unique

2015-10-14 Thread Robert Haas
On Wed, Oct 14, 2015 at 1:03 AM, Pavel Stehule wrote: > it is great +1. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql

Re: [HACKERS] [PROPOSAL] DIAGNOSTICS = SKIPPED_ROW_COUNT

2015-10-14 Thread Robert Haas
On Tue, Oct 13, 2015 at 10:37 PM, dinesh kumar wrote: > In an existing wait policies like WAIT(default) and NO WAIT, > one can be sure to determine(Using ROW_COUNT daignostics counter), > how many required tuples he processed in a transaction. > But this is not case when it comes to SKIP LOCKED.

Re: [HACKERS] pam auth - add rhost item

2015-10-14 Thread Robert Haas
On Tue, Oct 13, 2015 at 4:12 PM, kolo hhmow wrote: > Yes, sorry. I was in hurry when I posted this message. > I dont understand whay in CheckPAMAuth function only PAM_USER item is adding > to pam information before authenticate? > Wheter it would be a problem to set additional pam information like

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-10-14 Thread Robert Haas
On Wed, Oct 14, 2015 at 4:31 AM, Etsuro Fujita wrote: > Agreed. > > As KaiGai-san also pointed out before, I think we should address this in > each of the following cases: > > 1) remote qual (scanrelid>0) > 2) remote join (scanrelid==0) > > As for #1, I noticed that there is a bug in handling the

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Amir Rohan
IOn 10/14/2015 08:45 PM, Alvaro Herrera wrote: > Amir Rohan wrote: > >> it does fail the "dependent options" test: >> $ postgres -C "archive_mode" >> on >> $ postgres -C wal_level >> minimal >> >> no errors, great, let's try it: >> $ pg_ctl restart >> >> FATAL: WAL archival cannot be enabled whe

Re: [HACKERS] Can extension build own SGML document?

2015-10-14 Thread Alvaro Herrera
Christopher Browne wrote: > There would be some merit to some remapping to transform "creaky old > DocBook 4.2" (what we're using) to a newer version, perhaps biased towards > XML, and have our toolset merge the bits into a big XML (in DocBook 5, > presumably) file for processing using more modern

Re: [HACKERS] Allow ssl_renegotiation_limit in PG 9.5

2015-10-14 Thread Shay Rojansky
Just to give some added reasoning... As Andres suggested, Npgsql sends ssl_renegotiation_limit=0 because we've seen renegotiation bugs with the standard .NET SSL implementation (which Npgsql uses). Seems like everyone has a difficult time with renegotiation. As Tom suggested, it gets sent in the

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Andres Freund
On October 14, 2015 7:45:53 PM GMT+02:00, Alvaro Herrera wrote: >Amir Rohan wrote: > >> it does fail the "dependent options" test: >> $ postgres -C "archive_mode" >> on >> $ postgres -C wal_level >> minimal >> >> no errors, great, let's try it: >> $ pg_ctl restart >> >> FATAL: WAL archival can

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Alvaro Herrera
Amir Rohan wrote: > it does fail the "dependent options" test: > $ postgres -C "archive_mode" > on > $ postgres -C wal_level > minimal > > no errors, great, let's try it: > $ pg_ctl restart > > FATAL: WAL archival cannot be enabled when wal_level is "minimal" This complaint could be fixed we h

Re: [HACKERS] Can extension build own SGML document?

2015-10-14 Thread Christopher Browne
On 14 October 2015 at 13:04, Jim Nasby wrote: > On 9/15/15 10:13 AM, Tom Lane wrote: > >> Jim Nasby writes: >> >>> On 9/15/15 8:43 AM, Tom Lane wrote: >>> AFAICT from a quick look at its documentation, asciidoc can produce either html or docbook output; so as soon as you want something

Re: [HACKERS] Allow ssl_renegotiation_limit in PG 9.5

2015-10-14 Thread Tom Lane
Alvaro Herrera writes: > Andres Freund wrote: >> On 2015-10-14 14:19:40 -0300, Alvaro Herrera wrote: >>> I think we could continue to have the parameter except that it throws an >>> error if you try to set it to something other than 0. >> That'll make it hard to ever remove it tho. > What would

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Amir Rohan
On 10/14/2015 07:41 PM, David Fetter wrote: >> On Wed, Oct 14, 2015 at 01:52:21AM +0300, Amir Rohan wrote: >> >> I've considered "vendoring", but it seems like enough code surgery >> be involved to make this very dubious "reuse". The language is simple >> enough that writing a parser from scratch

Re: [HACKERS] Allow ssl_renegotiation_limit in PG 9.5

2015-10-14 Thread Alvaro Herrera
Andres Freund wrote: > On 2015-10-14 14:19:40 -0300, Alvaro Herrera wrote: > > I think we could continue to have the parameter except that it throws an > > error if you try to set it to something other than 0. > > That'll make it hard to ever remove it tho. Well, we just have to wait until 9.4 is

Re: [HACKERS] Allow ssl_renegotiation_limit in PG 9.5

2015-10-14 Thread Andres Freund
On 2015-10-14 14:19:40 -0300, Alvaro Herrera wrote: > I think we could continue to have the parameter except that it throws an > error if you try to set it to something other than 0. That'll make it hard to ever remove it tho. Not sure if it's worth doing so for a dubious use of the variable. And

Re: [HACKERS] Allow ssl_renegotiation_limit in PG 9.5

2015-10-14 Thread Alvaro Herrera
Andres Freund wrote: > On 2015-10-14 13:04:30 -0400, Tom Lane wrote: > > It doesn't seem to me that a connector such as npgsql has any business > > whatsoever fooling with such a parameter, unconditionally or otherwise. > > I think in npgsql simply doesn't support renegotiation (IIRC because > it'

Re: [HACKERS] Allow ssl_renegotiation_limit in PG 9.5

2015-10-14 Thread Andres Freund
On 2015-10-14 13:04:30 -0400, Tom Lane wrote: > It doesn't seem to me that a connector such as npgsql has any business > whatsoever fooling with such a parameter, unconditionally or otherwise. I think in npgsql simply doesn't support renegotiation (IIRC because it'd have been hard to implement in

Re: [HACKERS] Can extension build own SGML document?

2015-10-14 Thread Jim Nasby
On 9/15/15 10:13 AM, Tom Lane wrote: Jim Nasby writes: On 9/15/15 8:43 AM, Tom Lane wrote: AFAICT from a quick look at its documentation, asciidoc can produce either html or docbook output; so as soon as you want something other than html output (in particular, PDF), you're back to relying on

Re: [HACKERS] Allow ssl_renegotiation_limit in PG 9.5

2015-10-14 Thread Tom Lane
Andres Freund writes: > On 2015-10-14 18:53:14 +0300, Shay Rojansky wrote: >> However, the new situation where some versions of PG allow this parameter >> while others bomb when seeing it. Specifically, Npgsql sends >> ssl_renegotiation_limit=0 in the startup packet to completely disable >> renego

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-10-14 Thread Robert Haas
On Wed, Oct 14, 2015 at 3:10 AM, Kyotaro HORIGUCHI wrote: > AFAICS, no updated version for remote tables are obtained. You're right, but that's OK: the previously-obtained tuples fail to meet the current version of the quals, so there's no problem (that I can see). > Even though the behavior I d

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread David Fetter
On Wed, Oct 14, 2015 at 01:52:21AM +0300, Amir Rohan wrote: > On 10/14/2015 01:12 AM, Alvaro Herrera wrote: > > Amir Rohan wrote: > >> On 10/14/2015 12:14 AM, Alvaro Herrera wrote: > >>> Amir Rohan wrote: > >>> > I've been considering that. Reusing the parser would ensure no errors > are

Re: [HACKERS] INSERT ... ON CONFLICT documentation clean-up patch

2015-10-14 Thread Andres Freund
On 2015-10-11 17:54:24 -0700, Peter Geoghegan wrote: > + > + > + INSERT statements with ON > + CONFLICT clauses do not work sensibly with the partitioning > + schemes shown here, since trigger functions are not currently > + capable of examining the structure of the ori

[HACKERS] pg_restore cancel TODO

2015-10-14 Thread Jeff Janes
I've added the TODO item: When pg_upgrade -j ... is interrupted (for example, ctrl-C from the keyboard) make it cancel the children processes. The context where this arises is that I want to populate data into a new installation compiled with a patch under review, but immediately get error messag

Re: [HACKERS] Parallel Seq Scan

2015-10-14 Thread Amit Kapila
On Wed, Oct 14, 2015 at 3:29 AM, Robert Haas wrote: > > On Tue, Oct 13, 2015 at 2:45 AM, Amit Kapila wrote: > > Attached is rebased patch for partial seqscan support. > > Review comments: > > > - I continue to think GetParallelShmToc is the wrong approach. > Instead, each time ExecParallelInitial

Re: [HACKERS] Allow ssl_renegotiation_limit in PG 9.5

2015-10-14 Thread Andres Freund
On 2015-10-14 18:53:14 +0300, Shay Rojansky wrote: > However, the new situation where some versions of PG allow this parameter > while others bomb when seeing it. Specifically, Npgsql sends > ssl_renegotiation_limit=0 in the startup packet to completely disable > renegotiation. At this early stage

[HACKERS] Allow ssl_renegotiation_limit in PG 9.5

2015-10-14 Thread Shay Rojansky
Hi hackers. I noticed ssl_renegotiation_limit has been removed in PostgreSQL 9.5, good riddance... However, the new situation where some versions of PG allow this parameter while others bomb when seeing it. Specifically, Npgsql sends ssl_renegotiation_limit=0 in the startup packet to completely d

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Amir Rohan
On 10/14/2015 05:55 PM, Andres Freund wrote: > On 2015-10-14 17:46:25 +0300, Amir Rohan wrote: >> On 10/14/2015 05:35 PM, Andres Freund wrote: >>> Then your argument about the CF process doesn't seem to make sense. > >> Why? I ask again, what do you mean by "separate process"? > > Not going throu

[HACKERS] OS X El Capitan and DYLD_LIBRARY_PATH

2015-10-14 Thread Peter Eisentraut
The new OS X release 10.11 "El Capitan" has a "security" feature that prevents passing DYLD_LIBRARY_PATH to child processes. Somehow, that variable is stripped from the environment. Consequently, the current in-tree "make check" test setup will no longer work, because programs such as initdb and

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Andres Freund
On 2015-10-14 17:46:25 +0300, Amir Rohan wrote: > On 10/14/2015 05:35 PM, Andres Freund wrote: > > Then your argument about the CF process doesn't seem to make sense. > Why? I ask again, what do you mean by "separate process"? Not going through the CF and normal release process. > either it's in

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Amir Rohan
On 10/14/2015 05:35 PM, Andres Freund wrote: > On 2015-10-14 16:50:41 +0300, Amir Rohan wrote: >>> I don't think we as a community want to do that without review >>> mechanisms in place, and I personally don't think we want to add >>> separate processes for this. >>> >> >> That's what "contribute"

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Andres Freund
On 2015-10-14 16:50:41 +0300, Amir Rohan wrote: > > I don't think we as a community want to do that without review > > mechanisms in place, and I personally don't think we want to add > > separate processes for this. > > > > That's what "contribute" means in my book. Then your argument about the

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Amir Rohan
On 10/14/2015 04:24 PM, Andres Freund wrote: > On 2015-10-14 16:17:55 +0300, Amir Rohan wrote: >> it does fail the "dependent options" test: >> $ postgres -C "archive_mode" >> on >> $ postgres -C wal_level >> minimal > > Yea, because that's currently evaluated outside the config > mechanism. It'd

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Andres Freund
On 2015-10-14 16:17:55 +0300, Amir Rohan wrote: > it does fail the "dependent options" test: > $ postgres -C "archive_mode" > on > $ postgres -C wal_level > minimal Yea, because that's currently evaluated outside the config mechanism. It'd imo would be good to change that independent of this threa

Re: [HACKERS] Typo in replorigin_sesssion_origin (9.5+)

2015-10-14 Thread Alvaro Herrera
Craig Ringer wrote: > Hi all > > Before 9.5 goes final, lets change replorigin_sesssion_origin and > replorigin_sesssion_origin_lsn to remove the extra 's'. Hmm? I already fixed this two weeks ago in http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=aea76d128ad85f38aa0f4255fb9d46

Re: [HACKERS] Database schema diff

2015-10-14 Thread Michal Novotny
Hi Christopher, thanks a lot for your suggestion however I need to run against dump files so it's useless for me. Thanks anyway, Michal On 10/13/2015 07:23 PM, Christopher Browne wrote: > On 13 October 2015 at 11:48, Michal Novotny > mailto:michal.novo...@trustport.com>> wrote: > > Hi guys

Re: [HACKERS] Database schema diff

2015-10-14 Thread Michal Novotny
I have to admit I was having the same idea few years ago however I never got to implement it, nevertheless I should mount 2 trees for diff comparison, isn't that correct? I mean to mount as /mnt/dumps/old and Few years ago I developed a tool called fsgateway > (https://github.com/mk8/fsgateway)

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Amir Rohan
On 10/14/2015 01:30 PM, Andres Freund wrote: > On 2015-10-14 01:54:46 +0300, Amir Rohan wrote: >> Andres, please see upthread for quite a bit on what it doesn't do, and >> why having it in the server is both an advantages and a shortcoming. > > As far as I have skimmed the thread it's only talking

Re: [HACKERS] Database schema diff

2015-10-14 Thread Michal Novotny
Hi, thanks a lot for your reply, unfortunately it's not working at all, I run it as: # java -jar apgdiff-2.4.jar But it's stuck on the futex wait so unfortunately it didn't work at all. Thanks for the reply anyway, Michal On 10/14/2015 01:53 PM, Иван Фролков wrote: >> I would like to ask yo

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2015-10-14 Thread Shulgin, Oleksandr
On Wed, Oct 14, 2015 at 12:41 PM, Victor Wagner wrote: > On 2015.08.18 at 07:18:50 +0300, Victor Wagner wrote: > > > Rationale > > = > > > > Since introduction of the WAL-based replication into the PostgreSQL, it > is > > possible to create high-availability and load-balancing clusters. >

[HACKERS] Re: [HACKERS] Database schema diff

2015-10-14 Thread Иван Фролков
> I would like to ask you whether is there any tool to be able to compare > database schemas ideally no matter what the column order is or to dump > database table with ascending order of all database columns. Take a look a tool called apgdiff http://apgdiff.com/ Its development seems suspended, b

Re: [HACKERS] Getting sorted data from foreign server

2015-10-14 Thread Ashutosh Bapat
PFA the patch with all the comments addressed. On Tue, Oct 13, 2015 at 10:07 PM, Robert Haas wrote: > On Tue, Oct 13, 2015 at 3:29 AM, Ashutosh Bapat > wrote: > >> - You consider pushing down ORDER BY if any prefix of the query > >> pathkeys satisfy is_foreign_expr(), but that doesn't seem righ

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

2015-10-14 Thread Masahiko Sawada
Reply to multiple member. > Hm. This is not much helpful in the case we especially mentioned > upthread at some point with 2 data centers, first one has the master > and a sync standby, and second one has a set of standbys. We need to > be sure that the standby in DC1 acknowledges all the time, an

[HACKERS] Patch: Implement failover on libpq connect level.

2015-10-14 Thread Victor Wagner
On 2015.08.18 at 07:18:50 +0300, Victor Wagner wrote: > Rationale > = > > Since introduction of the WAL-based replication into the PostgreSQL, it is > possible to create high-availability and load-balancing clusters. > > However, there is no support for failover in the client libraries.

Re: [HACKERS] Proposal: pg_confcheck - syntactic & semantic validation of postgresql configuration files

2015-10-14 Thread Andres Freund
On 2015-10-14 01:54:46 +0300, Amir Rohan wrote: > Andres, please see upthread for quite a bit on what it doesn't do, and > why having it in the server is both an advantages and a shortcoming. As far as I have skimmed the thread it's only talking about shortcoming in case it requires a running serv

Re: [HACKERS] remaining open items

2015-10-14 Thread Andres Freund
On 2015-10-13 21:57:15 -0400, Robert Haas wrote: > - Refactoring speculative insertion with unique indexes a little. > Andres seems to think this shouldn't be an open issue, while Peter > thinks maybe it should be, or at least that's my imperfect executive > summary. Heikki isn't sure he agrees wi

Re: [HACKERS] Dangling Client Backend Process

2015-10-14 Thread Andres Freund
On 2015-10-14 17:33:01 +0900, Kyotaro HORIGUCHI wrote: > If I recall correctly, he concerned about killing the backends > running transactions which could be saved. I have a sympathy with > the opinion. I still don't. Leaving backends alive after postmaster has died prevents the auto-restart mecha

Re: [HACKERS] Use pg_rewind when target timeline was switched

2015-10-14 Thread Alexander Korotkov
On Wed, Sep 30, 2015 at 9:46 AM, Michael Paquier wrote: > On Sat, Sep 19, 2015 at 8:27 AM, Michael Paquier wrote: > > On Fri, Sep 18, 2015 at 6:25 PM, Michael Paquier wrote: > >> The refactoring of getTimelineHistory as you propose looks like a good > >> idea to me, I tried to remove by myself th

Re: [HACKERS] Use pg_rewind when target timeline was switched

2015-10-14 Thread Alexander Korotkov
On Sat, Sep 19, 2015 at 2:25 AM, Michael Paquier wrote: > OK, I see your point and you are right. This additional check allows > pg_rewind to switch one timeline back and make the scan of blocks > begin at the real origin of both timelines. I had in mind the case > where you tried to actually rew

Re: [HACKERS] Database schema diff

2015-10-14 Thread Torello Querci
Few years ago I developed a tool called fsgateway ( https://github.com/mk8/fsgateway) that show metadata (table, index, sequences, view) as normal files using fuse. In this way to yout can get differences between running db instance using diff, meld or what do you prefear. Unfortunally at the mome

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

2015-10-14 Thread Beena Emerson
On Wed, Oct 14, 2015 at 10:38 AM, Michael Paquier wrote: > On Wed, Oct 14, 2015 at 3:02 AM, Masahiko Sawada wrote: > > > It would be good even if there are some restriction such as the > > nesting level, the group setting. > > The another new approach that I came up with is, > > * Add new paramet

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-10-14 Thread Kyotaro HORIGUCHI
Ah.. I understood that what you mentioned is the lack of local recheck of foreigh tuples. Sorry for the noise. At Wed, 14 Oct 2015 17:31:16 +0900, Etsuro Fujita wrote in <561e12d4.7040...@lab.ntt.co.jp> On 2015/10/10 10:17, Robert Haas wrote: > > On Thu, Oct 8, 2015 at 11:00 PM, Etsuro Fujita

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-10-14 Thread Etsuro Fujita
On 2015/10/14 12:07, Kouhei Kaigai wrote: >> On 2015/10/07 15:39, Etsuro Fujita wrote: >> I noticed that the approach using a column to populate the foreign >> scan's slot directly wouldn't work well in some cases. For example, >> consider: >> >> SELECT * FROM verysmall v LEFT JOIN (bigft1 JOIN bi

[HACKERS] Typo in replorigin_sesssion_origin (9.5+)

2015-10-14 Thread Craig Ringer
Hi all Before 9.5 goes final, lets change replorigin_sesssion_origin and replorigin_sesssion_origin_lsn to remove the extra 's'. Yes, it's trivial. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services From 5e2abf558e0b68064aa4

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2015-10-14 Thread Fabien COELHO
Hello, Here is a review, sorry for the delay... This is done as the additional fourth patch, not merged into previous ones, to show what's changed in the manner of command storing. [...] - SQL multi-statement. SELECT 1; SELECT 2; I think this is really "SELECT 1\; SELECT 2;" I join a

Re: [HACKERS] Dangling Client Backend Process

2015-10-14 Thread Kyotaro HORIGUCHI
At Wed, 14 Oct 2015 11:08:37 +0530, Amit Kapila wrote in > On Tue, Oct 13, 2015 at 3:54 PM, Rajeev rastogi > wrote: > > If we add the event WL_POSTMASTER_DEATH also, client backend process > > handling will become same as other backend process. So postmaster death can > > be detected in the sam

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-10-14 Thread Etsuro Fujita
On 2015/10/10 10:17, Robert Haas wrote: On Thu, Oct 8, 2015 at 11:00 PM, Etsuro Fujita wrote: The best plan is presumably something like this as you said before: LockRows -> Nested Loop -> Seq Scan on verysmall v -> Foreign Scan on bigft1 and bigft2 Remote SQL: SELECT * FRO

Re: [HACKERS] Database schema diff

2015-10-14 Thread Shulgin, Oleksandr
On Tue, Oct 13, 2015 at 5:48 PM, Michal Novotny < michal.novo...@trustport.com> wrote: > Hi guys, > > I would like to ask you whether is there any tool to be able to compare > database schemas ideally no matter what the column order is or to dump > database table with ascending order of all databa

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-10-14 Thread Kyotaro HORIGUCHI
Hello, At Wed, 14 Oct 2015 03:07:31 +, Kouhei Kaigai wrote in <9a28c8860f777e439aa12e8aea7694f801157...@bpxm15gp.gisp.nec.co.jp> > > I noticed that the approach using a column to populate the foreign > > scan's slot directly wouldn't work well in some cases. For example, > > consider: > >

Re: [HACKERS] Foreign join pushdown vs EvalPlanQual

2015-10-14 Thread Kyotaro HORIGUCHI
Hello, At Fri, 9 Oct 2015 18:40:32 +0900, Etsuro Fujita wrote in <56178b90.4030...@lab.ntt.co.jp> > > What do you think the right behavior? # 'is' was omitted.. > IIUC, I think that the foreign scan's slot should be set empty, that Even for the case, EvalPlanQualFetchRowMarks retrieves tuples

Re: [HACKERS] [COMMITTERS] pgsql: Cause TestLib.pm to define $windows_os in all branches.

2015-10-14 Thread Michael Paquier
On Tue, Oct 13, 2015 at 10:17 PM, Andrew Dunstan wrote: > In general I think we can be a good deal more liberal about backpatching the > testing regime than we are with production code, where we are always > cautious, and the caution has paid big dividends in our reputation for > stability. Attach