小编Aja*_*tap的帖子

即使客户端死了,Postgres也不会停止连接

我有一个使用Postgres 9.3的Java Web应用程序。每当Web服务器启动时,它都会使用以下查询获取数据库锁定:

select pg_try_advisory_lock(100);
Run Code Online (Sandbox Code Playgroud)

但是,当我停止服务器时,它不会释放它先前获得的互斥锁

  postgres=# SELECT pl.pid,datname,mode, state FROM pg_locks pl LEFT JOIN pg_stat_activity psa  ON pl.pid = psa.pid;
  pid  |       datname        |      mode       | state  
-------+----------------------+-----------------+--------
  5217 | postgres             | AccessShareLock | active
  5217 | postgres             | AccessShareLock | active
  5217 | postgres             | ExclusiveLock   | active
  5217 | postgres             | AccessShareLock | active
  5217 | postgres             | AccessShareLock | active
  5217 | postgres             | AccessShareLock | active
  5217 | postgres             | AccessShareLock | active …
Run Code Online (Sandbox Code Playgroud)

java postgresql centos postgresql-9.3

5
推荐指数
0
解决办法
173
查看次数

如何将事件从父窗口发送到其子窗口?

我想从父窗口发送一些事件/数据到它的子窗口。我怎么能这样做?

我试过postMessage,但没有用。

html javascript postmessage dom-events

3
推荐指数
1
解决办法
2618
查看次数