Browse code

modules: readme files regenerated - db_postgres ... [skip ci]

Kamailio Dev authored on 09/02/2021 20:31:11
Showing 1 changed files
... ...
@@ -28,6 +28,7 @@ Greg Fausak
28 28
               3.3. tcp_keepalive (integer)
29 29
               3.4. lockset (integer)
30 30
               3.5. bytea_output_escape (integer)
31
+              3.6. con_param (str)
31 32
 
32 33
         4. Functions
33 34
 
... ...
@@ -38,6 +39,7 @@ Greg Fausak
38 39
    1.3. Set tcp_keepalive parameter
39 40
    1.4. Set lockset parameter
40 41
    1.5. Set bytea_output_escape parameter
42
+   1.6. Set con_param parameter
41 43
 
42 44
 Chapter 1. Admin Guide
43 45
 
... ...
@@ -56,6 +58,7 @@ Chapter 1. Admin Guide
56 58
         3.3. tcp_keepalive (integer)
57 59
         3.4. lockset (integer)
58 60
         3.5. bytea_output_escape (integer)
61
+        3.6. con_param (str)
59 62
 
60 63
    4. Functions
61 64
 
... ...
@@ -89,6 +92,7 @@ Chapter 1. Admin Guide
89 92
    3.3. tcp_keepalive (integer)
90 93
    3.4. lockset (integer)
91 94
    3.5. bytea_output_escape (integer)
95
+   3.6. con_param (str)
92 96
 
93 97
 3.1. retries (integer)
94 98
 
... ...
@@ -107,9 +111,11 @@ modparam("db_postgres", "retries", 3)
107 111
 3.2. timeout (integer)
108 112
 
109 113
    Setting this variable to any value larger than zero (which is the
110
-   default value) enables both a connection timeout and a query timeout.
111
-   If a connection attempt or a query takes longer than this many seconds,
112
-   the operation will be aborted and an error will be returned.
114
+   default value) enables mainly query timeout. For backward compatibility
115
+   it also enables connection timeout if connect_timeout param is not set
116
+   using the con_param below. If a connection attempt or a query takes
117
+   longer than this many seconds, the operation will be aborted and an
118
+   error will be returned.
113 119
 
114 120
    Note that this timeout is applied to each underlying operation (i.e.
115 121
    for each connection attempt), so depending on circumstances and on the
... ...
@@ -159,6 +165,21 @@ modparam("db_postgres", "lockset", 6)
159 165
 modparam("db_postgres", "bytea_output_escape", 0)
160 166
 ...
161 167
 
168
+3.6. con_param (str)
169
+
170
+   Specifies the connection string parameters. Parameter definition must
171
+   be in the format param1=value1;param2=value2. Many parameters can be
172
+   set.
173
+
174
+   NOTE: See postgres connection keyword list
175
+   (https://www.postgresql.org/docs/12/libpq-connect.html#LIBPQ-PARAMKEYWO
176
+   RDS)
177
+
178
+   Example 1.6. Set con_param parameter
179
+...
180
+modparam("db_postgres", "con_param", "connect_timeout=15;tcp_user_timeout=5000")
181
+...
182
+
162 183
 4. Functions
163 184
 
164 185
    NONE
Browse code

modules: readme files regenerated - db_postgres ... [skip ci]

Kamailio Dev authored on 12/10/2018 00:16:29
Showing 1 changed files
... ...
@@ -27,6 +27,7 @@ Greg Fausak
27 27
               3.2. timeout (integer)
28 28
               3.3. tcp_keepalive (integer)
29 29
               3.4. lockset (integer)
30
+              3.5. bytea_output_escape (integer)
30 31
 
31 32
         4. Functions
32 33
 
... ...
@@ -36,6 +37,7 @@ Greg Fausak
36 37
    1.2. Set timeout parameter
37 38
    1.3. Set tcp_keepalive parameter
38 39
    1.4. Set lockset parameter
40
+   1.5. Set bytea_output_escape parameter
39 41
 
40 42
 Chapter 1. Admin Guide
41 43
 
... ...
@@ -53,6 +55,7 @@ Chapter 1. Admin Guide
53 55
         3.2. timeout (integer)
54 56
         3.3. tcp_keepalive (integer)
55 57
         3.4. lockset (integer)
