Skip to content

Commit 4c5eb5b

Browse files
Added Configuration variables list to documentation (#112)
1 parent 84a264c commit 4c5eb5b

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- [Introduction](#introduction)
1414
- [Technical Explanation](#technical-explanation)
1515
- [Installation](#installation)
16+
- [Configuration](#extension-configuration)
1617
- [Requests API](#requests-api)
1718
- Monitoring requests
1819
- GET requests
@@ -136,6 +137,33 @@ create extension pg_net;
136137

137138
---
138139

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.
166+
139167
# Requests API
140168

141169
## Monitoring Requests

0 commit comments

Comments
 (0)