feat: Include and exclude databases
- Add filters to include and exclude strings - Use filters to include and exclude sessions (user and databases supported) - Add tests to filters and terminator Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
29dbbc5bef
commit
8709ee542b
9 changed files with 553 additions and 53 deletions
|
|
@ -107,6 +107,10 @@ When include users list or regex is set, `pgterminate` will focus on included us
|
|||
|
||||
When exclude users list or regex is set and no include option is set, `pgterminate` will terminate all sessions except excluded users.
|
||||
|
||||
# Filtering databases
|
||||
|
||||
Similar to users, `pgterminate` is able to filter sessions by database. The same set of options are available if you replace `user` by `database` (ex: `-include-user` to `-include-database` and so on).
|
||||
|
||||
# Listeners
|
||||
|
||||
LISTEN queries are asynchronous. Sessions are set to "idle" state even if they are waiting for messages to be sent to the queue. `pgterminate` can exclude sessions in that state by looking at the last known query starting with "LISTEN", with the `exclude-listeners` parameter.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue