当前位置: 首页 > news >正文

PostgreSQL 三种关库模式

PostgreSQL 三种关库模式

基础信息
OS版本:Red Hat Enterprise Linux Server release 7.9 (Maipo)
DB版本:16.2
pg软件目录:/home/pg16/soft
pg数据目录:/home/pg16/data
端口:5777

PostgreSQL 提供了三种关库模式,分别是 Smart ShutdownFast ShutdownImmediate Shutdown。以下是每种模式的详细说明:

  1. Smart Shutdown
    • 这种模式下,数据库会等待所有活跃的客户端连接断开后才会停止。
    • 如果用户一直不断开连接,服务器将无法停止。
    • 使用 pg_ctl 命令的示例如下:
      pg_ctl stop -m smart
      

输出日志

2024-11-27 06:01:14.149 PST [127700] DEBUG:  postmaster received shutdown request signal
2024-11-27 06:01:14.149 PST [127700] LOG:  received smart shutdown request
2024-11-27 06:01:14.150 PST [127700] DEBUG:  sending signal 15 to process 127708
2024-11-27 06:01:14.150 PST [127708] DEBUG:  logical replication launcher shutting down
2024-11-27 06:01:14.150 PST [127706] DEBUG:  autovacuum launcher shutting down
2024-11-27 06:01:14.150 PST [127708] DEBUG:  shmem_exit(1): 5 before_shmem_exit callbacks to make
2024-11-27 06:01:14.150 PST [127706] DEBUG:  shmem_exit(0): 4 before_shmem_exit callbacks to make
2024-11-27 06:01:14.150 PST [127708] DEBUG:  shmem_exit(1): 6 on_shmem_exit callbacks to make
2024-11-27 06:01:14.150 PST [127708] DEBUG:  proc_exit(1): 1 callbacks to make
2024-11-27 06:01:14.150 PST [127708] DEBUG:  exit(1)
2024-11-27 06:01:14.150 PST [127708] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:01:14.150 PST [127708] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:01:14.150 PST [127708] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:01:14.150 PST [127705] DEBUG:  shmem_exit(0): 4 before_shmem_exit callbacks to make
2024-11-27 06:01:14.151 PST [127705] DEBUG:  shmem_exit(0): 5 on_shmem_exit callbacks to make
2024-11-27 06:01:14.151 PST [127705] DEBUG:  proc_exit(0): 1 callbacks to make
2024-11-27 06:01:14.151 PST [127705] DEBUG:  exit(0)
2024-11-27 06:01:14.151 PST [127705] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:01:14.151 PST [127705] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:01:14.151 PST [127705] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:01:14.151 PST [127706] DEBUG:  shmem_exit(0): 6 on_shmem_exit callbacks to make
2024-11-27 06:01:14.151 PST [127706] DEBUG:  proc_exit(0): 1 callbacks to make
2024-11-27 06:01:14.151 PST [127706] DEBUG:  exit(0)
2024-11-27 06:01:14.151 PST [127706] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:01:14.151 PST [127706] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:01:14.151 PST [127706] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:01:14.151 PST [127700] DEBUG:  reaping dead processes
2024-11-27 06:01:14.151 PST [127700] LOG:  background worker "logical replication launcher" (PID 127708) exited with exit code 1
2024-11-27 06:01:14.151 PST [127703] DEBUG:  shmem_exit(0): 4 before_shmem_exit callbacks to make
2024-11-27 06:01:14.151 PST [127703] DEBUG:  shmem_exit(0): 5 on_shmem_exit callbacks to make
2024-11-27 06:01:14.151 PST [127703] DEBUG:  proc_exit(0): 1 callbacks to make
2024-11-27 06:01:14.151 PST [127703] DEBUG:  exit(0)
2024-11-27 06:01:14.151 PST [127703] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:01:14.151 PST [127703] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:01:14.151 PST [127703] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:01:14.151 PST [127700] DEBUG:  reaping dead processes
2024-11-27 06:01:14.152 PST [127700] DEBUG:  reaping dead processes
2024-11-27 06:01:14.152 PST [127702] LOG:  shutting down
2024-11-27 06:01:14.178 PST [127707] DEBUG:  executing archive command "test ! -f /home/pg16/archivelog/00000001000000040000002F && cp pg_wal/00000001000000040000002F /home/pg16/archivelog/00000001000000040000002F"
2024-11-27 06:01:14.178 PST [127702] LOG:  checkpoint starting: shutdown immediate
2024-11-27 06:01:14.178 PST [127702] DEBUG:  performing replication slot checkpoint
2024-11-27 06:01:14.181 PST [127702] DEBUG:  attempting to remove WAL segments older than log file 00000000000000040000002F
2024-11-27 06:01:14.182 PST [127702] DEBUG:  SlruScanDirectory invoking callback on pg_subtrans/005C
2024-11-27 06:01:14.182 PST [127702] LOG:  checkpoint complete: wrote 0 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.004 s; sync files=0, longest=0.000 s, average=0.000 s; distance=16383 kB, estimate=16383 kB; lsn=4/30000028, redo lsn=4/30000028
2024-11-27 06:01:14.182 PST [127702] DEBUG:  shmem_exit(0): 5 before_shmem_exit callbacks to make
2024-11-27 06:01:14.182 PST [127702] DEBUG:  writing stats file "pg_stat/pgstat.stat"
2024-11-27 06:01:14.182 PST [127702] DEBUG:  shmem_exit(0): 5 on_shmem_exit callbacks to make
2024-11-27 06:01:14.182 PST [127702] DEBUG:  proc_exit(0): 1 callbacks to make
2024-11-27 06:01:14.182 PST [127702] DEBUG:  exit(0)
2024-11-27 06:01:14.182 PST [127702] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:01:14.182 PST [127702] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:01:14.182 PST [127702] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:01:14.183 PST [127700] DEBUG:  reaping dead processes
2024-11-27 06:01:14.196 PST [127707] DEBUG:  archived write-ahead log file "00000001000000040000002F"
2024-11-27 06:01:14.197 PST [127707] DEBUG:  shmem_exit(0): 5 before_shmem_exit callbacks to make
2024-11-27 06:01:14.197 PST [127707] DEBUG:  archiver process shutting down
2024-11-27 06:01:14.197 PST [127707] DEBUG:  shmem_exit(0): 6 on_shmem_exit callbacks to make
2024-11-27 06:01:14.197 PST [127707] DEBUG:  proc_exit(0): 1 callbacks to make
2024-11-27 06:01:14.197 PST [127707] DEBUG:  exit(0)
2024-11-27 06:01:14.197 PST [127707] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:01:14.197 PST [127707] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:01:14.197 PST [127707] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:01:14.202 PST [127700] DEBUG:  reaping dead processes
2024-11-27 06:01:14.202 PST [127700] DEBUG:  shmem_exit(0): 0 before_shmem_exit callbacks to make
2024-11-27 06:01:14.202 PST [127700] DEBUG:  shmem_exit(0): 6 on_shmem_exit callbacks to make
2024-11-27 06:01:14.205 PST [127700] DEBUG:  cleaning up orphaned dynamic shared memory with ID 210471318
2024-11-27 06:01:14.205 PST [127700] DEBUG:  cleaning up dynamic shared memory control segment with ID 4077101978
2024-11-27 06:01:14.205 PST [127700] DEBUG:  proc_exit(0): 2 callbacks to make
2024-11-27 06:01:14.206 PST [127700] LOG:  database system is shut down
2024-11-27 06:01:14.206 PST [127700] DEBUG:  exit(0)
2024-11-27 06:01:14.206 PST [127700] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:01:14.206 PST [127700] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:01:14.206 PST [127700] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:01:14.207 PST [127701] DEBUG:  logger shutting down
2024-11-27 06:01:14.207 PST [127701] DEBUG:  shmem_exit(0): 0 before_shmem_exit callbacks to make
2024-11-27 06:01:14.207 PST [127701] DEBUG:  shmem_exit(0): 0 on_shmem_exit callbacks to make
2024-11-27 06:01:14.207 PST [127701] DEBUG:  proc_exit(0): 0 callbacks to make
2024-11-27 06:01:14.207 PST [127701] DEBUG:  exit(0)
2024-11-27 06:01:14.207 PST [127701] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:01:14.208 PST [127701] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:01:14.208 PST [127701] DEBUG:  proc_exit(-1): 0 callbacks to make
  1. Fast Shutdown(默认方式)
    • 快速关闭模式,不再允许新的连接。
    • 向所有活跃的服务进程发送 SIGTERM 信号,让它们立即退出,然后等待所有子进程退出并关闭数据库。
    • 如果服务处于在线备份状态,将直接终止备份,这将导致此次备份失败。
    • 使用 pg_ctl 命令的示例如下:
      pg_ctl stop -m fast
      

