You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,8 @@ Available options:
139
139
*`"ssl"`: enable ssl (default: `false`)
140
140
*`"ssl_verify"`: verify server certificate (default: `nil`)
141
141
*`"ssl_required"`: abort the connection if the server does not support SSL connections (default: `nil`)
142
-
*`"socket_type"`: the type of socket to use, one of: `"nginx"`, `"luasocket"`, `cqueues` (default: `"nginx"` if in nginx, `"luasocket"` otherwise)
142
+
*`"socket_type"`: the type of socket to use, one of: `"nginx"`, `"luasocket"`, `"cqueues"` (default: `"nginx"` if in nginx, `"luasocket"` otherwise)
143
+
*`"socket_path"`: path to Unix socket (e.g. `"/var/run/postgresql/.s.PGSQL.5432"`); when set `host` and `port` are ignored. In nginx, connects using `unix:/path` syntax; otherwise uses luaposix
143
144
*`"application_name"`: set the name of the connection as displayed in `pg_stat_activity`. (default: `"pgmoon"`)
144
145
*`"pool_name"`: (OpenResty only) name of pool to use when using OpenResty cosocket (default: `"#{host}:#{port}:#{database}:#{user}"`)
returnerror("You attempted to call setkeepalive on a Unix socket. This method is only available for the ngx cosocket API for releasing a socket back into the connection pool")
64
+
end,
65
+
getreusedtimes=function(self, t)
66
+
return0
67
+
end,
68
+
sslhandshake=function(self, opts)
69
+
ifopts==nilthen
70
+
opts= { }
71
+
end
72
+
returnerror("SSL handshake is not supported over Unix domain sockets")
-- Unix sockets don't have built-in timeout, but we store it for compatibility
51
+
@timeout= t
52
+
53
+
close:=>
54
+
posix_unistd =require"posix.unistd"
55
+
posix_unistd.close @sock.fd
56
+
57
+
setkeepalive:=>
58
+
error"You attempted to call setkeepalive on a Unix socket. This method is only available for the ngx cosocket API for releasing a socket back into the connection pool"
59
+
60
+
getreusedtimes:(t)=>0
61
+
62
+
sslhandshake:(opts={})=>
63
+
error"SSL handshake is not supported over Unix domain sockets"
0 commit comments