pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: Max connections
22+ messages / 17 participants
[nested] [flat]

* Max connections
@ 2001-01-05 20:05 eriko <eriko@radix.com.br>
  2001-01-05 15:30 ` Re: Max connections nfj@radix.com
  2001-01-05 15:33 ` Re: Max connections nelson@radix.com.br
  0 siblings, 2 replies; 22+ messages in thread

From: eriko @ 2001-01-05 20:05 UTC (permalink / raw)
  To: ; +Cc: pgsql-general

What the max number of connections in postgresql database?

Thanks

Eriko.




^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: Max connections
  2001-01-05 20:05 Max connections eriko <eriko@radix.com.br>
@ 2001-01-05 15:30 ` nfj@radix.com
  1 sibling, 0 replies; 22+ messages in thread

From: nfj@radix.com @ 2001-01-05 15:30 UTC (permalink / raw)
  To: eriko <eriko@radix.com.br>; +Cc: pgsql-general

    You can set the max number of backends with the parameter '-N nprocs' when 
you start postmaster. So 'postmaster -N 64' will let you make 64 simultaneous 
connections. 
    The default seting is 32 backends.


                                            Nelson


Quoting eriko <eriko@radix.com.br>:

> What the max number of connections in postgresql database?
> 
> Thanks
> 
> Eriko.
> 
> 




^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: Max connections
  2001-01-05 20:05 Max connections eriko <eriko@radix.com.br>
@ 2001-01-05 15:33 ` nelson@radix.com.br
  1 sibling, 0 replies; 22+ messages in thread

From: nelson@radix.com.br @ 2001-01-05 15:33 UTC (permalink / raw)
  To: eriko <eriko@radix.com.br>; +Cc: pgsql-general

 
    You can set the max number of backends with the parameter '-N nprocs' when 
you start postmaster. So 'postmaster -N 64' will let you make 64 simultaneous 
connections. 
    The default seting is 32 backends.


                                            Nelson

 

Quoting eriko <eriko@radix.com.br>:

> What the max number of connections in postgresql database?
> 
> Thanks
> 
> Eriko.
> 
> 




^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Max connections
@ 2002-11-12 19:30 Williams, Travis L, NPONS <tlw@att.com>
  2002-11-12 20:23 ` Re: Max connections Robert Treat <xzilla@users.sourceforge.net>
  2002-11-13 10:47 ` Re: Max connections Richard Huxton <dev@archonet.com>
  0 siblings, 2 replies; 22+ messages in thread

From: Williams, Travis L, NPONS @ 2002-11-12 19:30 UTC (permalink / raw)
  To: pgsql-general

To change the max connections I'm assuming I need to edit the postgresql.conf file and change this line:
#max_connections = 32
to something like
max_connections = 64

I do need to uncomment this correct?  Is there anything else I need to change?

Travis



^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: Max connections
  2002-11-12 19:30 Max connections Williams, Travis L, NPONS <tlw@att.com>
@ 2002-11-12 20:23 ` Robert Treat <xzilla@users.sourceforge.net>
  1 sibling, 0 replies; 22+ messages in thread

From: Robert Treat @ 2002-11-12 20:23 UTC (permalink / raw)
  To: "Williams, Travis L, " NPONS <tlw@att.com>; +Cc: pgsql-general

On Tue, 2002-11-12 at 14:30, Williams, Travis L, NPONS wrote:
> To change the max connections I'm assuming I need to edit the postgresql.conf file and change this line:
> #max_connections = 32
> to something like
> max_connections = 64
> 
> I do need to uncomment this correct?  Is there anything else I need to change?
> 

That should do it, though you'll need to restart your postmaster for the
changes to take effect.

Robert Treat





^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: Max connections
  2002-11-12 19:30 Max connections Williams, Travis L, NPONS <tlw@att.com>
@ 2002-11-13 10:47 ` Richard Huxton <dev@archonet.com>
  1 sibling, 0 replies; 22+ messages in thread