输出日志

2024-11-27 06:02:17.051 PST [127815] DEBUG:  postmaster received shutdown request signal
2024-11-27 06:02:17.051 PST [127815] LOG:  received fast shutdown request
2024-11-27 06:02:17.052 PST [127815] LOG:  aborting any active transactions
2024-11-27 06:02:17.052 PST [127815] DEBUG:  sending signal 15 to process 127823
2024-11-27 06:02:17.052 PST [127818] DEBUG:  shmem_exit(0): 4 before_shmem_exit callbacks to make
2024-11-27 06:02:17.052 PST [127821] DEBUG:  autovacuum launcher shutting down
2024-11-27 06:02:17.052 PST [127818] DEBUG:  shmem_exit(0): 5 on_shmem_exit callbacks to make
2024-11-27 06:02:17.052 PST [127821] DEBUG:  shmem_exit(0): 4 before_shmem_exit callbacks to make
2024-11-27 06:02:17.052 PST [127818] DEBUG:  proc_exit(0): 1 callbacks to make
2024-11-27 06:02:17.052 PST [127818] DEBUG:  exit(0)
2024-11-27 06:02:17.052 PST [127818] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:02:17.052 PST [127818] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:02:17.052 PST [127818] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:02:17.052 PST [127821] DEBUG:  shmem_exit(0): 6 on_shmem_exit callbacks to make
2024-11-27 06:02:17.052 PST [127821] DEBUG:  proc_exit(0): 1 callbacks to make
2024-11-27 06:02:17.052 PST [127821] DEBUG:  exit(0)
2024-11-27 06:02:17.052 PST [127821] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:02:17.052 PST [127821] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:02:17.052 PST [127821] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:02:17.053 PST [127823] DEBUG:  logical replication launcher shutting down
2024-11-27 06:02:17.053 PST [127823] DEBUG:  shmem_exit(1): 5 before_shmem_exit callbacks to make
2024-11-27 06:02:17.053 PST [127823] DEBUG:  shmem_exit(1): 6 on_shmem_exit callbacks to make
2024-11-27 06:02:17.053 PST [127823] DEBUG:  proc_exit(1): 1 callbacks to make
2024-11-27 06:02:17.053 PST [127823] DEBUG:  exit(1)
2024-11-27 06:02:17.053 PST [127823] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:02:17.053 PST [127823] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:02:17.053 PST [127823] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:02:17.053 PST [127820] DEBUG:  shmem_exit(0): 4 before_shmem_exit callbacks to make
2024-11-27 06:02:17.053 PST [127815] DEBUG:  reaping dead processes
2024-11-27 06:02:17.053 PST [127820] DEBUG:  shmem_exit(0): 5 on_shmem_exit callbacks to make
2024-11-27 06:02:17.053 PST [127820] DEBUG:  proc_exit(0): 1 callbacks to make
2024-11-27 06:02:17.053 PST [127820] DEBUG:  exit(0)
2024-11-27 06:02:17.053 PST [127820] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:02:17.053 PST [127820] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:02:17.053 PST [127820] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:02:17.053 PST [127815] DEBUG:  reaping dead processes
2024-11-27 06:02:17.053 PST [127815] LOG:  background worker "logical replication launcher" (PID 127823) exited with exit code 1
2024-11-27 06:02:17.053 PST [127815] DEBUG:  reaping dead processes
2024-11-27 06:02:17.053 PST [127817] LOG:  shutting down
2024-11-27 06:02:17.086 PST [127822] DEBUG:  executing archive command "test ! -f /home/pg16/archivelog/000000010000000400000030 && cp pg_wal/000000010000000400000030 /home/pg16/archivelog/000000010000000400000030"
2024-11-27 06:02:17.086 PST [127817] LOG:  checkpoint starting: shutdown immediate
2024-11-27 06:02:17.087 PST [127817] DEBUG:  performing replication slot checkpoint
2024-11-27 06:02:17.089 PST [127817] DEBUG:  checkpoint sync: number=1 file=pg_xact/0005 time=0.618 ms
2024-11-27 06:02:17.090 PST [127817] DEBUG:  checkpoint sync: number=2 file=pg_multixact/offsets/0000 time=0.175 ms
2024-11-27 06:02:17.090 PST [127817] DEBUG:  attempting to remove WAL segments older than log file 000000000000000400000030
2024-11-27 06:02:17.090 PST [127817] DEBUG:  removing write-ahead log file "00000001000000040000002F"
2024-11-27 06:02:17.093 PST [127817] DEBUG:  SlruScanDirectory invoking callback on pg_subtrans/005C
2024-11-27 06:02:17.093 PST [127817] LOG:  checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 1 removed, 0 recycled; write=0.001 s, sync=0.001 s, total=0.008 s; sync files=2, longest=0.001 s, average=0.001 s; distance=16384 kB, estimate=16384 kB; lsn=4/31000028, redo lsn=4/31000028
2024-11-27 06:02:17.093 PST [127817] DEBUG:  shmem_exit(0): 5 before_shmem_exit callbacks to make
2024-11-27 06:02:17.093 PST [127817] DEBUG:  writing stats file "pg_stat/pgstat.stat"
2024-11-27 06:02:17.093 PST [127817] DEBUG:  shmem_exit(0): 5 on_shmem_exit callbacks to make
2024-11-27 06:02:17.093 PST [127817] DEBUG:  proc_exit(0): 1 callbacks to make
2024-11-27 06:02:17.093 PST [127817] DEBUG:  exit(0)
2024-11-27 06:02:17.094 PST [127817] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:02:17.094 PST [127817] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:02:17.094 PST [127817] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:02:17.095 PST [127815] DEBUG:  reaping dead processes
2024-11-27 06:02:17.102 PST [127822] DEBUG:  archived write-ahead log file "000000010000000400000030"
2024-11-27 06:02:17.102 PST [127822] DEBUG:  shmem_exit(0): 5 before_shmem_exit callbacks to make
2024-11-27 06:02:17.102 PST [127822] DEBUG:  archiver process shutting down
2024-11-27 06:02:17.102 PST [127822] DEBUG:  shmem_exit(0): 6 on_shmem_exit callbacks to make
2024-11-27 06:02:17.102 PST [127822] DEBUG:  proc_exit(0): 1 callbacks to make
2024-11-27 06:02:17.102 PST [127822] DEBUG:  exit(0)
2024-11-27 06:02:17.102 PST [127822] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:02:17.102 PST [127822] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:02:17.102 PST [127822] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:02:17.102 PST [127815] DEBUG:  reaping dead processes
2024-11-27 06:02:17.102 PST [127815] DEBUG:  shmem_exit(0): 0 before_shmem_exit callbacks to make
2024-11-27 06:02:17.103 PST [127815] DEBUG:  shmem_exit(0): 6 on_shmem_exit callbacks to make
2024-11-27 06:02:17.105 PST [127815] DEBUG:  cleaning up orphaned dynamic shared memory with ID 2186499264
2024-11-27 06:02:17.106 PST [127815] DEBUG:  cleaning up dynamic shared memory control segment with ID 3559701182
2024-11-27 06:02:17.106 PST [127815] DEBUG:  proc_exit(0): 2 callbacks to make
2024-11-27 06:02:17.106 PST [127815] LOG:  database system is shut down
2024-11-27 06:02:17.106 PST [127815] DEBUG:  exit(0)
2024-11-27 06:02:17.106 PST [127815] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:02:17.106 PST [127815] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:02:17.106 PST [127815] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 06:02:17.106 PST [127816] DEBUG:  logger shutting down
2024-11-27 06:02:17.107 PST [127816] DEBUG:  shmem_exit(0): 0 before_shmem_exit callbacks to make
2024-11-27 06:02:17.107 PST [127816] DEBUG:  shmem_exit(0): 0 on_shmem_exit callbacks to make
2024-11-27 06:02:17.107 PST [127816] DEBUG:  proc_exit(0): 0 callbacks to make
2024-11-27 06:02:17.107 PST [127816] DEBUG:  exit(0)
2024-11-27 06:02:17.107 PST [127816] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 06:02:17.107 PST [127816] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 06:02:17.107 PST [127816] DEBUG:  proc_exit(-1): 0 callbacks to make
  1. Immediate Shutdown
    • 立即关闭模式,主进程 postgres 向所有子进程发送 SIGQUIT 信号,并且立即退出,所有的子进程也会立即退出。
    • 采用这种模式退出时,并不会妥善地关闭数据库系统,下次启动时数据库会重放 WAL 日志进行恢复,因此建议只在紧急的时候使用该方法。
    • 使用 pg_ctl 命令的示例如下:
      pg_ctl stop -m immediate
      

输出日志

2024-11-27 05:58:21.525 PST [127387] DEBUG:  postmaster received shutdown request signal
2024-11-27 05:58:21.525 PST [127387] LOG:  received immediate shutdown request
2024-11-27 05:58:21.526 PST [127387] DEBUG:  sending signal 3 to process 127395
2024-11-27 05:58:21.526 PST [127387] DEBUG:  reaping dead processes
2024-11-27 05:58:21.526 PST [127387] DEBUG:  reaping dead processes
2024-11-27 05:58:21.527 PST [127387] DEBUG:  reaping dead processes
2024-11-27 05:58:21.527 PST [127387] DEBUG:  shmem_exit(0): 0 before_shmem_exit callbacks to make
2024-11-27 05:58:21.527 PST [127387] DEBUG:  shmem_exit(0): 6 on_shmem_exit callbacks to make
2024-11-27 05:58:21.531 PST [127387] DEBUG:  cleaning up orphaned dynamic shared memory with ID 2800411074
2024-11-27 05:58:21.531 PST [127387] DEBUG:  cleaning up dynamic shared memory control segment with ID 3983505204
2024-11-27 05:58:21.532 PST [127387] DEBUG:  proc_exit(0): 2 callbacks to make
2024-11-27 05:58:21.532 PST [127387] LOG:  database system is shut down
2024-11-27 05:58:21.532 PST [127387] DEBUG:  exit(0)
2024-11-27 05:58:21.532 PST [127387] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 05:58:21.532 PST [127387] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 05:58:21.532 PST [127387] DEBUG:  proc_exit(-1): 0 callbacks to make
2024-11-27 05:58:21.532 PST [127388] DEBUG:  logger shutting down
2024-11-27 05:58:21.532 PST [127388] DEBUG:  shmem_exit(0): 0 before_shmem_exit callbacks to make
2024-11-27 05:58:21.532 PST [127388] DEBUG:  shmem_exit(0): 0 on_shmem_exit callbacks to make
2024-11-27 05:58:21.532 PST [127388] DEBUG:  proc_exit(0): 0 callbacks to make
2024-11-27 05:58:21.532 PST [127388] DEBUG:  exit(0)
2024-11-27 05:58:21.533 PST [127388] DEBUG:  shmem_exit(-1): 0 before_shmem_exit callbacks to make
2024-11-27 05:58:21.533 PST [127388] DEBUG:  shmem_exit(-1): 0 on_shmem_exit callbacks to make
2024-11-27 05:58:21.533 PST [127388] DEBUG:  proc_exit(-1): 0 callbacks to make

