实验过程如下:

启动一个客户端:

[postgres@cnrd56 bin]$ ./psql
psql (9.1.2)
Type "help" for help. postgres=# begin;
BEGIN
postgres=# select count(*), pg_sleep(1000) from test;

然后强制停止:

pg_ctl stop -m f  -D /usr/local/pgsql/data

此时在客户端出现如下信息:

FATAL:  terminating connection due to administrator command
The connection to the server was lost. Attempting reset: Failed.
!>

再看后台的log:

2013-07-14 10:17:17.280 CST,,,3422,,51e209eb.d5e,2,,2013-07-14 10:16:11 CST,,0,LOG,00000,"received fast shutdown request",,,,,,,,,""
2013-07-14 10:17:17.280 CST,,,3422,,51e209eb.d5e,3,,2013-07-14 10:16:11 CST,,0,LOG,00000,"aborting any active transactions",,,,,,,,,""
2013-07-14 10:17:17.280 CST,,,3427,,51e209ec.d63,2,,2013-07-14 10:16:12 CST,1/0,0,LOG,00000,"autovacuum launcher shutting down",,,,,,,,,""
2013-07-14 10:17:17.280 CST,"postgres","postgres",3431,"[local]",51e209ff.d67,1,"SELECT",2013-07-14 10:16:31 CST,2/2,0,FATAL,57P01,"terminating connection due to administrator command",,,,,,"select count(*), pg_sleep(1000) from test;",,,"psql"
2013-07-14 10:17:17.281 CST,,,3425,,51e209ec.d61,1,,2013-07-14 10:16:12 CST,,0,LOG,00000,"shutting down",,,,,,,,,""
2013-07-14 10:17:17.281 CST,"postgres","postgres",3435,"[local]",51e20a2d.d6b,1,"",2013-07-14 10:17:17 CST,,0,FATAL,57P03,"the database system is shutting down",,,,,,,,,""
2013-07-14 10:17:17.284 CST,,,3425,,51e209ec.d61,2,,2013-07-14 10:16:12 CST,,0,LOG,00000,"database system is shut down",,,,,,,,,""

其中的:

2013-07-14 10:17:17.280 CST,"postgres","postgres",3431,"[local]",51e209ff.d67,1,"SELECT",2013-07-14 10:16:31 CST,2/2,0,FATAL,57P01,"terminating connection due to administrator command",,,,,,"select count(*), pg_sleep(1000) from test;",,,"psql"

表明,客户端正在执行sql文 select count(*), pg_sleep(1000) from test的时候,

收到了 "terminating connection due to administrator command" 命令。

最新文章

  1. 学习笔记-Java编程思想
  2. jQuery将悬停效果加到菜单项
  3. Asp.net Ibatis 增、删、改、查
  4. Uva10635 LCS
  5. TortoiseGit 连接每次都要输入用户名和密码
  6. C#.net时间戳转换
  7. Box model小心得
  8. STL中istream_iterator和ostream_iterator的基本用法
  9. web之ios开关按钮
  10. Sublime 插件安装、常用配置
  11. React的学习(下)
  12. swift3.0 coreData的使用-日记本demo
  13. JS网页特效操作流程——下拉菜单列表与登录注册弹窗效果
  14. 【Uva10559】Blocks(区间DP)
  15. [SHOI2012]随机树
  16. 框架中的导航框架 & position定位
  17. Orleans学习总结(四)--集群配置篇
  18. ElasticSearch 从零到入门
  19. 好用的firefox浏览器、geckodriver驱动的版本组合(55 和 0.19.1)
  20. cocos2dx 3.13 simulator的问题

热门文章

  1. RDoc
  2. android操作SQLite
  3. LoadRunner error -27728
  4. Worm
  5. 如何配置仿真器DM8127+SEED-XDS560v2PLUS和连接不上的问题的解决
  6. Java线程同步_1
  7. activity切换时的overridePendingTransition动画效
  8. SAS、R以及SPSS的比较__统计语言大战
  9. web前端笔试题
  10. 使用VMware10虚拟机安装Linux系统(能力工场)