From: Richard Huxton @ 2002-11-13 10:47 UTC (permalink / raw)
  To: Williams, Travis L, NPONS <tlw@att.com>; pgsql-general

On Tuesday 12 Nov 2002 7:30 pm, Williams, Travis L, NPONS wrote:
> To change the max connections I'm assuming I need to edit the
> postgresql.conf file and change this line: #max_connections = 32
> to something like
> max_connections = 64
>
> I do need to uncomment this correct?  Is there anything else I need to
> change?

Travis - haven't seen anyone else reply, but basically "yes". While you're at 
it you may want to look at some of the memory settings - more connections 
means less RAM per connection.

You'll need to tell postgresql to reload the config file - "man pg_ctl" for 
details.

-- 
  Richard Huxton



^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* max connections
@ 2003-02-20 15:17 Jose Antonio Martinez <lfbbes@yahoo.es>
  2003-02-20 17:31 ` Re: max connections Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>
  0 siblings, 1 reply; 22+ messages in thread

From: Jose Antonio Martinez @ 2003-02-20 15:17 UTC (permalink / raw)
  To: pgsql-general

how can i limit the number of concurrent connections
to the same database at a postgresql server  (wich
have several databases)?

is there any easy way? 

___________________________________________________
Yahoo! Móviles
Personaliza tu móvil con tu logo y melodía favorito 
en http://moviles.yahoo.es



^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: max connections
  2003-02-20 15:17 max connections Jose Antonio Martinez <lfbbes@yahoo.es>
@ 2003-02-20 17:31 ` Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>
  2003-02-20 18:14   ` Re: max connections Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>
  2003-02-21 10:50   ` Re: max connections Richard Huxton <dev@archonet.com>
  0 siblings, 2 replies; 22+ messages in thread

From: Thomas Beutin @ 2003-02-20 17:31 UTC (permalink / raw)
  To: Jose Antonio Martinez <lfbbes@yahoo.es>; +Cc: pgsql-general

On Thu, Feb 20, 2003 at 04:17:33PM +0100, Jose Antonio Martinez wrote:
> how can i limit the number of concurrent connections
> to the same database at a postgresql server  (wich
> have several databases)?
> 
> is there any easy way? 
command line: "-N x"
config file: "max_connections = x"

It's all explained in the very good documentation.

So long,
-tb
-- 
Thomas Beutin                             tb@laokoon.IN-Berlin.DE
Beam me up, Scotty. There is no intelligent live down in Redmond.



^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: max connections
  2003-02-20 15:17 max connections Jose Antonio Martinez <lfbbes@yahoo.es>
  2003-02-20 17:31 ` Re: max connections Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>
@ 2003-02-20 18:14   ` Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>
  1 sibling, 0 replies; 22+ messages in thread

From: Thomas Beutin @ 2003-02-20 18:14 UTC (permalink / raw)
  To: Jose Antonio Martinez <lfbbes@yahoo.es>; +Cc: pgsql-general

On Thu, Feb 20, 2003 at 06:56:52PM +0100, Jose Antonio Martinez wrote:
> yes, i know that max_connections limit the number of
> connections to the postgresql server, but it is a
> global limit for all the databases which are in the
> server. I am looking for a way of configuring
> postgresql for limiting connections per database at a
> shared database server enviroment. In mysql it is easy
> becouse there are a parameter for it. 
Oops... sorry. I think there is no way. Maybe Your connection
pool can do this?

So long,
-tb

>  --- Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>
> escribió: > On Thu, Feb 20, 2003 at 04:17:33PM +0100,
> Jose
> > Antonio Martinez wrote:
> > > how can i limit the number of concurrent
> > connections
> > > to the same database at a postgresql server  (wich
> > > have several databases)?
> > > 
> > > is there any easy way? 
> > command line: "-N x"
> > config file: "max_connections = x"
> > 
> > It's all explained in the very good documentation.
> > 
> > So long,
> > -tb
-- 
Thomas Beutin                             tb@laokoon.IN-Berlin.DE
Beam me up, Scotty. There is no intelligent live down in Redmond.