这些模式分别对应不同的信号:

  • SIGTERM 对应 Smart Shutdown
  • SIGINT 对应 Fast Shutdown
  • SIGQUIT 对应 Immediate Shutdown

SIGINT 信号

[pg16@test ~]$ ps -ef |grep postgre
pg16      38940      1  0 05:32 ?        00:00:00 /home/pg16/soft/bin/postgres
pg16      38941  38940  0 05:32 ?        00:00:00 postgres: logger 
pg16      38942  38940  0 05:32 ?        00:00:00 postgres: checkpointer 
pg16      38943  38940  0 05:32 ?        00:00:00 postgres: background writer 
pg16      38945  38940  0 05:32 ?        00:00:00 postgres: walwriter 
pg16      38946  38940  0 05:32 ?        00:00:00 postgres: autovacuum launcher
pg16      38947  38940  0 05:32 ?        00:00:00 postgres: archiver 
pg16      38948  38940  0 05:32 ?        00:00:00 postgres: logical replication launcher
pg16      38954  38549  0 05:32 pts/2    00:00:00 grep --color=auto postgre
[pg16@test ~]$ pg_ctl stop -m fast[root@test ~]# gdb -p 38940
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 38940
Reading symbols from /home/pg16/soft/bin/postgres...(no debugging symbols found)...done.
Reading symbols from /lib64/libz.so.1...Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libicui18n.so.50...Reading symbols from /lib64/libicui18n.so.50...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libicui18n.so.50
Reading symbols from /lib64/libicuuc.so.50...Reading symbols from /lib64/libicuuc.so.50...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libicuuc.so.50
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libstdc++.so.6
Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgcc_s.so.1
Reading symbols from /lib64/libicudata.so.50...Reading symbols from /lib64/libicudata.so.50...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libicudata.so.50
Reading symbols from /home/pg16/soft/lib/postgresql/pg_stat_statements.so...(no debugging symbols found)...done.
Loaded symbols for /home/pg16/soft/lib/postgresql/pg_stat_statements.so
0x00007f7f25563f23 in __epoll_wait_nocancel () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-317.el7.x86_64 libgcc-4.8.5-44.el7.x86_64 libicu-50.2-4.el7_7.x86_64 libstdc++-4.8.5-44.el7.x86_64 zlib-1.2.7-18.el7.x86_64
(gdb) c handle_sigterm
Not stopped at any breakpoint; argument ignored.
Continuing.
cProgram received signal SIGINT, Interrupt.
0x00007f7f25563f23 in __epoll_wait_nocancel () from /lib64/libc.so.6
(gdb) c
Continuing.
c

