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
The simple corutine model have 5 connections constantly:
function testdb(n)
local luasql = require "luasql.postgres"
local env = assert (luasql.postgres())
local con = assert (env:connect('test2', 'postgres', nil, "127.0.0.1", 5432))
coroutine.yield(n)
local query = string.format("SELECT * FROM rw_register where val=%d", n)
local cur = assert(con:execute(query))
print(query)
coroutine.yield(query)
local row = cur:fetch ({}, "a")
local count = 0
while row do
print(string.format("%d %d", row.val, row.ver ))
row = cur:fetch (row, "a")
count = count + 1
end
The code of postgresql rw-test usingmolly. After first or second call method invoike the connection was closed. It can check parallel sql command:
SELECT client_addr,pid,usename,application_name FROM pg_stat_activity;
So, it can look in output trace:
The text was updated successfully, but these errors were encountered: