PostgreSQL (pg_hba.conf / postgresql.conf) 与服务器的连接丢失。尝试重置:失败

PostgreSQL (pg_hba.conf / postgresql.conf) The connection to the server was lost. Attempting reset: Failed

我有一个 Postgres 的问题,其他人似乎已经找到了,但是以某种方式给出的解决方案对我不起作用。我解释:

我用什么

触发事件

我一直在毫无问题地进行查询,但其中一些使我的系统崩溃,这是其中一个示例

SELECT w2.id AS "id"
FROM weather w1
JOIN weather w2
    ON EXTRACT(DAY FROM CAST(w2.recorddate AS TIMESTAMP)-CAST(w1.recorddate AS TIMESTAMP)) = 1
        AND w2.temperature > w1.temperature;

错误

server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.

我试过 PgAdmin,它也崩溃了。

我检查过的东西

pg_hba.conf 文件

postgresql.conf 文件

当前设置

我回到了原来的默认设置,但现在我不确定是否一切正常

我的 pg_hba.conf 文件如下所示:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     trust
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust

我的postgresql.conf有以下设置

问题

关于在哪里查看、重新安装什么或做什么的任何建议?无法 运行 某些查询有点不舒服。

谢谢!

编辑 POSTGRES 日志

Process:               postgres [11542]
Path:                  /Users/USER/*/postgres
Identifier:            postgres
Version:               ???
Code Type:             X86-64 (Native)
Parent Process:        postgres [123]
Responsible:           postgres [123]
User ID:               502

Date/Time:             2020-09-06 14:06:05.972 -0700
OS Version:            Mac OS X 10.15.6 (19G2021)
Report Version:        12
Anonymous UUID:        C82E0E26-CE4B-F615-A561-84E475FEB121

Sleep/Wake UUID:       4B9FB152-7EE9-4D77-B3B3-909D1AD8479A

Time Awake Since Boot: 7500 seconds
Time Since Wake:       740 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes:       0x0000000000000032, 0x000000010453f000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Reason:    Namespace CODESIGNING, Code 0x2

kernel messages:

VM Regions Near 0x10453f000:
    __LINKEDIT             0000000104466000-000000010453f000 [  868K] r--/rw- SM=COW  /Users/USER/*/*.dylib
--> VM_ALLOCATE            000000010453f000-0000000104543000 [   16K] r-x/rwx SM=COW  
    __TEXT                 0000000104544000-0000000104562000 [  120K] r-x/rwx SM=COW  /Users/USER/*/*.dylib

Application Specific Information:
crashed on child side of fork pre-exec

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   ???                             0x000000010453f000 0 + 4367577088
1   postmaster                      0x00000001035841c6 ExecScan + 582 (execScan.c:239)
2   postmaster                      0x00000001035a5270 ExecSort + 240 (nodeSort.c:109)
3   postmaster                      0x000000010359e581 ExecMergeJoin + 241 (nodeMergejoin.c:657)
4   postmaster                      0x000000010359e581 ExecMergeJoin + 241 (nodeMergejoin.c:657)
5   postmaster                      0x00000001035a5270 ExecSort + 240 (nodeSort.c:109)
6   postmaster                      0x00000001035a654d ExecGroup + 109 (nodeGroup.c:70)
7   postmaster                      0x000000010357c3bf standard_ExecutorRun + 287 (execMain.c:364)
8   postmaster                      0x00000001036e1963 PortalRunSelect + 243 (pquery.c:931)
9   postmaster                      0x00000001036e153e PortalRun + 430 (pquery.c:770)
10  postmaster                      0x00000001036e0585 exec_simple_query + 1445 (postgres.c:1223)
11  postmaster                      0x00000001036de40d PostgresMain + 3917 (postgres.c:4249)
12  postmaster                      0x000000010365ee28 PostmasterMain + 7832 (postmaster.c:1377)
13  postmaster                      0x00000001035cbbce main + 1678
14  libdyld.dylib                   0x00007fff6b701cc9 start + 1

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x000000010453f000  rbx: 0x00007fc79682d4c0  rcx: 0x0000000106f818d8  rdx: 0x00007ffeec82e5e7
  rdi: 0x00007fc79682d578  rsi: 0x00007fc79682d1a0  rbp: 0x00007ffeec82e610  rsp: 0x00007ffeec82e5b8
   r8: 0x0000000000016d3d   r9: 0xffffffff00000000  r10: 0x0000000106f818d0  r11: 0x00007fc799288730
  r12: 0x00007fc79682d578  r13: 0x00007fc79682be00  r14: 0x00007fc79682d1a0  r15: 0x0000000103a3c240
  rip: 0x000000010453f000  rfl: 0x0000000000010246  cr2: 0x000000010453f000
  
Logical CPU:     0
Error Code:      0x00000015 (invalid protections for user instruction read)
Trap Number:     14

这看起来像 known issue,其中 JIT 代码未正确签名并在 MacOS 上触发安全错误。我认为这个问题的修复已经发布,所以我不知道为什么你仍然会在 12.4 上看到它,但无论如何关闭 jit=off 应该可以解决这个问题。