SIGTERM 信号

[pg16@test ~]$ ps -ef |grep postgre    
pg16      38824      1  0 05:30 ?        00:00:00 /home/pg16/soft/bin/postgres
pg16      38825  38824  0 05:30 ?        00:00:00 postgres: logger 
pg16      38826  38824  0 05:30 ?        00:00:00 postgres: checkpointer 
pg16      38827  38824  0 05:30 ?        00:00:00 postgres: background writer 
pg16      38829  38824  0 05:30 ?        00:00:00 postgres: walwriter 
pg16      38830  38824  0 05:30 ?        00:00:00 postgres: autovacuum launcher
pg16      38831  38824  0 05:30 ?        00:00:00 postgres: archiver 
pg16      38832  38824  0 05:30 ?        00:00:00 postgres: logical replication launcher
pg16      38837  38549  0 05:30 pts/2    00:00:00 grep --color=auto postgre
[pg16@test ~]$ pg_ctl stop -m smart[root@test ~]# gdb -p 38824
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 38824
Reading symbols from /home/pg16/soft/bin/postgres...(no debugging symbols found)...done.
Reading symbols from /lib64/libz.so.1...Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libicui18n.so.50...Reading symbols from /lib64/libicui18n.so.50...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libicui18n.so.50
Reading symbols from /lib64/libicuuc.so.50...Reading symbols from /lib64/libicuuc.so.50...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libicuuc.so.50
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libstdc++.so.6
Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgcc_s.so.1
Reading symbols from /lib64/libicudata.so.50...Reading symbols from /lib64/libicudata.so.50...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libicudata.so.50
Reading symbols from /home/pg16/soft/lib/postgresql/pg_stat_statements.so...(no debugging symbols found)...done.
Loaded symbols for /home/pg16/soft/lib/postgresql/pg_stat_statements.so
0x00007fa33364bf23 in __epoll_wait_nocancel () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-317.el7.x86_64 libgcc-4.8.5-44.el7.x86_64 libicu-50.2-4.el7_7.x86_64 libstdc++-4.8.5-44.el7.x86_64 zlib-1.2.7-18.el7.x86_64
(gdb) c handle_sigterm
Not stopped at any breakpoint; argument ignored.
Continuing.
cProgram received signal SIGTERM, Terminated.
0x00007fa33364bf23 in __epoll_wait_nocancel () from /lib64/libc.so.6
(gdb) c
Continuing.
[Inferior 1 (process 38824) exited normally]

SIGQUIT信号

[pg16@test ~]$ ps -ef |grep postgre
pg16      38603      1  0 05:28 ?        00:00:00 /home/pg16/soft/bin/postgres
pg16      38604  38603  0 05:28 ?        00:00:00 postgres: logger 
pg16      38605  38603  0 05:28 ?        00:00:00 postgres: checkpointer 
pg16      38606  38603  0 05:28 ?        00:00:00 postgres: background writer 
pg16      38608  38603  0 05:28 ?        00:00:00 postgres: walwriter 
pg16      38609  38603  0 05:28 ?        00:00:00 postgres: autovacuum launcher
pg16      38610  38603  0 05:28 ?        00:00:00 postgres: archiver 
pg16      38611  38603  0 05:28 ?        00:00:00 postgres: logical replication launcher
pg16      38670  38549  0 05:28 pts/2    00:00:00 grep --color=auto postgre
[pg16@test ~]$ pg_ctl stop -m immediate[root@test ~]# gdb -p 38603
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Attaching to process 38603
Reading symbols from /home/pg16/soft/bin/postgres...(no debugging symbols found)...done.
Reading symbols from /lib64/libz.so.1...Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /lib64/libicui18n.so.50...Reading symbols from /lib64/libicui18n.so.50...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libicui18n.so.50
Reading symbols from /lib64/libicuuc.so.50...Reading symbols from /lib64/libicuuc.so.50...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libicuuc.so.50
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /lib64/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libstdc++.so.6
Reading symbols from /lib64/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libgcc_s.so.1
Reading symbols from /lib64/libicudata.so.50...Reading symbols from /lib64/libicudata.so.50...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Loaded symbols for /lib64/libicudata.so.50
Reading symbols from /home/pg16/soft/lib/postgresql/pg_stat_statements.so...(no debugging symbols found)...done.
Loaded symbols for /home/pg16/soft/lib/postgresql/pg_stat_statements.so
0x00007fac7f847f23 in __epoll_wait_nocancel () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-317.el7.x86_64 libgcc-4.8.5-44.el7.x86_64 libicu-50.2-4.el7_7.x86_64 libstdc++-4.8.5-44.el7.x86_64 zlib-1.2.7-18.el7.x86_64
(gdb) c handle_sigterm
Not stopped at any breakpoint; argument ignored.
Continuing.
cProgram received signal SIGQUIT, Quit.
0x00007fac7f847f23 in __epoll_wait_nocancel () from /lib64/libc.so.6
(gdb) c
Continuing.
[Inferior 1 (process 38603) exited normally]

通过这些不同的关机模式,可以根据具体需求选择合适的关机方式。

相关文章:

PostgreSQL 三种关库模式

PostgreSQL 三种关库模式 基础信息 OS版本&#xff1a;Red Hat Enterprise Linux Server release 7.9 (Maipo) DB版本&#xff1a;16.2 pg软件目录&#xff1a;/home/pg16/soft pg数据目录&#xff1a;/home/pg16/data 端口&#xff1a;5777PostgreSQL 提供了三种关库模式&…...

《运放秘籍》第二部:仪表放大器专项知识点总结

一、差分放大器与仪表放大器的讨论 1.1. 仪放的前世今生——差分放大器原理&#xff1f; 1.2. 差分放大的原理 1.3. 差分放大器检测电流 1.4. 差分放大器端一&#xff1a;输入阻抗 1.5. 差分放大器端二&#xff1a;共模抑制比 1.6. 为什么关注输入阻抗&#xff1f;共模抑…...

C++STL之vector(超详细)

CSTL之vector 1.vector基本介绍2.vector重要接口2.1.构造函数2.2.迭代器2.3.空间2.3.1.resize2.3.2.capacity 2.4.增删查找 3.迭代器失效4.迭代器分类 &#x1f31f;&#x1f31f;hello&#xff0c;各位读者大大们你们好呀&#x1f31f;&#x1f31f; &#x1f680;&#x1f68…...

ubuntu环境下安装electron环境,并快速打包

1.配置镜像源 关闭防火墙&#xff0c;命令&#xff1a;sudo ufw disable 1.1配置国内镜像源&#xff1a; vim /etc/apt/source.list deb https://mirrors.aliyun.com/ubuntu/ jammy main restricted universe multiversedeb-src https://mirrors.aliyun.com/ubuntu/ jammy main…...

【Pytorch】优化器(Optimizer)模块‘torch.optim’

torch.optim 是 PyTorch 中提供的优化器&#xff08;Optimizer&#xff09;模块&#xff0c;用于优化神经网络模型的参数&#xff0c;更新网络权重&#xff0c;使得模型在训练过程中最小化损失函数。它提供了多种常见的优化算法&#xff0c;如 梯度下降法&#xff08;SGD&#…...

API平台建设之路:从0到1的实践指南