^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: max connections
  2003-02-20 15:17 max connections Jose Antonio Martinez <lfbbes@yahoo.es>
  2003-02-20 17:31 ` Re: max connections Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>
@ 2003-02-21 10:50   ` Richard Huxton <dev@archonet.com>
  1 sibling, 0 replies; 22+ messages in thread

From: Richard Huxton @ 2003-02-21 10:50 UTC (permalink / raw)
  To: Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>; Jose Antonio Martinez <lfbbes@yahoo.es>; +Cc: pgsql-general

On Thursday 20 Feb 2003 5:31 pm, Thomas Beutin wrote:
> On Thu, Feb 20, 2003 at 04:17:33PM +0100, Jose Antonio Martinez wrote:
> > how can i limit the number of concurrent connections
> > to the same database at a postgresql server  (wich
> > have several databases)?
> >
> > is there any easy way?
>
> command line: "-N x"
> config file: "max_connections = x"
>
> It's all explained in the very good documentation.

I think Jose wanted to restrict access such as:

# this exists
max_connections = 32
# these don't
max_connections.db1 = 20
max_connections.db2 = 15

which I don't think you can do at the database level - it'll have to be 
something you do at the application level I believe.

-- 
  Richard Huxton



^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: max connections
@ 2003-02-20 18:05 Williams, Travis L, NPONS <tlw@att.com>
  0 siblings, 0 replies; 22+ messages in thread

From: Williams, Travis L, NPONS @ 2003-02-20 18:05 UTC (permalink / raw)
  To: Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>; Jose Antonio Martinez <lfbbes@yahoo.es>; +Cc: pgsql-general

Is that per DB though?  I thought that was the max connections period..

Travis

-----Original Message-----
From: Thomas Beutin [mailto:tyrone@laokoon.IN-Berlin.DE]
Sent: Thursday, February 20, 2003 11:31 AM
To: Jose Antonio Martinez
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] max connections


On Thu, Feb 20, 2003 at 04:17:33PM +0100, Jose Antonio Martinez wrote:
> how can i limit the number of concurrent connections
> to the same database at a postgresql server  (wich
> have several databases)?
> 
> is there any easy way? 
command line: "-N x"
config file: "max_connections = x"

It's all explained in the very good documentation.

So long,
-tb
-- 
Thomas Beutin                             tb@laokoon.IN-Berlin.DE
Beam me up, Scotty. There is no intelligent live down in Redmond.

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)



^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* max_connections
@ 2005-08-29 17:59 John D. Burger <john@mitre.org>
  2005-08-29 19:00 ` Re: max_connections Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 22+ messages in thread

From: John D. Burger @ 2005-08-29 17:59 UTC (permalink / raw)
  To: pgsql-general

I've recently succeeded in lobbying my sysadmins to upgrade from 7.2.0 
to 7.4.8 (thanks to everyone for the advice on how to leverage this).  
I'm now fiddling with some of the performance parameters, and I'm 
wondering about max_connections.  The default appears to be 100 - this 
is at least an order of magnitude higher than I need.  Would much be 
saved by dropping this down to 10 or less?  I gather I could dial 
shared_buffers up slightly (SHMMAX is 32M on our Solaris boxes), but is 
there any substantive benefit to conservatively setting 
max_connections?

Thanks.

- John D. Burger
   MITRE





^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: max_connections
  2005-08-29 17:59 max_connections John D. Burger <john@mitre.org>
@ 2005-08-29 19:00 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 22+ messages in thread

From: Tom Lane @ 2005-08-29 19:00 UTC (permalink / raw)
  To: John D. Burger <john@mitre.org>; +Cc: pgsql-general

"John D. Burger" <john@mitre.org> writes:
> I'm now fiddling with some of the performance parameters, and I'm 
> wondering about max_connections.  The default appears to be 100 - this 
> is at least an order of magnitude higher than I need.  Would much be 
> saved by dropping this down to 10 or less?

Nothing at all, really, AFAIK; just a little bit of shared memory.

On certain platforms (OS X at least) there is a penalty to oversized
max_connections because each per-backend-slot semaphore is an open file
that has to be passed down when a new backend process is forked.  But
this is not true on Solaris.  I doubt you'd see any difference.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* MAX_CONNECTIONS ??
@ 2008-11-12 16:05 paulo matadr <saddoness@yahoo.com.br>
  2008-11-12 17:41 ` Re: [GENERAL] MAX_CONNECTIONS ?? Richard Huxton <dev@archonet.com>
  0 siblings, 1 reply; 22+ messages in thread

