Skip to content

Commit 1f44e64

Browse files
committed
Fixed local destination detection with pg 1.6+
1 parent ab793f6 commit 1f44e64

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.8.1 (unreleased)
2+
3+
- Fixed local destination detection with pg 1.6+
4+
15
## 0.8.0 (2024-07-10)
26

37
- Added Docker image for `linux/arm64`

lib/pgsync/data_source.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ def exists?
1414
@url && @url.size > 0
1515
end
1616

17+
# host can be "/var/run/postgresql,/run/postgresql,/tmp" on Linux with pg 1.6+
1718
def local?
18-
!host || %w(localhost 127.0.0.1).include?(host)
19+
!host || %w(localhost 127.0.0.1).include?(host) || host.split(",").all? { |v| v.start_with?("/") }
1920
end
2021

2122
def host

0 commit comments

Comments
 (0)