You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@
13
13
-[Introduction](#introduction)
14
14
-[Technical Explanation](#technical-explanation)
15
15
-[Installation](#installation)
16
+
-[Configuration](#extension-configuration)
16
17
-[Requests API](#requests-api)
17
18
- Monitoring requests
18
19
- GET requests
@@ -136,6 +137,33 @@ create extension pg_net;
136
137
137
138
---
138
139
140
+
# Extension Configuration:
141
+
142
+
the extension creates 3 configurable variables:
143
+
144
+
1.**pg_net.batch_size**_(default: 200)_: An integer that limits the max number of rows that the extension will process from _`net.http_request_queue`_ during each read
145
+
2.**pg_net.ttl**_(default: 6 hours)_: An interval that defines the max time a row in the _`net.http_response`_ will live before being deleted
146
+
3.**pg_net.database_name**_(default: 'postgres')_: A string that defines which database the extension is applied to
147
+
148
+
All these variables can be viewed with the following command:
149
+
```sql
150
+
select*from pg_settings WHERE name LIKE'pg_net%'
151
+
```
152
+
153
+
The postgres.conf file can be found with the following SQL command:
154
+
```sql
155
+
SHOW config_file;
156
+
```
157
+
158
+
You can change the variables by adding any of the following line to your postgres.conf file
159
+
```
160
+
pg_net.batch_size = <new integer>
161
+
pg_net.ttl = '<new ttl interval>'
162
+
pg_net.database_name = '<database name>'
163
+
```
164
+
165
+
After saving the file, you can execute `SELECT pg_reload_conf()` to update _postgres.conf_ for your database. If the extension does not respond to the update, it may be necessary to restart your database.
0 commit comments