From: paulo matadr @ 2008-11-12 16:05 UTC (permalink / raw)
  To: pgsql-general; admin <pgsql-admin@postgresql.org>

I need help to alter max_connections em my database, this parameter stay in defalt  MAX_CONNECTIONS=100
I want to change for MAX_CONNECTIONS=300.
about parameters below, need to change anything?

1 -sysctl.conf

kernel.shmmax = 68719476736
kernel.shmall = 4294967296
# - Memory -

2-Postgresql.conf
shared_buffers = 2048MB                                          
temp_buffers = 12MB                                                    
work_mem = 12MB                     
maintenance_work_mem = 128MB                          
max_fsm_pages =   4000000                               
max_fsm_relations = 5000            
                                  
Thanks for help



      Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.
http://br.new.mail.yahoo.com/addresses

^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: [GENERAL] MAX_CONNECTIONS ??
  2008-11-12 16:05 MAX_CONNECTIONS ?? paulo matadr <saddoness@yahoo.com.br>
@ 2008-11-12 17:41 ` Richard Huxton <dev@archonet.com>
  0 siblings, 0 replies; 22+ messages in thread

From: Richard Huxton @ 2008-11-12 17:41 UTC (permalink / raw)
  To: paulo matadr <saddoness@yahoo.com.br>; +Cc: pgsql-general; admin <pgsql-admin@postgresql.org>

paulo matadr wrote:
> I need help to alter max_connections em my database, this parameter
> stay in defalt MAX_CONNECTIONS=100
> I want to change for MAX_CONNECTIONS=300. about parameters below,
> need to change anything?
> 
> 1 -sysctl.conf
> 
> kernel.shmmax = 68719476736
> kernel.shmall = 4294967296

Does your shmmax have one digit too many? 68GB?

> # - Memory -
> 
> 2-Postgresql.conf
> shared_buffers = 2048MB                                          
> temp_buffers = 12MB                                                    
> work_mem = 12MB                     
> maintenance_work_mem = 128MB                          
> max_fsm_pages =   4000000                               
> max_fsm_relations = 5000            

Should be OK, depending on your work-load.

One question - what do you plan on doing with 300 active connections?
Unless you've got more than 100 processors in this machine you might
want to consider connection-pooling.

-- 
  Richard Huxton
  Archonet Ltd



^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* max_connections
@ 2012-09-05 20:30 Modumudi, Sireesha <Sireesha.Modumudi@emc.com>
  2012-09-05 20:34 ` Re: max_connections Scott Marlowe <scott.marlowe@gmail.com>
  2012-09-05 20:42 ` Re: max_connections Kevin Grittner <Kevin.Grittner@wicourts.gov>
  2012-09-05 20:51 ` Re: max_connections jam3 <jamorton3@gmail.com>
  2012-09-06 08:20 ` Re: max_connections Albe Laurenz <laurenz.albe@wien.gv.at>
  0 siblings, 4 replies; 22+ messages in thread

From: Modumudi, Sireesha @ 2012-09-05 20:30 UTC (permalink / raw)
  To: pgsql-general

Hi all,

 

I am using postgres 8.3.9 on SUSE 64 bit. By default max_connections is
100, but I want to know if this can be increased, if so, what should we
take into consideration? 

 

Thank you,

Sireesha

^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: max_connections
  2012-09-05 20:30 max_connections Modumudi, Sireesha <Sireesha.Modumudi@emc.com>
@ 2012-09-05 20:34 ` Scott Marlowe <scott.marlowe@gmail.com>
  3 siblings, 0 replies; 22+ messages in thread

