小编Kaj*_*nus的帖子

强制 PostgreSQL 客户端使用 SSL?

我已经配置ssl = onpostgresql.conf(并且安装了证书等等)。这是否确保所有客户端始终通过 SSL 连接?

(也就是说,ssl = on如果没有SSL 加密就无法连接吗?)

是否有其他方法可以确保所有客户端始终通过 SSL/TLS 进行连接?

postgresql

42
推荐指数
2
解决办法
2万
查看次数

MySQL 中继日志损坏,如何修复?尝试但失败

当机器突然关闭时,MySQL v5.1.61 中继被损坏。我试图修复它,但没有奏效。
- 我如何解决它?我做错什么了吗?

据我所知,损坏的 MySQL 中继日志很容易修复:

change master to master_log_file='<Relay_Master_Log_File>',
                 master_log_pos=<Exec_Master_Log_Pos>;
Run Code Online (Sandbox Code Playgroud)

其中Relay_Master_Log_FileExec_Master_Log_Pos由以下列出:
mysql> show slave status;

但是,当我这样做时change master status ...,我收到了主键违规错误。这怎么可能?上述程序是否不正确,或者例如缺少一些+1?

(现在我只是将 --master-data mysqldump 从主服务器重新导入到从服务器,这解决了问题。但是,在将来,这样做可能不合适。)


以下是有关我的特定问题的详细信息:

mysql> show slave status \G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: the-master-host
                  Master_User: replication
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000021
          Read_Master_Log_Pos: 33639968
               Relay_Log_File: mysql-relay-bin.000271
                Relay_Log_Pos: 2031587
        Relay_Master_Log_File: mysql-bin.000020
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
              Replicate_Do_DB: the_database
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 1594 …
Run Code Online (Sandbox Code Playgroud)

mysql replication corruption

30
推荐指数
2
解决办法
7万
查看次数

PostgreSQL 流复制损坏:无效幻数,乱序时间线 ID

出于某种原因,我的 PostgreSQL 从站不再流式复制主站上的更改。之前可以用,有段时间了,最​​近发现slave的数据库内容很旧,slave的日志文件有错误,分别是“无效幻数0000 ”和“乱序时间线ID 1(之后2) ”。

你知道我该如何解决这个问题吗?或者为什么会发生?

详情如下。

日志文件错误消息:(在从站上,pg_log/postgresql-Sat.log)

LOG:  entering standby mode
LOG:  redo starts at 0/1C78848
LOG:  consistent recovery state reached at 0/1C7FA30
LOG:  database system is ready to accept read only connections
LOG:  invalid magic number 0000 in log file 0, segment 1, offset 14942208
LOG:  streaming replication successfully connected to primary
LOG:  out-of-sequence timeline ID 1 (after 2) in log file 0, segment 1, offset 0
FATAL:  terminating walreceiver process due to administrator …
Run Code Online (Sandbox Code Playgroud)

postgresql replication

6
推荐指数
1
解决办法
4459
查看次数

标签 统计

postgresql ×2

replication ×2

corruption ×1

mysql ×1