@@ -703,6 +703,125 @@ include_dir 'conf.d'
703
703
</listitem>
704
704
</varlistentry>
705
705
706
+ <varlistentry id="guc-max-sessions" xreflabel="max_sessions">
707
+ <term><varname>max_sessions</varname> (<type>integer</type>)
708
+ <indexterm>
709
+ <primary><varname>max_sessions</varname> configuration parameter</primary>
710
+ </indexterm>
711
+ </term>
712
+ <listitem>
713
+ <para>
714
+ The maximum number of client sessions that can be handled by
715
+ one backend when session pooling is switched on.
716
+ This parameter does not add any memory or CPU overhead, so
717
+ specifying a large <varname>max_sessions</varname> value
718
+ does not affect performance.
719
+ If the <varname>max_sessions</varname> limit is reached,
720
+ the backend stops accepting connections. Until one of the
721
+ connections is terminated, attempts to connect to this
722
+ backend result in an error.
723
+ </para>
724
+ <para>
725
+ The default value is 1000. This parameter can only be set at server start.
726
+ </para>
727
+ </listitem>
728
+ </varlistentry>
729
+
730
+ <varlistentry id="guc-session-pool-size" xreflabel="session_pool_size">
731
+ <term><varname>session_pool_size</varname> (<type>integer</type>)
732
+ <indexterm>
733
+ <primary><varname>session_pool_size</varname> configuration parameter</primary>
734
+ </indexterm>
735
+ </term>
736
+ <listitem>
737
+ <para>
738
+ Enables session pooling and defines the maximum number of
739
+ backends that can be used by client sessions for each database/user combination.
740
+ Launched backends are never terminated even if there are no active sessions.
741
+ </para>
742
+ <para>
743
+ The default value is zero, so session pooling is disabled.
744
+ </para>
745
+ </listitem>
746
+ </varlistentry>
747
+
748
+ <varlistentry id="guc-connection-pool-workers" xreflabel="connection_pool_workers">
749
+ <term><varname>connection_pool_workers</varname> (<type>integer</type>)
750
+ <indexterm>
751
+ <primary><varname>connection_pool_workers</varname> configuration parameter</primary>
752
+ </indexterm>
753
+ </term>
754
+ <listitem>
755
+ <para>
756
+ Number of connection listeners used to read client startup packages.
757
+ If session pooling is enabled, <productname>&productname;</productname>
758
+ server redirects all client startup packages to a connection listener.
759
+ The listener determines the database and user that the client needs
760
+ to access and redirects the connection to an appropriate backend,
761
+ which is selected from the pool using the round-robin algorithm.
762
+ This approach allows to avoid server slowdown if a client tries
763
+ to connect via a slow or unreliable network.
764
+ </para>
765
+ <para>
766
+ The default value is 2.
767
+ </para>
768
+ </listitem>
769
+ </varlistentry>
770
+
771
+ <varlistentry id="guc-dedicated-databases" xreflabel="dedicated_databases">
772
+ <term><varname>dedicated_databases</varname> (<type>string</type>)
773
+ <indexterm>
774
+ <primary><varname>dedicated_databases</varname> configuration parameter</primary>
775
+ </indexterm>
776
+ </term>
777
+ <listitem>
778
+ <para>
779
+ Specifies the list of databases for which session pooling is disabled.
780
+ For such databases, a separate backend is forked for each connection.
781
+ By default, session pooling is disabled for <literal>template0</literal>,
782
+ <literal>template1</literal>, and <literal>postgres</literal> databases.
783
+ </para>
784
+ </listitem>
785
+ </varlistentry>
786
+
787
+ <varlistentry id="guc-restart-pooler-on-reload" xreflabel="restart_pooler_on_reload">
788
+ <term><varname>restart_pooler_on_reload</varname> (<type>string</type>)
789
+ <indexterm>
790
+ <primary><varname>restart_pooler_on_reload</varname> configuration parameter</primary>
791
+ </indexterm>
792
+ </term>
793
+ <listitem>
794
+ <para>
795
+ Restart session pool workers once <function>pg_reload_conf()</function> is called.
796
+ The default value is <literal>false</literal>.
797
+ </para>
798
+ </listitem>
799
+ </varlistentry>
800
+
801
+ <varlistentry id="guc-session-schedule" xreflabel="session_schedule">
802
+ <term><varname>session_schedule</varname> (<type>enum</type>)
803
+ <indexterm>
804
+ <primary><varname>session_schedule</varname> configuration parameter</primary>
805
+ </indexterm>
806
+ </term>
807
+ <listitem>
808
+ <para>
809
+ Specifies scheduling policy for assigning session to backend in case of
810
+ connection pooling. Default policy is <literal>round-robin</literal>.
811
+ </para>
812
+ <para>
813
+ With <literal>round-robin</literal> policy postmaster cyclicly scatter sessions between session pool backends.
814
+ </para>
815
+ <para>
816
+ With <literal>random</literal> policy postmaster randomly choose backend in session pool.
817
+ </para>
818
+ <para>
819
+ With <literal>load-balancing</literal> policy postmaster choose backend with lowest load average.
820
+ Load average of backend is estimated by number of ready events at each reschedule iteration.
821
+ </para>
822
+ </listitem>
823
+ </varlistentry>
824
+
706
825
<varlistentry id="guc-unix-socket-directories" xreflabel="unix_socket_directories">
707
826
<term><varname>unix_socket_directories</varname> (<type>string</type>)
708
827
<indexterm>
0 commit comments