From: Scott Marlowe @ 2012-09-05 20:34 UTC (permalink / raw)
  To: Modumudi, Sireesha <Sireesha.Modumudi@emc.com>; +Cc: pgsql-general

On Wed, Sep 5, 2012 at 2:30 PM, Modumudi, Sireesha
<Sireesha.Modumudi@emc.com> wrote:
> Hi all,
>
> I am using postgres 8.3.9 on SUSE 64 bit. By default max_connections is 100,
> but I want to know if this can be increased, if so, what should we take into
> consideration?

If you're considering raising this then you should probably be looking
at some kind of pooler like pgbouncer or pgool.    That said I've run
servers that did things like sessions (small transactions and lots of
idle connects) to ~1000 before but make sure you've got enough memory
free as each backend will use about 6MB of memory.




^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: max_connections
  2012-09-05 20:30 max_connections Modumudi, Sireesha <Sireesha.Modumudi@emc.com>
@ 2012-09-05 20:42 ` Kevin Grittner <Kevin.Grittner@wicourts.gov>
  3 siblings, 0 replies; 22+ messages in thread

From: Kevin Grittner @ 2012-09-05 20:42 UTC (permalink / raw)
  To: Sireesha Modumudi <Sireesha.Modumudi@emc.com>; pgsql-general

"Modumudi, Sireesha" <Sireesha.Modumudi@emc.com> wrote:
 
> I am using postgres 8.3.9 on SUSE 64 bit. By default
> max_connections is 100, but I want to know if this can be
> increased, if so, what should we take into consideration? 
 
http://wiki.postgresql.org/wiki/Number_Of_Database_Connections
 
-Kevin




^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: max_connections
  2012-09-05 20:30 max_connections Modumudi, Sireesha <Sireesha.Modumudi@emc.com>
@ 2012-09-05 20:51 ` jam3 <jamorton3@gmail.com>
  3 siblings, 0 replies; 22+ messages in thread

From: jam3 @ 2012-09-05 20:51 UTC (permalink / raw)
  To: pgsql-general

According to 

http://www.postgresql.org/docs/8.3/static/kernel-resources.html

The maximum shared memory usage of a connection in bytes is

1800 + 270 * max_locks_per_transaction

max_locks_per_transaction default is 64

19080 Bytes

or .018 mb's per connection

or

1.819 mb at 100 default connections

With a Gig of Phsical Ram setting Shared Buffers to use 25% - 256 mb
dedicated to Postgres

default is using roughly 0.75% for connections

You can extrapolate this out taking into consideration all your specific
variables, total physical RAM, postgresql.conf settings etc but I wouldn;t
run off to use pgpool unless your in an extremly connection heavy
environment as it does add an additional layer within the client server
connection and is another component to config and admin.







--
View this message in context: http://postgresql.1045698.n5.nabble.com/max-connections-tp5722890p5722899.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.




^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: max_connections
  2012-09-05 20:30 max_connections Modumudi, Sireesha <Sireesha.Modumudi@emc.com>
