Skip to content

Commit 0c52f39

Browse files
committed
bump version
1 parent 5d049b2 commit 0c52f39

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## [Unreleased]
3+
## v1.1.0
44

55
- Add support for transaction `:mode`, useful in cases where a PgBouncer is in
66
sitting front of Postgres and in transaction mode. In this case, the default

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ Or install it yourself as:
3838
$ gem install statement_timeout
3939
```
4040

41+
## Configuration
42+
43+
```ruby
44+
StatementTimeout.configure do |config|
45+
# When using a connection pooler like PgBouncer while in transaction mode, it
46+
# is required that you change the default mode from :session to :transaction
47+
# otherwise the statement timeouts may be SET on the right connection.
48+
config.default_mode = :transaction
49+
end
50+
```
51+
4152
## Usage
4253

4354
```ruby

lib/statement_timeout.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def local_statement_timeout=(timeout)
2424
module PostgreSQLAdapterExtension
2525
def supports_statement_timeout? = true
2626
def statement_timeout = @statement_timeout ||= query_value("SHOW statement_timeout")
27+
2728
def statement_timeout=(timeout)
2829
@statement_timeout = nil
2930

lib/statement_timeout/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module StatementTimeout
4-
VERSION = '1.0.0'
4+
VERSION = '1.1.0'
55
end

0 commit comments

Comments
 (0)