使用PostgreSQL强制客户端断开连接 [英] Force client disconnect using PostgreSQL

查看:78
本文介绍了使用PostgreSQL强制客户端断开连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一种方法可以强制客户端与PostgreSQL断开连接?我正在寻找DB2的 强制全部应用

Is there a way to force clients to disconnect from PostgreSQL? I'm looking for the equivlent of DB2's force application all.

之所以喜欢在开发箱中执行此操作,是因为当我打开数据库控制台时,无法加载数据库转储。我必须先退出它们。

I'd like to do this on my development box because when I've got database consoles open, I can't load a database dump. I have to quit them first.

推荐答案

合并 pg_terminate_backend 函数和 pg_stat_activity 系统视图。

Combine pg_terminate_backend function and the pg_stat_activity system view.

这篇关于使用PostgreSQL强制客户端断开连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