@ 2012-09-06 08:20 ` Albe Laurenz <laurenz.albe@wien.gv.at>
  3 siblings, 0 replies; 22+ messages in thread

From: Albe Laurenz @ 2012-09-06 08:20 UTC (permalink / raw)
  To: Modumudi, Sireesha *EXTERN* <Sireesha.Modumudi@emc.com>; pgsql-general

Sireesha Modumudi wrote:
> I am using postgres 8.3.9 on SUSE 64 bit. By default max_connections
is 100, but I want to know if
> this can be increased, if so, what should we take into consideration?

It can be increased, but you habe to restart the server for
the change to take effect.

It is not a good idea to increase the setting without thought.
There is a Wiki article about it:
http://wiki.postgresql.org/wiki/Number_Of_Database_Connections

If you need more than 100 connections, consider the use of a
connection pool.

Yours,
Laurenz Albe




^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: max_connections
@ 2021-06-03 18:44 Vijaykumar Jain <vijaykumarjain.github@gmail.com>
  2021-06-03 19:21 ` Re: max_connections Vijaykumar Jain <vijaykumarjain.github@gmail.com>
  0 siblings, 1 reply; 22+ messages in thread

From: Vijaykumar Jain @ 2021-06-03 18:44 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@lists.postgresql.org>

ok, running too many connections without recycling has an overhead.
no wonder pgbouncer is all over as a sidecar :)

In case anyone is interested, this blog is a great read.
Analyzing the Limits of Connection Scalability in Postgres - Microsoft Tech
Community
<https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/analyzing-the-limits-of-connect...;

<https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/analyzing-the-limits-of-connect...;


On Sun, 30 May 2021 at 20:19, Vijaykumar Jain <
vijaykumarjain.github@gmail.com> wrote:

> I have a two dumb questions.
>
> 1)
> I know the max_connections value change requires a restart.
>
> I also read a thread, which says why it is the case, assuming it still
> holds true.
>
> Jean Arnaud <Jean(dot)Arnaud(at)inrialpes(dot)fr> writes:
> > I'm looking for a way to change the "max_connections" parameter without
> > restarting the PostGreSQL database.
>
> There is none. That's one of the parameters that determines shared
> memory array sizes, and we can't change those on-the-fly.
>
> regards, tom lane
>
> Does that mean, if I set max_connections to 1000 users, but only intend to
> use 10 at max (via conn limit per role settings), what would be the perf
> difference compared to max_connections = 100 , but still using only 10 at
> max.
>
> 2)
> can i for test purposes.compile src with a xid max value to 2^16 etc ?
> like with uint16
>
> Basically, I was trying to simulate xid wraparound, by creating an open
> transaction and an inactive replication slot, and then running a huge
> parallel loops to bump txid_current() to see what happens at 2B crossover.
> it takes forever on my slow laptop.
> I do not see these in test scenarios, or could not find any.
>
> as always, ignore if not relevant, or already discussed.
> I am preparing for interviews, hence asking myself dumb questions :)
>
> --
> Thanks,
> Vijay
> Mumbai, India
>


-- 
Thanks,
Vijay
Mumbai, India

^ permalink  raw  reply  [nested|flat] 22+ messages in thread

* Re: max_connections
  2021-06-03 18:44 Re: max_connections Vijaykumar Jain <vijaykumarjain.github@gmail.com>
