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

2016-04-30 Thread Tom Lane
Kyotaro HORIGUCHI writes: > At Wed, 27 Apr 2016 18:05:26 -0400, Tom Lane wrote in > <3167.1461794...@sss.pgh.pa.us> >> My inclination is to just rip out the warning. > Is there anyone object to removing the warining? Hearing no objections,

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

2016-04-28 Thread Kyotaro HORIGUCHI
Hello, At Wed, 27 Apr 2016 18:05:26 -0400, Tom Lane wrote in <3167.1461794...@sss.pgh.pa.us> > Kyotaro HORIGUCHI writes: > > Sorry, I have attached an empty patch. This is another one that should > > be with content. > > I pushed this after

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

2016-04-27 Thread Tom Lane
Kyotaro HORIGUCHI writes: > Sorry, I have attached an empty patch. This is another one that should > be with content. I pushed this after whacking it around some, and cleaning up some sort-of-related problems in the syncrep parser/lexer. There remains a point

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

2016-04-27 Thread Tom Lane
Kyotaro HORIGUCHI writes: > Sorry, I have attached an empty patch. This is another one that should > be with content. I started to review this, and in passing came across this gem in syncrep_scanner.l: /* * flex emits a yy_fatal_error() function that it calls

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

2016-04-26 Thread Kyotaro HORIGUCHI
On Wed, Apr 27, 2016 at 10:14 AM, Kyotaro HORIGUCHI wrote: > I just added a comment in the v9. Sorry, I have attached an empty patch. This is another one that should be with content. regards, -- Kyotaro Horiguchi NTT Open Source Software Center

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

2016-04-26 Thread Kyotaro HORIGUCHI
Hello, At Tue, 26 Apr 2016 09:57:50 +0530, Amit Kapila wrote in > > > > Amit Kapila writes: > > > > > The main point for this improvement is that the handling for guc > >

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

2016-04-25 Thread Amit Kapila
On Tue, Apr 26, 2016 at 9:15 AM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > Hello, attached is the new version v8. > > At Tue, 26 Apr 2016 11:02:25 +0900 (Tokyo Standard Time), Kyotaro > HORIGUCHI wrote in < >

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

2016-04-25 Thread Kyotaro HORIGUCHI
Hello, attached is the new version v8. At Tue, 26 Apr 2016 11:02:25 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20160426.110225.35506931.horiguchi.kyot...@lab.ntt.co.jp> > At Sat, 23 Apr 2016 10:12:03 -0400, Tom Lane wrote in

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

2016-04-25 Thread Kyotaro HORIGUCHI
At Sat, 23 Apr 2016 10:12:03 -0400, Tom Lane wrote in <476.1461420...@sss.pgh.pa.us> > Amit Kapila writes: > > The main point for this improvement is that the handling for guc s_s_names > > is not similar to what we do for other somewhat similar

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

2016-04-23 Thread Tom Lane
Amit Kapila writes: > The main point for this improvement is that the handling for guc s_s_names > is not similar to what we do for other somewhat similar guc's and which > causes in-efficiency in non-hot code path (less used code). This is not about efficiency, this is

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

2016-04-23 Thread Amit Kapila
On Sat, Apr 23, 2016 at 5:20 PM, Michael Paquier wrote: > > On Sat, Apr 23, 2016 at 7:44 PM, Amit Kapila wrote: > > On Wed, Apr 20, 2016 at 12:46 PM, Kyotaro HORIGUCHI > > wrote: > >> > >> > >> assign_s_s_names

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

2016-04-23 Thread Michael Paquier
On Sat, Apr 23, 2016 at 7:44 PM, Amit Kapila wrote: > On Wed, Apr 20, 2016 at 12:46 PM, Kyotaro HORIGUCHI > wrote: >> >> >> assign_s_s_names causes SEGV when it is called without calling >> check_s_s_names. I think that's not the case for

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

2016-04-23 Thread Amit Kapila
On Wed, Apr 20, 2016 at 12:46 PM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > > > assign_s_s_names causes SEGV when it is called without calling > check_s_s_names. I think that's not the case for this varialbe > because it is unresettable amid a session. It is very uneasy for >

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

2016-04-20 Thread Kyotaro HORIGUCHI
At Wed, 20 Apr 2016 11:51:09 +0900, Masahiko Sawada wrote in > On Mon, Apr 18, 2016 at 2:15 PM, Kyotaro HORIGUCHI > wrote: > > At Fri, 15 Apr 2016 17:36:57 +0900,

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

2016-04-19 Thread Masahiko Sawada
On Mon, Apr 18, 2016 at 2:15 PM, Kyotaro HORIGUCHI wrote: > At Fri, 15 Apr 2016 17:36:57 +0900, Masahiko Sawada > wrote in >> >> How about if we do all the parsing stuff

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

2016-04-17 Thread Kyotaro HORIGUCHI
At Fri, 15 Apr 2016 17:36:57 +0900, Masahiko Sawada wrote in > >> How about if we do all the parsing stuff in temporary context and then copy > >> the results using TopMemoryContext? I don't think it

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

2016-04-17 Thread Kyotaro HORIGUCHI
At Sat, 16 Apr 2016 12:50:30 +0530, Amit Kapila wrote in

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

2016-04-16 Thread Amit Kapila
On Fri, Apr 15, 2016 at 11:30 AM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > > At Fri, 15 Apr 2016 08:52:56 +0530, Amit Kapila wrote : > > > > How about if we do all the parsing stuff in temporary context and then copy > > the results using

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

2016-04-15 Thread Masahiko Sawada
On Fri, Apr 15, 2016 at 3:00 PM, Kyotaro HORIGUCHI wrote: > At Fri, 15 Apr 2016 08:52:56 +0530, Amit Kapila > wrote in >> On Thu, Apr 14, 2016 at 1:10 PM, Masahiko

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

2016-04-15 Thread Kyotaro HORIGUCHI
At Fri, 15 Apr 2016 08:52:56 +0530, Amit Kapila wrote in > On Thu, Apr 14, 2016 at 1:10 PM, Masahiko Sawada > wrote: > > > > On Thu, Apr 14, 2016 at 1:11 PM, Kyotaro HORIGUCHI >

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

2016-04-14 Thread Kyotaro HORIGUCHI
At Thu, 14 Apr 2016 21:05:40 +0900, Michael Paquier wrote in

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

2016-04-14 Thread Amit Kapila
On Thu, Apr 14, 2016 at 1:10 PM, Masahiko Sawada wrote: > > On Thu, Apr 14, 2016 at 1:11 PM, Kyotaro HORIGUCHI > wrote: > > At Thu, 14 Apr 2016 12:42:06 +0900, Fujii Masao wrote in

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

2016-04-14 Thread Michael Paquier
On Thu, Apr 14, 2016 at 5:48 PM, Kyotaro HORIGUCHI wrote: > At Thu, 14 Apr 2016 17:25:39 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI > wrote in > <20160414.172539.34325458.horiguchi.kyot...@lab.ntt.co.jp> >> Hello, >> >> At

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

2016-04-14 Thread Michael Paquier
On Thu, Apr 14, 2016 at 5:25 PM, Kyotaro HORIGUCHI wrote: > diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl > index 3d14544..08e2acc 100644 > --- a/src/tools/msvc/vcregress.pl > +++ b/src/tools/msvc/vcregress.pl > @@ -548,6 +548,6 @@ sub

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

2016-04-14 Thread Kyotaro HORIGUCHI
At Thu, 14 Apr 2016 17:25:39 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20160414.172539.34325458.horiguchi.kyot...@lab.ntt.co.jp> > Hello, > > At Thu, 14 Apr 2016 13:24:34 +0900, Michael Paquier > wrote in >

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

2016-04-14 Thread Kyotaro HORIGUCHI
Hello, At Thu, 14 Apr 2016 13:24:34 +0900, Michael Paquier wrote in > On Thu, Apr 14, 2016 at 11:45 AM, Amit Kapila wrote: > > Yes, this is what I was trying to explain to

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

2016-04-14 Thread Masahiko Sawada
On Thu, Apr 14, 2016 at 1:11 PM, Kyotaro HORIGUCHI wrote: > At Thu, 14 Apr 2016 12:42:06 +0900, Fujii Masao wrote > in >> > Yes, this is what I was trying to explain to

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

2016-04-13 Thread Michael Paquier
On Thu, Apr 14, 2016 at 11:45 AM, Amit Kapila wrote: > Yes, this is what I was trying to explain to Fujii-san upthread and I have > also verified that the same works on Windows. If you could, it would be nice as well to check that nothing breaks with VS when using

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

2016-04-13 Thread Kyotaro HORIGUCHI
At Thu, 14 Apr 2016 12:42:06 +0900, Fujii Masao wrote in > > Yes, this is what I was trying to explain to Fujii-san upthread and I have > > also verified that the same works on Windows. > > Oh, okay,

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

2016-04-13 Thread Fujii Masao
On Thu, Apr 14, 2016 at 11:45 AM, Amit Kapila wrote: > On Wed, Apr 13, 2016 at 1:44 PM, Kyotaro HORIGUCHI > wrote: >> >> At Wed, 13 Apr 2016 04:43:35 +0900, Fujii Masao >> wrote in >>

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

2016-04-13 Thread Amit Kapila
On Wed, Apr 13, 2016 at 1:44 PM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > > At Wed, 13 Apr 2016 04:43:35 +0900, Fujii Masao wrote in > > >>> Thank you for reviewing. > > >>> > > >>>

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

2016-04-13 Thread Kyotaro HORIGUCHI
At Wed, 13 Apr 2016 04:43:35 +0900, Fujii Masao wrote in > >>> Thank you for reviewing. > >>> > >>> SyncRepUpdateConfig() seems to be no longer necessary. > >> > >> Really? I was thinking that something

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

2016-04-12 Thread Fujii Masao
On Tue, Apr 12, 2016 at 9:04 AM, Masahiko Sawada wrote: > On Mon, Apr 11, 2016 at 8:47 PM, Fujii Masao wrote: >> On Mon, Apr 11, 2016 at 5:52 PM, Masahiko Sawada >> wrote: >>> On Mon, Apr 11, 2016 at 1:31 PM, Fujii Masao

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

2016-04-11 Thread Masahiko Sawada
On Mon, Apr 11, 2016 at 8:47 PM, Fujii Masao wrote: > On Mon, Apr 11, 2016 at 5:52 PM, Masahiko Sawada > wrote: >> On Mon, Apr 11, 2016 at 1:31 PM, Fujii Masao wrote: >>> On Mon, Apr 11, 2016 at 10:58 AM, Masahiko Sawada

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

2016-04-11 Thread Fujii Masao
On Mon, Apr 11, 2016 at 5:52 PM, Masahiko Sawada wrote: > On Mon, Apr 11, 2016 at 1:31 PM, Fujii Masao wrote: >> On Mon, Apr 11, 2016 at 10:58 AM, Masahiko Sawada >> wrote: >>> On Sat, Apr 9, 2016 at 12:32 PM, Tom Lane

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

2016-04-11 Thread Masahiko Sawada
On Mon, Apr 11, 2016 at 1:31 PM, Fujii Masao wrote: > On Mon, Apr 11, 2016 at 10:58 AM, Masahiko Sawada > wrote: >> On Sat, Apr 9, 2016 at 12:32 PM, Tom Lane wrote: >>> Jeff Janes writes: When I

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

2016-04-11 Thread Fujii Masao
On Sat, Apr 9, 2016 at 12:32 PM, Tom Lane wrote: > Jeff Janes writes: >> When I compile now without cassert, I get the compiler warning: > >> syncrep.c: In function 'SyncRepUpdateConfig': >> syncrep.c:878:6: warning: variable 'parse_rc' set but not used

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

2016-04-10 Thread Fujii Masao
On Mon, Apr 11, 2016 at 10:58 AM, Masahiko Sawada wrote: > On Sat, Apr 9, 2016 at 12:32 PM, Tom Lane wrote: >> Jeff Janes writes: >>> When I compile now without cassert, I get the compiler warning: >> >>> syncrep.c: In function

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

2016-04-10 Thread Masahiko Sawada
On Sat, Apr 9, 2016 at 12:32 PM, Tom Lane wrote: > Jeff Janes writes: >> When I compile now without cassert, I get the compiler warning: > >> syncrep.c: In function 'SyncRepUpdateConfig': >> syncrep.c:878:6: warning: variable 'parse_rc' set but not used

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

2016-04-08 Thread Tom Lane
Jeff Janes writes: > When I compile now without cassert, I get the compiler warning: > syncrep.c: In function 'SyncRepUpdateConfig': > syncrep.c:878:6: warning: variable 'parse_rc' set but not used > [-Wunused-but-set-variable] If there's a good reason for that to be an

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

2016-04-08 Thread Jeff Janes
On Wed, Apr 6, 2016 at 1:23 AM, Fujii Masao wrote: > Okay, I pushed the patch! > Many thanks to all involved in the development of this feature! Thanks, a nice feature. When I compile now without cassert, I get the compiler warning: syncrep.c: In function

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

2016-04-08 Thread Amit Kapila
On Thu, Apr 7, 2016 at 5:49 PM, Fujii Masao wrote: > > On Thu, Apr 7, 2016 at 7:29 PM, Amit Kapila wrote: > > > > So if we go by this each time backend calls pg_stat_get_wal_senders, it > > needs to do parsing to form SyncRepConfig whether it's

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

2016-04-08 Thread Masahiko Sawada
On Fri, Apr 8, 2016 at 4:50 PM, Fujii Masao wrote: > On Fri, Apr 8, 2016 at 2:26 PM, Michael Paquier > wrote: >> On Thu, Apr 7, 2016 at 11:43 PM, Fujii Masao wrote: >>> On Wed, Apr 6, 2016 at 5:04 PM, Michael Paquier >>>

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

2016-04-08 Thread Fujii Masao
On Fri, Apr 8, 2016 at 2:26 PM, Michael Paquier wrote: > On Thu, Apr 7, 2016 at 11:43 PM, Fujii Masao wrote: >> On Wed, Apr 6, 2016 at 5:04 PM, Michael Paquier >> wrote: >>> On Wed, Apr 6, 2016 at 4:08 PM, Michael

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

2016-04-07 Thread Michael Paquier
On Thu, Apr 7, 2016 at 11:43 PM, Fujii Masao wrote: > On Wed, Apr 6, 2016 at 5:04 PM, Michael Paquier > wrote: >> On Wed, Apr 6, 2016 at 4:08 PM, Michael Paquier >> wrote: >>> Here are few things I have noticed: >>> +

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

2016-04-07 Thread Fujii Masao
On Fri, Apr 8, 2016 at 12:55 PM, Thomas Munro wrote: > On Wed, Apr 6, 2016 at 8:23 PM, Fujii Masao wrote: >> >> Okay, I pushed the patch! >> Many thanks to all involved in the development of this feature! > > > Hi, > > I spotted a couple of

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

2016-04-07 Thread Thomas Munro
On Wed, Apr 6, 2016 at 8:23 PM, Fujii Masao wrote: > > Okay, I pushed the patch! > Many thanks to all involved in the development of this feature! > Hi, I spotted a couple of places in the documentation that still implied there was only one synchronous standby. Please

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

2016-04-07 Thread Fujii Masao
On Wed, Apr 6, 2016 at 5:04 PM, Michael Paquier wrote: > On Wed, Apr 6, 2016 at 4:08 PM, Michael Paquier > wrote: >> Here are few things I have noticed: >> + for (i = 0; i < max_wal_senders; i++) >> + { >> + walsnd = >walsnds[i]; >>

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

2016-04-07 Thread Fujii Masao
On Thu, Apr 7, 2016 at 7:29 PM, Amit Kapila wrote: > On Thu, Apr 7, 2016 at 1:30 PM, Amit Langote > wrote: >> >> On 2016/04/07 15:26, Fujii Masao wrote: >> > On Thu, Apr 7, 2016 at 2:48 PM, Amit Kapila >> > wrote:

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

2016-04-07 Thread Amit Kapila
On Thu, Apr 7, 2016 at 1:30 PM, Amit Langote wrote: > > On 2016/04/07 15:26, Fujii Masao wrote: > > On Thu, Apr 7, 2016 at 2:48 PM, Amit Kapila wrote: > >> On Thu, Apr 7, 2016 at 10:02 AM, Fujii Masao wrote: > >>>

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

2016-04-07 Thread Amit Langote
On 2016/04/07 15:26, Fujii Masao wrote: > On Thu, Apr 7, 2016 at 2:48 PM, Amit Kapila wrote: >> On Thu, Apr 7, 2016 at 10:02 AM, Fujii Masao wrote: >>> Yes if the variable that we'd like to pass to a backend is BOOL, INT, >>> REAL, STRING or ENUM.

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

2016-04-07 Thread Amit Kapila
On Thu, Apr 7, 2016 at 11:56 AM, Fujii Masao wrote: > > On Thu, Apr 7, 2016 at 2:48 PM, Amit Kapila wrote: > > On Thu, Apr 7, 2016 at 10:02 AM, Fujii Masao wrote: > >> > >> On Thu, Apr 7, 2016 at 1:22 PM, Amit Kapila

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

2016-04-07 Thread Fujii Masao
On Thu, Apr 7, 2016 at 2:48 PM, Amit Kapila wrote: > On Thu, Apr 7, 2016 at 10:02 AM, Fujii Masao wrote: >> >> On Thu, Apr 7, 2016 at 1:22 PM, Amit Kapila >> wrote: >> > >> > But for that, I think we don't need to do

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

2016-04-06 Thread Amit Kapila
On Thu, Apr 7, 2016 at 10:02 AM, Fujii Masao wrote: > > On Thu, Apr 7, 2016 at 1:22 PM, Amit Kapila wrote: > > > > But for that, I think we don't need to do anything extra. I mean > > write_nondefault_variables() will automatically write the

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

2016-04-06 Thread Fujii Masao
On Thu, Apr 7, 2016 at 1:22 PM, Amit Kapila wrote: > On Wed, Apr 6, 2016 at 8:11 PM, Fujii Masao wrote: >> >> On Wed, Apr 6, 2016 at 11:14 PM, Amit Kapila >> wrote: >> > On Wed, Apr 6, 2016 at 7:03 PM, Fujii Masao

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

2016-04-06 Thread Amit Kapila
On Wed, Apr 6, 2016 at 8:11 PM, Fujii Masao wrote: > > On Wed, Apr 6, 2016 at 11:14 PM, Amit Kapila wrote: > > On Wed, Apr 6, 2016 at 7:03 PM, Fujii Masao wrote: > >> > >> On Wed, Apr 6, 2016 at 8:59 PM, Amit Kapila

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

2016-04-06 Thread Fujii Masao
On Wed, Apr 6, 2016 at 11:14 PM, Amit Kapila wrote: > On Wed, Apr 6, 2016 at 7:03 PM, Fujii Masao wrote: >> >> On Wed, Apr 6, 2016 at 8:59 PM, Amit Kapila >> wrote: >> > >> >> BTW, we can move SyncRepUpdateConfig() just

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

2016-04-06 Thread Amit Kapila
On Wed, Apr 6, 2016 at 7:03 PM, Fujii Masao wrote: > > On Wed, Apr 6, 2016 at 8:59 PM, Amit Kapila wrote: > > > >> BTW, we can move SyncRepUpdateConfig() just after ProcessConfigFile() > >> from pg_stat_get_wal_senders() and every backends always

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

2016-04-06 Thread Fujii Masao
On Wed, Apr 6, 2016 at 8:59 PM, Amit Kapila wrote: > On Wed, Apr 6, 2016 at 11:17 AM, Fujii Masao wrote: >> >> On Tue, Apr 5, 2016 at 11:40 PM, Amit Kapila >> wrote: >> >> >> >> > 2. >> >> > pg_stat_get_wal_senders() >> >>

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

2016-04-06 Thread Amit Kapila
On Wed, Apr 6, 2016 at 11:17 AM, Fujii Masao wrote: > > On Tue, Apr 5, 2016 at 11:40 PM, Amit Kapila wrote: > >> > >> > 2. > >> > pg_stat_get_wal_senders() > >> > { > >> > .. > >> > /* > >> > ! * Allocate and update the config data of synchronous

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

2016-04-06 Thread Simon Riggs
On 6 April 2016 at 09:23, Fujii Masao wrote: > Okay, I pushed the patch! > Many thanks to all involved in the development of this feature! > Very good. I think the description in the commit message that we don't support "quorum commit" is sufficient to cover my concerns

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

2016-04-06 Thread Michael Paquier
On Wed, Apr 6, 2016 at 5:23 PM, Fujii Masao wrote: > Okay, I pushed the patch! > Many thanks to all involved in the development of this feature! I think that I am crying... Really cool to see this milestone accomplished. -- Michael -- Sent via pgsql-hackers mailing

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

2016-04-06 Thread Fujii Masao
On Wed, Apr 6, 2016 at 5:07 PM, Fujii Masao wrote: > On Wed, Apr 6, 2016 at 4:08 PM, Michael Paquier > wrote: >> On Wed, Apr 6, 2016 at 3:29 PM, Fujii Masao wrote: >>> On Wed, Apr 6, 2016 at 2:18 PM, Kyotaro HORIGUCHI >>>

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

2016-04-06 Thread Kyotaro HORIGUCHI
Sorry, my code was wrong in the case that the total numer of synchronous standby exceeds required number and the wansender is at priority 1. Sorry for the noise. At Wed, 06 Apr 2016 17:01:51 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in

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

2016-04-06 Thread Fujii Masao
On Wed, Apr 6, 2016 at 5:01 PM, Kyotaro HORIGUCHI wrote: > At Wed, 6 Apr 2016 15:29:12 +0900, Fujii Masao wrote > in

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

2016-04-06 Thread Fujii Masao
On Wed, Apr 6, 2016 at 4:08 PM, Michael Paquier wrote: > On Wed, Apr 6, 2016 at 3:29 PM, Fujii Masao wrote: >> On Wed, Apr 6, 2016 at 2:18 PM, Kyotaro HORIGUCHI >> wrote: >>> At Tue, 5 Apr 2016 20:17:21 +0900,

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

2016-04-06 Thread Michael Paquier
On Wed, Apr 6, 2016 at 4:08 PM, Michael Paquier wrote: > Here are few things I have noticed: > + for (i = 0; i < max_wal_senders; i++) > + { > + walsnd = >walsnds[i]; > No volatile pointer to prevent code reordering? > > */ > typedef struct WalSnd > { > +

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

2016-04-06 Thread Kyotaro HORIGUCHI
At Wed, 6 Apr 2016 15:29:12 +0900, Fujii Masao wrote in

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

2016-04-06 Thread Michael Paquier
On Wed, Apr 6, 2016 at 3:29 PM, Fujii Masao wrote: > On Wed, Apr 6, 2016 at 2:18 PM, Kyotaro HORIGUCHI > wrote: >> At Tue, 5 Apr 2016 20:17:21 +0900, Fujii Masao wrote >> in

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

2016-04-06 Thread Fujii Masao
On Wed, Apr 6, 2016 at 2:51 PM, Masahiko Sawada wrote: > On Wed, Apr 6, 2016 at 2:21 PM, Fujii Masao wrote: >> On Tue, Apr 5, 2016 at 8:51 PM, Simon Riggs wrote: >>> On 5 April 2016 at 12:26, Fujii Masao

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

2016-04-06 Thread Fujii Masao
On Wed, Apr 6, 2016 at 2:18 PM, Kyotaro HORIGUCHI wrote: > At Tue, 5 Apr 2016 20:17:21 +0900, Fujii Masao wrote > in

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

2016-04-06 Thread Michael Paquier
On Wed, Apr 6, 2016 at 2:51 PM, Masahiko Sawada wrote: > On Wed, Apr 6, 2016 at 2:21 PM, Fujii Masao wrote: >> On Tue, Apr 5, 2016 at 8:51 PM, Simon Riggs wrote: >>> On 5 April 2016 at 12:26, Fujii Masao

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

2016-04-05 Thread Masahiko Sawada
On Wed, Apr 6, 2016 at 2:21 PM, Fujii Masao wrote: > On Tue, Apr 5, 2016 at 8:51 PM, Simon Riggs wrote: >> On 5 April 2016 at 12:26, Fujii Masao wrote: >> >>> >>> Multiple standbys with the same name may connect to the master.

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

2016-04-05 Thread Fujii Masao
On Tue, Apr 5, 2016 at 11:47 PM, Robert Haas wrote: > On Mon, Apr 4, 2016 at 4:28 AM, Fujii Masao wrote: + ereport(LOG, + (errmsg("standby \"%s\" is now the synchronous standby with priority %u", + application_name,

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

2016-04-05 Thread Fujii Masao
On Tue, Apr 5, 2016 at 11:40 PM, Amit Kapila wrote: > On Tue, Apr 5, 2016 at 3:15 PM, Fujii Masao wrote: >> >> On Tue, Apr 5, 2016 at 4:31 PM, Amit Kapila >> wrote: >> > On Mon, Apr 4, 2016 at 1:58 PM, Fujii Masao

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

2016-04-05 Thread Fujii Masao
On Tue, Apr 5, 2016 at 8:51 PM, Simon Riggs wrote: > On 5 April 2016 at 12:26, Fujii Masao wrote: > >> >> Multiple standbys with the same name may connect to the master. >> In this case, users might want to specifiy k<=N. So k<=N seems not invalid >>

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

2016-04-05 Thread Kyotaro HORIGUCHI
At Tue, 5 Apr 2016 20:17:21 +0900, Fujii Masao wrote in

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

2016-04-05 Thread Masahiko Sawada
On Tue, Apr 5, 2016 at 7:23 PM, Kyotaro HORIGUCHI wrote: > At Mon, 4 Apr 2016 22:00:24 +0900, Masahiko Sawada > wrote in >> > For this case, the tree members of

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

2016-04-05 Thread Robert Haas
On Mon, Apr 4, 2016 at 4:28 AM, Fujii Masao wrote: >>> + ereport(LOG, >>> + (errmsg("standby \"%s\" is now the synchronous standby with priority %u", >>> + application_name, MyWalSnd->sync_standby_priority))); >>> >>> s/ the / a / > > I have no objection to this change

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

2016-04-05 Thread Amit Kapila
On Tue, Apr 5, 2016 at 3:15 PM, Fujii Masao wrote: > > On Tue, Apr 5, 2016 at 4:31 PM, Amit Kapila wrote: > > On Mon, Apr 4, 2016 at 1:58 PM, Fujii Masao wrote: > >> > >> > >> Thanks for updating the patch! > >> > >> I

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

2016-04-05 Thread Simon Riggs
On 5 April 2016 at 12:26, Fujii Masao wrote: > Multiple standbys with the same name may connect to the master. > In this case, users might want to specifiy k<=N. So k<=N seems not invalid > setting. Confusing as that is, it is already the case; k > N could make sense.

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

2016-04-05 Thread Fujii Masao
On Tue, Apr 5, 2016 at 8:08 PM, Simon Riggs wrote: > On 5 April 2016 at 11:18, Fujii Masao wrote: > >> >> > 1. Header comments in syncrep.c need changes, not just additions. >> >> Okay, will consider this later. And I'd appreciate if you elaborate

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

2016-04-05 Thread Simon Riggs
On 5 April 2016 at 11:23, Fujii Masao wrote: > On Tue, Apr 5, 2016 at 6:09 PM, Simon Riggs wrote: > > On 5 April 2016 at 08:58, Amit Langote > > wrote: > > > >> > >> So I am suggesting we put an extra keyword in

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

2016-04-05 Thread Fujii Masao
On Tue, Apr 5, 2016 at 7:17 PM, Kyotaro HORIGUCHI wrote: > At Tue, 5 Apr 2016 18:08:20 +0900, Fujii Masao wrote > in >> On Mon, Apr 4, 2016 at 10:00 PM, Masahiko Sawada

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

2016-04-05 Thread Simon Riggs
On 5 April 2016 at 11:18, Fujii Masao wrote: > > 1. Header comments in syncrep.c need changes, not just additions. > > Okay, will consider this later. And I'd appreciate if you elaborate what > changes are necessary specifically. Some of the old header comments are now

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

2016-04-05 Thread Fujii Masao
On Tue, Apr 5, 2016 at 6:09 PM, Simon Riggs wrote: > On 5 April 2016 at 08:58, Amit Langote > wrote: > >> >> So I am suggesting we put an extra keyword in front of the “k”, to >> > explain how the k responses should be gathered as an

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

2016-04-05 Thread Kyotaro HORIGUCHI
At Mon, 4 Apr 2016 22:00:24 +0900, Masahiko Sawada wrote in > > For this case, the tree members of SyncRepConfig are '2[Sby1,', > > 'Sby2', "Sby3]'. This syntax is valid for the current > > specification

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

2016-04-05 Thread Fujii Masao
On Tue, Apr 5, 2016 at 4:35 PM, Simon Riggs wrote: > On 4 April 2016 at 10:35, Simon Riggs wrote: >> >> On 4 April 2016 at 09:28, Fujii Masao wrote: >> >>> >>> Barring any objections, I'll commit this patch. >> >> >> That

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

2016-04-05 Thread Kyotaro HORIGUCHI
At Tue, 5 Apr 2016 18:08:20 +0900, Fujii Masao wrote in > On Mon, Apr 4, 2016 at 10:00 PM, Masahiko Sawada > wrote: > > On Mon, Apr 4, 2016 at 6:03 PM, Kyotaro HORIGUCHI > >

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

2016-04-05 Thread Fujii Masao
On Tue, Apr 5, 2016 at 4:31 PM, Amit Kapila wrote: > On Mon, Apr 4, 2016 at 1:58 PM, Fujii Masao wrote: >> >> >> Thanks for updating the patch! >> >> I applied the following changes to the patch. >> Attached is the revised version of the patch. >>

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

2016-04-05 Thread Andres Freund
On 2016-04-05 10:13:50 +0100, Simon Riggs wrote: > The lack of per-database settings is not a blocker for me. Just to clarify: Neither is it for me. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

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

2016-04-05 Thread Simon Riggs
On 5 April 2016 at 10:10, Fujii Masao wrote: > On Mon, Apr 4, 2016 at 6:45 PM, Andres Freund wrote: > > On 2016-04-04 10:35:34 +0100, Simon Riggs wrote: > >> On 4 April 2016 at 09:28, Fujii Masao wrote: > >> > Barring any

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

2016-04-05 Thread Fujii Masao
On Mon, Apr 4, 2016 at 6:45 PM, Andres Freund wrote: > On 2016-04-04 10:35:34 +0100, Simon Riggs wrote: >> On 4 April 2016 at 09:28, Fujii Masao wrote: >> > Barring any objections, I'll commit this patch. > > No objection here either, just one question:

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

2016-04-05 Thread Simon Riggs
On 5 April 2016 at 08:58, Amit Langote wrote: > So I am suggesting we put an extra keyword in front of the “k”, to > > explain how the k responses should be gathered as an extension to the the > > syntax. I also think implementing “any k” is actually fairly

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

2016-04-05 Thread Fujii Masao
On Mon, Apr 4, 2016 at 10:00 PM, Masahiko Sawada wrote: > On Mon, Apr 4, 2016 at 6:03 PM, Kyotaro HORIGUCHI > wrote: >> Hello, thank you for testing. >> >> At Sat, 2 Apr 2016 14:20:55 +1300, Thomas Munro >>

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

2016-04-05 Thread Fujii Masao
On Mon, Apr 4, 2016 at 5:59 PM, Abhijit Menon-Sen wrote: > At 2016-04-04 17:28:07 +0900, masao.fu...@gmail.com wrote: >> >> Barring any objections, I'll commit this patch. > > No objections, just a minor wording tweak: > > doc/src/sgml/config.sgml: > > "The synchronous

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

2016-04-05 Thread Amit Langote
On 2016/04/05 16:35, Simon Riggs wrote: > 6. Meaning of k (n1, n2, n3) with N servers > > It's clearly documented that this means k replies IN SEQUENCE. I believe > the typical meaning of would be “any k out of N”, which would be faster > than what we have, e.g. >3 (n1, n2, n3) would release

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

2016-04-05 Thread Simon Riggs
On 4 April 2016 at 10:35, Simon Riggs wrote: > On 4 April 2016 at 09:28, Fujii Masao wrote: > > >> Barring any objections, I'll commit this patch. >> > > That sounds good. > > May I have one more day to review this? Actually more like 3-4 hours. >

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

2016-04-05 Thread Amit Kapila
On Mon, Apr 4, 2016 at 1:58 PM, Fujii Masao wrote: > > > Thanks for updating the patch! > > I applied the following changes to the patch. > Attached is the revised version of the patch. > 1. { {"synchronous_standby_names", PGC_SIGHUP, REPLICATION_MASTER,

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

2016-04-04 Thread Simon Riggs
On 4 April 2016 at 10:45, Andres Freund wrote: > > Simon, perhaps you could hold the above question in your mind while > looking through this? > Sure, np. -- Simon Riggshttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7

  1   2   3   4   >