Commit 52f67d3
Shayon Mukherjee
Support idle_in_transaction_session_timeout and statement_timeout for native driver
Right now when using `pg` with `pg-native` the config options
`idle_in_transaction_session_timeout` and `statement_timeout`
do not get applied. This is due to, when building the connection
string for native driver these options aren't passed in.
I took advantage of `options` conn parameter and passed both the config options
into it using `-c` which postgres supports. This builds on top of the work happened in <TBD LINK>.
Also added some tests. Very much open to feedback and comments :).1 parent 80c500f commit 52f67d3
File tree
2 files changed
+47
-0
lines changed- packages/pg
- lib
- test/unit/connection-parameters
2 files changed
+47
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
48 | 63 | | |
49 | 64 | | |
50 | 65 | | |
| |||
120 | 135 | | |
121 | 136 | | |
122 | 137 | | |
| 138 | + | |
| 139 | + | |
123 | 140 | | |
124 | 141 | | |
125 | 142 | | |
| |||
128 | 145 | | |
129 | 146 | | |
130 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
131 | 158 | | |
132 | 159 | | |
133 | 160 | | |
| |||
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
175 | 195 | | |
176 | 196 | | |
177 | 197 | | |
| |||
0 commit comments