在这个互联网蓬勃发展的时代&#xff0c;API已经成为连接各个系统、服务和应用的重要纽带。搭建一个优质的API平台不仅能为开发者提供便利&#xff0c;更能创造可观的商业价值。让我们一起探讨如何打造一个成功的API平台。 技术架构是API平台的根基。选择合适的技术栈对平台的…...

【Flink-scala】DataStream编程模型之窗口计算-触发器-驱逐器

DataStream API编程模型 1.【Flink-Scala】DataStream编程模型之数据源、数据转换、数据输出 2.【Flink-scala】DataStream编程模型之 窗口的划分-时间概念-窗口计算程序 文章目录 DataStream API编程模型前言1.触发器1.1 代码示例 2.驱逐器2.1 代码示例 总结 前言 本小节我想…...

信号灯集以及 P V 操作

一、信号灯集 1.1 信号灯集的概念 信号灯集是进程间同步的一种方式。 信号灯集创建后&#xff0c;在信号灯集内部会有很多个信号灯。 每个信号灯都可以理解为是一个信号量。 信号灯的编号是从0开始的。 比如A进程监视0号灯&#xff0c;B进程监视1号灯。 0号灯有资源&…...

在 Flutter app 中,通过视频 URL 下载视频到手机相册

在 Flutter app 中&#xff0c;通过视频 URL 下载视频到手机相册可以通过以下步骤实现&#xff1a; 1. 添加依赖 使用 dio 下载文件&#xff0c;结合 path_provider 获取临时存储路径&#xff0c;以及 gallery_saver 将文件保存到相册。 在 pubspec.yaml 中添加以下依赖&…...

Nature Methods | 人工智能在生物与医学研究中的应用

Nature Methods | 人工智能在生物与医学研究中的应用 生物研究中的深度学习 随着人工智能&#xff08;AI&#xff09;技术的迅速发展&#xff0c;尤其是深度学习和大规模预训练模型的出现&#xff0c;AI在生物学研究中的应用正在经历一场革命。从基因组学、单细胞组学到癌症生…...

Axure PR 9 随机函数 设计交互

​大家好&#xff0c;我是大明同学。 这期内容&#xff0c;我们将深入探讨Axure中随机函数的用法。 随机函数 创建随机函数所需的元件 1.打开一个新的 RP 文件并在画布上打开 Page 1。 2.在元件库中拖出一个矩形元件。 3.选中矩形元件&#xff0c;样式窗格中&#xff0c;将…...

【人工智能基础05】决策树模型

文章目录 一. 基础内容1. 决策树基本原理1.1. 定义1.2. 表示成条件概率 2. 决策树的训练算法2.1. 划分选择的算法信息增益&#xff08;ID3 算法&#xff09;信息增益比&#xff08;C4.5 算法&#xff09;基尼指数&#xff08;CART 算法&#xff09;举例说明&#xff1a;计算各个…...

【人工智能基础03】机器学习(练习题)

文章目录 课本习题监督学习的例子过拟合和欠拟合常见损失函数&#xff0c;判断一个损失函数的好坏无监督分类&#xff1a;kmeans无监督分类&#xff0c;Kmeans 三分类问题变换距离函数选择不同的起始点 重点回顾1. 监督学习、半监督学习和无监督学习的定义2. 判断学习场景3. 监…...

HarmonyOS(60)性能优化之状态管理最佳实践

状态管理最佳实践 1、避免在循环中访问状态变量1.1 反例1.2 正例 2、避免不必要的状态变量的使用3、建议使用临时变量替换状态变量3.1 反例3.2 正例 4、参考资料 1、避免在循环中访问状态变量 在应用开发中&#xff0c;应避免在循环逻辑中频繁读取状态变量&#xff0c;而是应该…...

数据库课程设计报告 超市会员管理系统

一、系统简介 1.1设计背景 受到科学技术的推动&#xff0c;全球计算机的软硬件技术迅速发展&#xff0c;以计算机为基础支撑的信息化如今已成为现代企业的一个重要标志与衡量企业综合实力的重要标准&#xff0c;并且正在悄无声息的影响与改变着国内外广泛的中小型企业的运营模…...

C++算法练习-day54——39.组合总和

题目来源&#xff1a;. - 力扣&#xff08;LeetCode&#xff09; 题目思路分析 题目&#xff1a;给定一个整数数组 candidates 和一个目标数 target&#xff0c;找出所有独特的组合&#xff0c;这些组合中的数字之和等于 target。每个数字在每个组合中只能使用一次。 思路&a…...

计算机毕业设计PySpark+Hadoop中国城市交通分析与预测 Python交通预测 Python交通可视化 客流量预测 交通大数据 机器学习 深度学习

温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 温馨提示&#xff1a;文末有 CSDN 平台官方提供的学长联系方式的名片&#xff01; 作者简介&#xff1a;Java领…...

Linux的文件系统

这里写目录标题 一.文件系统的基本组成索引节点目录项文件数据的存储扇区三个存储区域 二.虚拟文件系统文件系统分类进程文件表读写过程 三.文件的存储连续空间存放方式缺点 非连续空间存放方式链表方式隐式链表缺点显示链接 索引数据库缺陷索引的方式优点&#xff1a;多级索引…...