58
+        3.5. bytea_output_escape (integer)
56 59
 
57 60
    4. Functions
58 61
 
... ...
@@ -85,6 +88,7 @@ Chapter 1. Admin Guide
85 88
    3.2. timeout (integer)
86 89
    3.3. tcp_keepalive (integer)
87 90
    3.4. lockset (integer)
91
+   3.5. bytea_output_escape (integer)
88 92
 
89 93
 3.1. retries (integer)
90 94
 
... ...
@@ -143,6 +147,18 @@ modparam("db_postgres", "tcp_keepalive", 600)
143 147
 modparam("db_postgres", "lockset", 6)
144 148
 ...
145 149
 
150
+3.5. bytea_output_escape (integer)
151
+
152
+   Control if the module should request escaping the output for bytea
153
+   fields.
154
+
155
+   Default value is 1 (do the escape).
156
+
157
+   Example 1.5. Set bytea_output_escape parameter
158
+...
159
+modparam("db_postgres", "bytea_output_escape", 0)
160
+...
161
+
146 162
 4. Functions
147 163
 
148 164
    NONE
Browse code

modules: readme files regenerated - acc ... [skip ci]

Kamailio Dev authored on 28/02/2018 17:03:37 • The Root committed on 28/02/2018 19:11:36
Showing 1 changed files
... ...
@@ -88,11 +88,11 @@ Chapter 1. Admin Guide
88 88
 
89 89
 3.1. retries (integer)
90 90
 
91
-   How many retries to attept to reconnect if connection to Postgres
91
+   How many retries to attempt to reconnect if connection to Postgres
92 92
    server becomes broken.
93 93
 
