---
title: "postgresql远程连接隔夜断连"
author: "johnsmith9th"
date: "2026-07-24T10:15:22Z"
tags: []
categories: ["数据库"]
slug: "postgresql"
draft: false
lastmod: "2026-07-24T10:15:22Z"
id: 2540567
url: "https://johnsmith9th.iteye.com/blog/2540567"
---

可能是SELinux做的局。

1\. sudo setenforce 0

2. sudo setsebool -P selinuxuser\_postgresql\_connect\_enabled 1

3\. sudo setenforce 1