@ 2021-06-03 19:21 ` Vijaykumar Jain <vijaykumarjain.github@gmail.com>
  0 siblings, 0 replies; 22+ messages in thread

From: Vijaykumar Jain @ 2021-06-03 19:21 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@lists.postgresql.org>

and this one as well. just to keep it in the thread.

Improving Postgres Connection Scalability: Snapshots - Microsoft Tech
Community
<https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/improving-postgres-connection-s...;


On Fri, 4 Jun 2021 at 00:14, Vijaykumar Jain <
vijaykumarjain.github@gmail.com> wrote:

> ok, running too many connections without recycling has an overhead.
> no wonder pgbouncer is all over as a sidecar :)
>
> In case anyone is interested, this blog is a great read.
> Analyzing the Limits of Connection Scalability in Postgres - Microsoft
> Tech Community
> <https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/analyzing-the-limits-of-connect...;
>
>
> <https://techcommunity.microsoft.com/t5/azure-database-for-postgresql/analyzing-the-limits-of-connect...;
>
>
> On Sun, 30 May 2021 at 20:19, Vijaykumar Jain <
> vijaykumarjain.github@gmail.com> wrote:
>
>> I have a two dumb questions.
>>
>> 1)
>> I know the max_connections value change requires a restart.
>>
>> I also read a thread, which says why it is the case, assuming it still
>> holds true.
>>
>> Jean Arnaud <Jean(dot)Arnaud(at)inrialpes(dot)fr> writes:
>> > I'm looking for a way to change the "max_connections" parameter without
>> > restarting the PostGreSQL database.
>>
>> There is none. That's one of the parameters that determines shared
>> memory array sizes, and we can't change those on-the-fly.
>>
>> regards, tom lane
>>
>> Does that mean, if I set max_connections to 1000 users, but only intend
>> to use 10 at max (via conn limit per role settings), what would be the perf
>> difference compared to max_connections = 100 , but still using only 10 at
>> max.
>>
>> 2)
>> can i for test purposes.compile src with a xid max value to 2^16 etc ?
>> like with uint16
>>
>> Basically, I was trying to simulate xid wraparound, by creating an open
>> transaction and an inactive replication slot, and then running a huge
>> parallel loops to bump txid_current() to see what happens at 2B crossover.
>> it takes forever on my slow laptop.
>> I do not see these in test scenarios, or could not find any.
>>
>> as always, ignore if not relevant, or already discussed.
>> I am preparing for interviews, hence asking myself dumb questions :)
>>
>> --
>> Thanks,
>> Vijay
>> Mumbai, India
>>
>
>
> --
> Thanks,
> Vijay
> Mumbai, India
>


-- 
Thanks,
Vijay
Mumbai, India

^ permalink  raw  reply  [nested|flat] 22+ messages in thread


end of thread, other threads:[~2021-06-03 19:21 UTC | newest]

Thread overview: 22+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-05 20:05 Max connections eriko <eriko@radix.com.br>
2001-01-05 15:30 ` nfj@radix.com
2001-01-05 15:33 ` nelson@radix.com.br
2002-11-12 19:30 Max connections Williams, Travis L, NPONS <tlw@att.com>
2002-11-12 20:23 ` Robert Treat <xzilla@users.sourceforge.net>
2002-11-13 10:47 ` Richard Huxton <dev@archonet.com>
2003-02-20 15:17 max connections Jose Antonio Martinez <lfbbes@yahoo.es>
2003-02-20 17:31 ` Re: max connections Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>
2003-02-20 18:14   ` Re: max connections Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>
2003-02-21 10:50   ` Re: max connections Richard Huxton <dev@archonet.com>
2003-02-20 18:05 Re: max connections Williams, Travis L, NPONS <tlw@att.com>
2005-08-29 17:59 max_connections John D. Burger <john@mitre.org>
2005-08-29 19:00 ` Re: max_connections Tom Lane <tgl@sss.pgh.pa.us>
2008-11-12 16:05 MAX_CONNECTIONS ?? paulo matadr <saddoness@yahoo.com.br>
2008-11-12 17:41 ` Re: [GENERAL] MAX_CONNECTIONS ?? Richard Huxton <dev@archonet.com>
2012-09-05 20:30 max_connections Modumudi, Sireesha <Sireesha.Modumudi@emc.com>
2012-09-05 20:34 ` Re: max_connections Scott Marlowe <scott.marlowe@gmail.com>
2012-09-05 20:42 ` Re: max_connections Kevin Grittner <Kevin.Grittner@wicourts.gov>
2012-09-05 20:51 ` Re: max_connections jam3 <jamorton3@gmail.com>
2012-09-06 08:20 ` Re: max_connections Albe Laurenz <laurenz.albe@wien.gv.at>
2021-06-03 18:44 Re: max_connections Vijaykumar Jain <vijaykumarjain.github@gmail.com>
2021-06-03 19:21 ` Re: max_connections Vijaykumar Jain <vijaykumarjain.github@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox