【问题标题】:Why am I not receiving this PG notification?为什么我没有收到此 PG 通知?
【发布时间】:2013-09-25 00:23:14
【问题描述】:

我使用rails dbconsole 打开了两个数据库控制台。我在他们两个中都发出了以下命令:

listen ninja;

而且,在第二个控制台中,我还写道:

notify ninja;

但是,只有第二个控制台会看到此通知:

NOTIFY
Asynchronous notification "ninja" received from server process with PID 16837.

为什么两个控制台都没有收到通知?有什么设置可以让他们都收到吗?

【问题讨论】:

    标签: postgresql


    【解决方案1】:

    我不知道 rails dbconsole,但是使用 psql 程序直到您下次执行命令时才会显示通知,因为通知是拉取的,而不是推送的,并且控制台不会不断轮询它们不活动。我假设 dbconsole 是相似的。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-09
    • 2020-06-02
    • 1970-01-01
    • 1970-01-01
    • 2012-01-01
    相关资源
    最近更新 更多