Re: Connection slots reserved for replication

2019-02-12 Thread Oleksii Kliukin
> On 12. Feb 2019, at 05:12, Michael Paquier wrote: > > On Mon, Feb 11, 2019 at 08:57:41PM -0700, Kevin Hale Boyes wrote: >> I think there's a small problem with the commit. >> The position of xlrec.max_wal_senders (line 117) should be below >> max_worker_processes. > > Fixed, thanks!

Re: Connection slots reserved for replication

2019-02-11 Thread Michael Paquier
On Mon, Feb 11, 2019 at 08:57:41PM -0700, Kevin Hale Boyes wrote: > I think there's a small problem with the commit. > The position of xlrec.max_wal_senders (line 117) should be below > max_worker_processes. Fixed, thanks! -- Michael signature.asc Description: PGP signature

Re: Connection slots reserved for replication

2019-02-11 Thread Kevin Hale Boyes
On Mon, 11 Feb 2019 at 18:39, Michael Paquier wrote: > And done. Michael, I think there's a small problem with the commit. The position of xlrec.max_wal_senders (line 117) should be below max_worker_processes. 112

Re: Connection slots reserved for replication

2019-02-11 Thread Michael Paquier
On Fri, Feb 08, 2019 at 09:37:40AM +0900, Michael Paquier wrote: > Thanks for the confirmation. I am not planning to finish wrapping > this one today anyway, and next week should be fine. And done. I have done an extra pass on it, reordering a bit parameters and comments, and removed the extra

Re: Connection slots reserved for replication

2019-02-07 Thread Michael Paquier
On Thu, Feb 07, 2019 at 04:16:22PM +0100, Oleksii Kliukin wrote: > On 7. Feb 2019, at 07:51, Michael Paquier wrote: > I’ve noticed you returned the 'see max_connections’ parameter there. As > noticed > previously in this thread by Kyotaro Horiguchi, it’s not clear what exactly we > are supposed

Re: Connection slots reserved for replication

2019-02-07 Thread Oleksii Kliukin
> On 7. Feb 2019, at 07:51, Michael Paquier wrote: > > On Sat, Feb 02, 2019 at 10:35:20AM +0900, Michael Paquier wrote: >> Oh, I have just noticed this patch when doing my vacuum homework. I >> have just added my name as committer, just wait a bit until the CF is >> closed before I begin

Re: Connection slots reserved for replication

2019-02-07 Thread Kyotaro HORIGUCHI
Hello. At Thu, 7 Feb 2019 15:51:46 +0900, Michael Paquier wrote in <20190207065146.gn4...@paquier.xyz> > On Sat, Feb 02, 2019 at 10:35:20AM +0900, Michael Paquier wrote: > > Oh, I have just noticed this patch when doing my vacuum homework. I > > have just added my name as committer, just wait

Re: Connection slots reserved for replication

2019-02-06 Thread Michael Paquier
On Sat, Feb 02, 2019 at 10:35:20AM +0900, Michael Paquier wrote: > Oh, I have just noticed this patch when doing my vacuum homework. I > have just added my name as committer, just wait a bit until the CF is > closed before I begin looking at it.. So, I have looked at this thread and the latest

Re: Connection slots reserved for replication

2019-02-01 Thread Michael Paquier
On Thu, Jan 31, 2019 at 12:08:18PM +0100, Oleksii Kliukin wrote: > Thanks, set it to RFC. Oh, I have just noticed this patch when doing my vacuum homework. I have just added my name as committer, just wait a bit until the CF is closed before I begin looking at it.. -- Michael signature.asc

Re: Connection slots reserved for replication

2019-01-31 Thread Oleksii Kliukin
> On 31. Jan 2019, at 11:50, Petr Jelinek wrote: > > On 31/01/2019 11:25, Oleksii Kliukin wrote: >> >> >>> On 25. Jan 2019, at 18:37, Oleksii Kliukin >> > wrote: >>> >>> Hello, >>> On 24. Jan 2019, at 13:47, Kyotaro HORIGUCHI >>>

Re: Connection slots reserved for replication

2019-01-31 Thread Petr Jelinek
On 31/01/2019 11:25, Oleksii Kliukin wrote: > > >> On 25. Jan 2019, at 18:37, Oleksii Kliukin > > wrote: >> >> Hello, >> >>> On 24. Jan 2019, at 13:47, Kyotaro HORIGUCHI >>> >> > wrote: >> >> Thank you for the review.I took a

Re: Connection slots reserved for replication

2019-01-31 Thread Oleksii Kliukin
> On 25. Jan 2019, at 18:37, Oleksii Kliukin wrote: > > Hello, > >> On 24. Jan 2019, at 13:47, Kyotaro HORIGUCHI >> mailto:horiguchi.kyot...@lab.ntt.co.jp>> >> wrote: > > Thank you for the review.I took a liberty to address it with v9. So, given there are no further feedback or

Re: Connection slots reserved for replication

2019-01-25 Thread Oleksii Kliukin
Hello, > On 24. Jan 2019, at 13:47, Kyotaro HORIGUCHI > wrote: Thank you for the review.I took a liberty to address it with v9. > > Documentation looks fine for me. By the way, a comment for the > caller-site of CheckRequreParameterValues() in xlog.c looks > somewhat stale. > >> /* Check to

Re: Connection slots reserved for replication

2019-01-24 Thread Kyotaro HORIGUCHI
Hello. Documentation looks fine for me. By the way, a comment for the caller-site of CheckRequreParameterValues() in xlog.c looks somewhat stale. > /* Check to see if any changes to max_connections give problems */ > CheckRequiredParameterValues(); may be better something like this?: > /*

Re: Connection slots reserved for replication

2019-01-15 Thread Robert Haas
On Wed, Jan 2, 2019 at 6:36 AM Alexander Kukushkin wrote: > I was also thinking about changing the value in PG_CONTROL_VERSION, > because we added the new field into the control file, but decided to > leave this change to committer. We typically omit catversion bumps from submitted patches to

Re: Connection slots reserved for replication

2019-01-15 Thread Oleksii Kliukin
On Wed, Jan 2, 2019, at 12:36, Alexander Kukushkin wrote: > Hi, > > On Wed, 2 Jan 2019 at 12:17, Oleksii Kliukin wrote: > > > Thank you. Attached the new version(called it v8) with the following > > changes to the documentation: > > Thank you for jumping on it. Your changes look good to me. >

Re: Connection slots reserved for replication

2019-01-02 Thread Alexander Kukushkin
Hi, On Wed, 2 Jan 2019 at 12:17, Oleksii Kliukin wrote: > Thank you. Attached the new version(called it v8) with the following changes > to the documentation: Thank you for jumping on it. Your changes look good to me. I was also thinking about changing the value in PG_CONTROL_VERSION,

Re: Connection slots reserved for replication

2019-01-02 Thread Oleksii Kliukin
On Wed, Jan 2, 2019, at 11:02, Petr Jelinek wrote: > The patch generally looks good, but the documentation of max_wal_senders > needs updating. In config.sgml we say: > > > WAL sender processes count towards the total number > > of connections, so this parameter's value must be less than > >

Re: Connection slots reserved for replication

2019-01-02 Thread Petr Jelinek
Hi, On 02/01/2019 10:21, Oleksii Kliukin wrote: > On Mon, Dec 17, 2018, at 14:10, Alexander Kukushkin wrote: >> Hi, >> >> On Thu, 6 Dec 2018 at 00:55, Petr Jelinek >> wrote: Does excluding WAL senders from the max_connections limit and including max_wal_senders in MaxBackends also

Re: Connection slots reserved for replication

2019-01-02 Thread Oleksii Kliukin
On Mon, Dec 17, 2018, at 14:10, Alexander Kukushkin wrote: > Hi, > > On Thu, 6 Dec 2018 at 00:55, Petr Jelinek > wrote: > > > Does excluding WAL senders from the max_connections limit and including > > > max_wal_senders in MaxBackends also imply that we need to add > > > max_wal_senders to

Re: Connection slots reserved for replication

2018-12-17 Thread Alexander Kukushkin
Hi, On Thu, 6 Dec 2018 at 00:55, Petr Jelinek wrote: > > Does excluding WAL senders from the max_connections limit and including > > max_wal_senders in MaxBackends also imply that we need to add > > max_wal_senders to the list at xlog.c: CheckRequiredParameterValues, > > requiring its value

Re: Connection slots reserved for replication

2018-12-05 Thread Petr Jelinek
On 05/12/2018 15:33, Oleksii Kliukin wrote: > >> On 30. Nov 2018, at 13:58, Alexander Kukushkin wrote: >> >> attaching the new version of the patch. >> Now it simply reserves max_wal_senders slots in the ProcGlobal, what >> guarantees that only walsender process could use them. > > With this

Re: Connection slots reserved for replication

2018-12-05 Thread Oleksii Kliukin
> On 30. Nov 2018, at 13:58, Alexander Kukushkin wrote: > > attaching the new version of the patch. > Now it simply reserves max_wal_senders slots in the ProcGlobal, what > guarantees that only walsender process could use them. With this patch It looks like InitProcess will trigger the

Re: Connection slots reserved for replication

2018-11-30 Thread Alexander Kukushkin
Hi, attaching the new version of the patch. Now it simply reserves max_wal_senders slots in the ProcGlobal, what guarantees that only walsender process could use them. Regards, -- Alexander Kukushkin diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index

Re: Connection slots reserved for replication

2018-11-20 Thread Stephen Frost
Greetings, * Magnus Hagander (mag...@hagander.net) wrote: > On Fri, Nov 9, 2018 at 2:02 AM Masahiko Sawada > wrote: > > On the other hand, If we always reserve max_wal_senders slots > > available slots for normal backend will get decreased in the next > > release, which require for users to

Re: Connection slots reserved for replication

2018-11-20 Thread Magnus Hagander
On Fri, Nov 9, 2018 at 2:02 AM Masahiko Sawada wrote: > On Thu, Nov 8, 2018 at 9:30 PM Kyotaro HORIGUCHI > wrote: > > > > Hello. > > > > At Wed, 7 Nov 2018 19:31:00 +0900, Masahiko Sawada < > sawada.m...@gmail.com> wrote in evkgm-56...@mail.gmail.com> > > > On Tue, Nov 6, 2018 at 9:16 PM

Re: Connection slots reserved for replication

2018-11-08 Thread Masahiko Sawada
On Thu, Nov 8, 2018 at 9:30 PM Kyotaro HORIGUCHI wrote: > > Hello. > > At Wed, 7 Nov 2018 19:31:00 +0900, Masahiko Sawada > wrote in > > On Tue, Nov 6, 2018 at 9:16 PM Kyotaro HORIGUCHI > > wrote: > > > InitializeMaxBackends() > > > MaxBackends = MaxConnections +

Re: Connection slots reserved for replication

2018-11-08 Thread Kyotaro HORIGUCHI
Hello. At Wed, 7 Nov 2018 19:31:00 +0900, Masahiko Sawada wrote in > On Tue, Nov 6, 2018 at 9:16 PM Kyotaro HORIGUCHI > wrote: > > InitializeMaxBackends() > > MaxBackends = MaxConnections + autovacuum_max_workers + 1 + > > - max_worker_processes; > > +

Re: Connection slots reserved for replication

2018-11-07 Thread Masahiko Sawada
On Tue, Nov 6, 2018 at 9:16 PM Kyotaro HORIGUCHI wrote: > > Hello. Thank you for the new version. > > At Thu, 1 Nov 2018 11:58:52 +0100, Alexander Kukushkin > wrote in > > Hi, > > > > Attached rebased version patch to the current HEAD and created commit fest > > entry > > On Fri, 21 Sep 2018

Re: Connection slots reserved for replication

2018-11-06 Thread Kyotaro HORIGUCHI
Hello. Thank you for the new version. At Thu, 1 Nov 2018 11:58:52 +0100, Alexander Kukushkin wrote in > Hi, > > Attached rebased version patch to the current HEAD and created commit fest > entry > On Fri, 21 Sep 2018 at 13:43, Alexander Kukushkin wrote: > > > > Hi, > > > > On 20 September

Re: Connection slots reserved for replication

2018-11-01 Thread Alexander Kukushkin
Hi, Attached rebased version patch to the current HEAD and created commit fest entry On Fri, 21 Sep 2018 at 13:43, Alexander Kukushkin wrote: > > Hi, > > On 20 September 2018 at 08:18, Kyotaro HORIGUCHI > wrote: > > > > > Instaed, we can iterally "reserve" connection slots for the > > specific

Re: Connection slots reserved for replication

2018-09-21 Thread Alexander Kukushkin
Hi, On 20 September 2018 at 08:18, Kyotaro HORIGUCHI wrote: > > Instaed, we can iterally "reserve" connection slots for the > specific use by providing ProcGlobal->walsenderFreeProcs. The > slots are never stolen for other usage. Allowing additional > walsenders comes after all the slots are

Re: Connection slots reserved for replication

2018-09-20 Thread Kyotaro HORIGUCHI
Hello. I agree to the objective. At Mon, 17 Sep 2018 14:25:56 +0200, Alexander Kukushkin wrote in > Hi, > > 2018-09-14 12:23 GMT+02:00 Masahiko Sawada : > > >> 2. If we know that this is neither superuser nor replication connection, we > >> should check that there are at least

Re: Connection slots reserved for replication

2018-09-17 Thread Alexander Kukushkin
Hi, 2018-09-14 12:23 GMT+02:00 Masahiko Sawada : >> 2. If we know that this is neither superuser nor replication connection, we >> should check that there are at least (superuser_reserved_connections + >> NumWalSenders() - max_wal_senders) connection slots are available. > > You wanted to mean

Re: Connection slots reserved for replication

2018-09-14 Thread Masahiko Sawada
On Wed, Aug 1, 2018 at 9:30 PM, Alexander Kukushkin wrote: > Hello hackers, > > at the moment it is possible to reserve some amount of connection slots for > superusers and this behavior is controlled by superuser_reserved_connections > configuration parameter with the default value = 3. > > In