94
-   Default value is 2 (that means three attepts to submit the query, first
95
-   will triger the connection error and two more (the value of this
94
+   Default value is 2 (that means three attempts to submit the query,
95
+   first will trigger the connection error and two more (the value of this
96 96
    parameter) after resetting the connection).
97 97
 
98 98
    Example 1.1. Set retries parameter
Browse code

modules: readme files regenerated - db_postgres ... [skip ci]

Kamailio Dev authored on 11/10/2017 16:31:26
Showing 1 changed files
... ...
@@ -26,6 +26,7 @@ Greg Fausak
26 26
               3.1. retries (integer)
27 27
               3.2. timeout (integer)
28 28
               3.3. tcp_keepalive (integer)
29
+              3.4. lockset (integer)
29 30
 
30 31
         4. Functions
31 32
 
... ...
@@ -34,6 +35,7 @@ Greg Fausak
34 35
    1.1. Set retries parameter
35 36
    1.2. Set timeout parameter
36 37
    1.3. Set tcp_keepalive parameter
38
+   1.4. Set lockset parameter
37 39
 
38 40
 Chapter 1. Admin Guide
39 41
 
... ...
@@ -50,6 +52,7 @@ Chapter 1. Admin Guide
50 52
         3.1. retries (integer)
51 53
         3.2. timeout (integer)
52 54
         3.3. tcp_keepalive (integer)
55
+        3.4. lockset (integer)
53 56
 
54 57
    4. Functions
55 58
 
... ...
@@ -81,6 +84,7 @@ Chapter 1. Admin Guide
81 84
    3.1. retries (integer)
82 85
    3.2. timeout (integer)
83 86
    3.3. tcp_keepalive (integer)
87
+   3.4. lockset (integer)
84 88
 
85 89
 3.1. retries (integer)
86 90
 
... ...
@@ -127,6 +131,18 @@ modparam("db_postgres", "timeout", 10)
127 131
 modparam("db_postgres", "tcp_keepalive", 600)
128 132
 ...
129 133
 
134
+3.4. lockset (integer)
135
+
136
+   The value is used as power of two to compute the size of the lock set
137
+   needed to implement the equivalent of REPLACE SQL statement.
138
+
139
+   Default value is 4 (lock set size is 16).
140
+
141
+   Example 1.4. Set lockset parameter
142
+...
143
+modparam("db_postgres", "lockset", 6)
144
+...
145
+
130 146
 4. Functions
131 147
 
132 148
    NONE
Browse code

core, lib, modules: restructured source code tree

- new folder src/ to hold the source code for main project applications
- main.c is in src/
- all core files are subfolder are in src/core/
- modules are in src/modules/
- libs are in src/lib/
- application Makefiles are in src/
- application binary is built in src/ (src/kamailio)

Daniel-Constantin Mierla authored on 07/12/2016 11:03:51
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,132 @@
1
+postgres Module
2
+
3
+Greg Fausak
4
+
5
+   August.net
6
+
7
+Edited by
8
+
9
+Greg Fausak
10
+
11
+   Copyright © 2003 Greg Fausak
12
+     __________________________________________________________________
13
+
14
+   Table of Contents
15
+
16
+   1. Admin Guide
17
+
18
+        1. Overview
19
+        2. Dependencies
20
+
21
+              2.1. Kamailio Modules
22
+              2.2. External Libraries or Applications
23
+
24
+        3. Parameters
25
+
26
+              3.1. retries (integer)
27
+              3.2. timeout (integer)
28
+              3.3. tcp_keepalive (integer)
29
+
30
+        4. Functions
31
+
32
+   List of Examples
33
+
34
+   1.1. Set retries parameter
35
+   1.2. Set timeout parameter
36
+   1.3. Set tcp_keepalive parameter
37
+
38
+Chapter 1. Admin Guide
39
+
40
+   Table of Contents
41
+
42
+   1. Overview
43
+   2. Dependencies
44
+
45
+        2.1. Kamailio Modules
46
+        2.2. External Libraries or Applications
47
+
48
+   3. Parameters
49
+
50
+        3.1. retries (integer)
51
+        3.2. timeout (integer)
52
+        3.3. tcp_keepalive (integer)
53
+
54
+   4. Functions
55
+
56
+1. Overview
57
+
58
+   The module is an implementation of the internal DB API v1 and v2
59
+   connector for PostgreSQL server. It has support for reconnecting when
60
+   the connection is broken.
61
+
62
+2. Dependencies
63
+
64
+   2.1. Kamailio Modules
65
+   2.2. External Libraries or Applications
66
+
67
+2.1. Kamailio Modules
68
+
69
+   The following modules must be loaded before this module:
70
+     * No dependencies on other Kamailio modules.
71
+
72
+2.2. External Libraries or Applications
73
+
74
+   The following libraries or applications must be installed before
75
+   running Kamailio with this module loaded:
76
+     * PostgreSQL library - e.g., libpq5.
77
+     * PostgreSQL devel library - to compile the module (e.g., libpq-dev).
78
+
79
+3. Parameters
80
+
81
+   3.1. retries (integer)
82
+   3.2. timeout (integer)
83
+   3.3. tcp_keepalive (integer)
84
+
85
+3.1. retries (integer)
86
+
87
+   How many retries to attept to reconnect if connection to Postgres
88
+   server becomes broken.
89
+
90
+   Default value is 2 (that means three attepts to submit the query, first
91
+   will triger the connection error and two more (the value of this
92
+   parameter) after resetting the connection).
93
+
94
+   Example 1.1. Set retries parameter
95
+...
96
+modparam("db_postgres", "retries", 3)
97
+...
98
+
99
+3.2. timeout (integer)
100
+
101
+   Setting this variable to any value larger than zero (which is the
102
+   default value) enables both a connection timeout and a query timeout.
103
+   If a connection attempt or a query takes longer than this many seconds,
104
+   the operation will be aborted and an error will be returned.
105
+
106
+   Note that this timeout is applied to each underlying operation (i.e.
107
+   for each connection attempt), so depending on circumstances and on the
108
+   value of the “retries” variable, a single query from the SIP proxy's
109
+   point of view can take longer than the “timeout”.
110
+
111
+   Example 1.2. Set timeout parameter
112
+...
113
+modparam("db_postgres", "timeout", 10)
114
+...
115
+
116
+3.3. tcp_keepalive (integer)
117
+
118
+   Enable the TCP keepalive timer and set the number of seconds the
119
+   connection must be idle before to start sending keepalive packets.
120
+   Defaults to zero, which disables TCP keepalive packets.
121
+
122
+   Only supported on platforms which understand and support the
123
+   “TCP_KEEPIDLE” socket option.
124
+
125
+   Example 1.3. Set tcp_keepalive parameter
126
+...
127
+modparam("db_postgres", "tcp_keepalive", 600)
128
+...
129
+
130
+4. Functions
131
+
132
+   NONE