【Vue3】从零开始创建一个VUE项目

【Vue3】从零开始创建一个VUE项目 手动创建VUE项目附录 package.json文件报错处理: Failed to get response from https://registry.npmjs.org/vue-cli-version-marker 相关链接&#xff1a; 【VUE3】【Naive UI】&#xff1c;NCard&#xff1e; 标签 【VUE3】【Naive UI】&…...

9)语法分析:半倒装和全倒装

在英语中&#xff0c;倒装是一种特殊的句子结构&#xff0c;其中主语和谓语&#xff08;或助动词&#xff09;的位置被颠倒。倒装分为部分倒装和全倒装两种类型&#xff0c;它们的主要区别在于倒装的程度和使用的场合。 1. 部分倒装 (Partial Inversion) 部分倒装是指将助动词…...

如何在看板中体现优先级变化

在看板中有效体现优先级变化的关键措施包括&#xff1a;采用颜色或标签标识优先级、设置任务排序规则、使用独立的优先级列或泳道、结合自动化规则同步优先级变化、建立定期的优先级审查流程。其中&#xff0c;设置任务排序规则尤其重要&#xff0c;因为它让看板视觉上直观地体…...

智能在线客服平台:数字化时代企业连接用户的 AI 中枢

随着互联网技术的飞速发展&#xff0c;消费者期望能够随时随地与企业进行交流。在线客服平台作为连接企业与客户的重要桥梁&#xff0c;不仅优化了客户体验&#xff0c;还提升了企业的服务效率和市场竞争力。本文将探讨在线客服平台的重要性、技术进展、实际应用&#xff0c;并…...

【HarmonyOS 5 开发速记】如何获取用户信息(头像/昵称/手机号)

1.获取 authorizationCode&#xff1a; 2.利用 authorizationCode 获取 accessToken&#xff1a;文档中心 3.获取手机&#xff1a;文档中心 4.获取昵称头像&#xff1a;文档中心 首先创建 request 若要获取手机号&#xff0c;scope必填 phone&#xff0c;permissions 必填 …...

LeetCode - 199. 二叉树的右视图

题目 199. 二叉树的右视图 - 力扣&#xff08;LeetCode&#xff09; 思路 右视图是指从树的右侧看&#xff0c;对于每一层&#xff0c;只能看到该层最右边的节点。实现思路是&#xff1a; 使用深度优先搜索(DFS)按照"根-右-左"的顺序遍历树记录每个节点的深度对于…...

SiFli 52把Imagie图片,Font字体资源放在指定位置,编译成指定img.bin和font.bin的问题

分区配置 (ptab.json) img 属性介绍&#xff1a; img 属性指定分区存放的 image 名称&#xff0c;指定的 image 名称必须是当前工程生成的 binary 。 如果 binary 有多个文件&#xff0c;则以 proj_name:binary_name 格式指定文件名&#xff0c; proj_name 为工程 名&…...

【JVM面试篇】高频八股汇总——类加载和类加载器

目录 1. 讲一下类加载过程&#xff1f; 2. Java创建对象的过程&#xff1f; 3. 对象的生命周期&#xff1f; 4. 类加载器有哪些&#xff1f; 5. 双亲委派模型的作用&#xff08;好处&#xff09;&#xff1f; 6. 讲一下类的加载和双亲委派原则&#xff1f; 7. 双亲委派模…...

RabbitMQ入门4.1.0版本(基于java、SpringBoot操作)

RabbitMQ 一、RabbitMQ概述 RabbitMQ RabbitMQ最初由LShift和CohesiveFT于2007年开发&#xff0c;后来由Pivotal Software Inc.&#xff08;现为VMware子公司&#xff09;接管。RabbitMQ 是一个开源的消息代理和队列服务器&#xff0c;用 Erlang 语言编写。广泛应用于各种分布…...

基于PHP的连锁酒店管理系统

有需要请加文章底部Q哦 可远程调试 基于PHP的连锁酒店管理系统 一 介绍 连锁酒店管理系统基于原生PHP开发&#xff0c;数据库mysql&#xff0c;前端bootstrap。系统角色分为用户和管理员。 技术栈 phpmysqlbootstrapphpstudyvscode 二 功能 用户 1 注册/登录/注销 2 个人中…...

Golang——7、包与接口详解

包与接口详解 1、Golang包详解1.1、Golang中包的定义和介绍1.2、Golang包管理工具go mod1.3、Golang中自定义包1.4、Golang中使用第三包1.5、init函数 2、接口详解2.1、接口的定义2.2、空接口2.3、类型断言2.4、结构体值接收者和指针接收者实现接口的区别2.5、一个结构体实现多…...

FFmpeg avformat_open_input函数分析

函数内部的总体流程如下&#xff1a; avformat_open_input 精简后的代码如下&#xff1a; int avformat_open_input(AVFormatContext **ps, const char *filename,ff_const59 AVInputFormat *fmt, AVDictionary **options) {AVFormatContext *s *ps;int i, ret 0;AVDictio…...