Closed lifubang closed 6 years ago
So if you restart mongo_db, the PG server also needs to restarted or you don't get any results from mongo_fdw tables? I haven't run into that issue before, i will try and reproduce the issue and try and get a fix prioritised asap.
yes, you are right. thanks. I will also try to fix this problem if I can.
pg使用mongo_fdw外部表时,如果外部mongo重启,则pg无法自动重连mongo,pg也必须重启。
mongo重启前,各种外部表查询都正常。
kill mongo服务器进程后,则无法查询,这个正常:
关键是mongo服务器重新启动后,查询还不正常:
pg的日志如下:
2016-06-28 01:18:33 UTC LOG: database system was interrupted; last known up at 2016-06-27 12:53:32 UTC 2016-06-28 01:18:33 UTC LOG: database system was not properly shut down; automatic recovery in progress 2016-06-28 01:18:33 UTC LOG: record with zero length at 0/3514218 2016-06-28 01:18:33 UTC LOG: redo is not required 2016-06-28 01:18:33 UTC LOG: database system is ready to accept connections 2016-06-28 01:18:33 UTC LOG: autovacuum launcher started 2016-06-28 01:19:23 UTC LOG: could not receive data from client: Connection reset by peer 2016-06-28 01:19:23 UTC LOG: could not receive data from client: Connection reset by peer 2016-06-28 01:19:23 UTC LOG: could not receive data from client: Connection reset by peer 2016-06-28 01:19:29 UTC LOG: could not receive data from client: Connection reset by peer WARNING: mongo_connect() is deprecated, please use mongo_client() 2016-06-28 01:20:21 UTC LOG: could not receive data from client: Connection reset by peer 2016-06-28 01:20:21 UTC LOG: could not receive data from client: Connection reset by peer
如果此时pg服务器也重启,则查询又正常了:
https://yq.aliyun.com/ask/31615?spm=5176.8067842.tagmain.15.au081j