Vonng / pigsty

Battery-Included PostgreSQL Distro as a Free & Better RDS Alternative —— Pigsty
https://pigsty.io
GNU Affero General Public License v3.0
3.3k stars 256 forks source link

Postgresql service is ovewritten in Debian/Ubuntu Systems #437

Closed ZanePoe closed 3 weeks ago

ZanePoe commented 2 months ago

服务器重启之后,客户端就连不上 postgresql 数据库了,但是5432端口是通的,就是所有用户都认证失败。 74bba24e0de3ffc8a2a179d279c001f 在服务器尝试利用localhost连接 postgresql 也失败: a11deb271c95dfb51e9e13649c8df06 重装就又可以连接,但服务器重启,就又不行了。 起初我还以为是装的时候用户没有配对,但昨天我重装之后,手动重启了关闭了服务器,再启动,就又是这个样子了。

pigsty版本:2.7.0. 所使用的安装脚本如下: `---

==============================================================

File : ubuntu22.yml

Desc : Pigsty auto generated config for ubuntu 22.04

Ctime : 2020-05-22

Mtime : 2024-05-18

Docs : https://pigsty.io/docs/setup/config/

Author : Ruohang Feng (rh@vonng.com)

License : AGPLv3

==============================================================

this is a simple singleton meta config template, check full details with

https://github.com/Vonng/pigsty/blob/master/files/pigsty/full.yml

all: children:

#----------------------------------#
# infra: monitor, alert, repo, etc..
#----------------------------------#
infra: { hosts: { 192.168.31.124: { infra_seq: 1 } } }

#----------------------------------#
# etcd cluster for HA postgres DCS
#----------------------------------#
etcd: { hosts: { 192.168.31.124: { etcd_seq: 1 } }, vars: { etcd_cluster: etcd } }

#----------------------------------#
# minio (OPTIONAL backup repo)
#----------------------------------#
#minio: { hosts: { 192.168.31.124: { minio_seq: 1 } }, vars: { minio_cluster: minio } }

#----------------------------------#
# pgsql (singleton on current node)
#----------------------------------#
# this is an example single-node postgres cluster with postgis & timescaledb installed, with one biz database & two biz users
pg-meta:
  hosts:
    192.168.31.124: { pg_seq: 1, pg_role: primary } # <---- primary instance with read-write capability
    #10.10.10.x: { pg_seq: 2, pg_role: replica } # <---- read only replica for read-only online traffic
    #10.10.10.y: { pg_seq: 3, pg_role: offline } # <---- offline instance of ETL & interactive queries
  vars:
    pg_cluster: pg-meta                 # required identity parameter, usually same as group name
    pg_conf: oltp.yml                   # oltp|tiny|olap|crit|... (default: oltp)

    # define business databases here: https://pigsty.io/docs/pgsql/db/
    pg_databases:                       # define business databases on this cluster, array of database definition
      - name: meta                      # REQUIRED, `name` is the only mandatory field of a database definition
        baseline: cmdb.sql              # optional, database sql baseline path, (relative path among ansible search path, e.g: files/)
        schemas: [ pigsty ]             # optional, additional schemas to be created, array of schema names
        extensions:                     # optional, additional extensions to be installed: array of `{name[,schema]}`
          - { name: postgis     }       # install postgis extension on this database
          - { name: timescaledb }       # install timescaledb extension on this database
        comment: pigsty meta database   # optional, comment string for this database
        #pgbouncer: true                # optional, add this database to pgbouncer database list? true by default
        #owner: postgres                # optional, database owner, postgres by default
        #template: template1            # optional, which template to use, template1 by default
        #encoding: UTF8                 # optional, database encoding, UTF8 by default. (MUST same as template database)
        #locale: C                      # optional, database locale, C by default.  (MUST same as template database)
        #lc_collate: C                  # optional, database collate, C by default. (MUST same as template database)
        #lc_ctype: C                    # optional, database ctype, C by default.   (MUST same as template database)
        #tablespace: pg_default         # optional, default tablespace, 'pg_default' by default.
        #allowconn: true                # optional, allow connection, true by default. false will disable connect at all
        #revokeconn: false              # optional, revoke public connection privilege. false by default. (leave connect with grant option to owner)
        #register_datasource: true      # optional, register this database to grafana datasources? true by default
        #connlimit: -1                  # optional, database connection limit, default -1 disable limit
        #pool_auth_user: dbuser_meta    # optional, all connection to this pgbouncer database will be authenticated by this user
        #pool_mode: transaction         # optional, pgbouncer pool mode at database level, default transaction
        #pool_size: 64                  # optional, pgbouncer pool size at database level, default 64
        #pool_size_reserve: 32          # optional, pgbouncer pool size reserve at database level, default 32
        #pool_size_min: 0               # optional, pgbouncer pool size min at database level, default 0
        #pool_max_db_conn: 100          # optional, max database connections at database level, default 100
      #- { name: grafana  ,owner: dbuser_grafana  ,revokeconn: true ,comment: grafana primary database }  # define another database

    # define business users here: https://pigsty.io/docs/pgsql/user/
    pg_users:                           # define business users/roles on this cluster, array of user definition
      - name: db_center               # REQUIRED, `name` is the only mandatory field of a user definition
        password: db_user.center           # optional, password, can be a scram-sha-256 hash string or plain text
        login: true                     # optional, can log in, true by default  (new biz ROLE should be false)
        superuser: true                # optional, is superuser? false by default
        createdb: true                 # optional, can create database? false by default
        createrole: true               # optional, can create role? false by default
        inherit: true                   # optional, can this role use inherited privileges? true by default
        replication: true              # optional, can this role do replication? false by default
        bypassrls: true                # optional, can this role bypass row level security? false by default
        pgbouncer: true                 # optional, add this user to pgbouncer user-list? false by default (production user should be true explicitly)
        connlimit: -1                   # optional, user connection limit, default -1 disable limit
        expire_in: 3650                 # optional, now + n days when this role is expired (OVERWRITE expire_at)
        expire_at: '2030-12-31'         # optional, YYYY-MM-DD 'timestamp' when this role is expired  (OVERWRITTEN by expire_in)
        comment: pigsty admin user      # optional, comment string for this user/role
        roles: [dbrole_admin]           # optional, belonged roles. default roles are: dbrole_{admin,readonly,readwrite,offline}
        parameters: {}                  # optional, role level parameters with `ALTER ROLE SET`
        pool_mode: transaction          # optional, pgbouncer pool mode at user level, transaction by default
        pool_connlimit: -1              # optional, max database connections at user level, default -1 disable limit
      - {name: dbuser_view     ,password: DBUser.Viewer   ,pgbouncer: true ,roles: [dbrole_readonly], comment: read-only viewer for meta database}

    # install extensions here: # define HBA rules here: https://pigsty.io/docs/pgsql/extension/#install-extension
    pg_libs: 'timescaledb, pg_stat_statements, auto_explain' # add timescaledb to shared_preload_libraries
    pg_extensions: # extensions to be installed on this cluster
      - postgresql-$v-postgis* timescaledb-2-postgresql-$v postgresql-$v-pgvector # default extensions to be installed
      #[ GIS & Timeseries  ]# - timescaledb-2-postgresql-$v postgresql-$v-postgis-3* postgresql-$v-pgrouting* postgresql-$v-pointcloud postgresql-$v-h3 postgresql-$v-ip4r postgresql-$v-mobilitydb
      - timescaledb-2-postgresql-$v postgresql-$v-postgis-3* postgresql-$v-pgrouting* postgresql-$v-pointcloud postgresql-$v-h3 postgresql-$v-ip4r postgresql-$v-mobilitydb
      #[ Vector Search RAG ]# - postgresql-$v-pgvector postgresql-$v-similarity pg-search
      - postgresql-$v-pgvector  postgresql-$v-similarity pg-search  #zhparser
      #- pg-bm25  pg-sparse 
      #- pgml
      #[ OLAP & Sharding   ]# - postgresql-$v-citus-12.1 postgresql-$v-plproxy postgresql-$v-partman pg-lakehouse pg-analytics
      - pg-lakehouse pg-analytics #pg-tiktoken
      #[ Featured & AM     ]# - postgresql-$v-rdkit postgresql-$v-age pg-graphql pg-jsonschema postgresql-$v-jsquery postgresql-$v-pg-hint-plan postgresql-$v-hypopg postgresql-$v-pgq* postgresql-$v-periods postgresql-$v-hll postgresql-$v-rum postgresql-$v-preprepare
      - postgresql-$v-rdkit postgresql-$v-age pg-graphql pg-jsonschema postgresql-$v-jsquery postgresql-$v-pg-hint-plan postgresql-$v-hypopg  postgresql-$v-periods postgresql-$v-hll postgresql-$v-rum postgresql-$v-preprepare postgresql-$v-pgq* #pgmq
      #[ Function & Test   ]# - postgresql-$v-http pg-net postgresql-$v-extra-window-functions postgresql-$v-tdigest postgresql-$v-topn postgresql-$v-first-last-agg postgresql-$v-pgpcre postgresql-$v-icu-ext
      - postgresql-$v-http pg-net postgresql-$v-extra-window-functions postgresql-$v-tdigest postgresql-$v-topn postgresql-$v-first-last-agg postgresql-$v-pgpcre postgresql-$v-icu-ext
      #[ FDW & Compatible  ]# - wrappers postgresql-$v-mysql-fdw postgresql-$v-ogr-fdw postgresql-$v-orafce postgresql-$v-tds-fdw postgresql-$v-oracle-fdw postgresql-$v-pgmemcache
      - wrappers postgresql-$v-mysql-fdw postgresql-$v-ogr-fdw postgresql-$v-orafce postgresql-$v-tds-fdw postgresql-$v-oracle-fdw postgresql-$v-pgmemcache
      #[ New Data Types    ]# - postgresql-$v-prefix postgresql-$v-asn1oid postgresql-$v-numeral postgresql-$v-rational postgresql-$v-q3c postgresql-$v-pgsphere postgresql-$v-semver postgresql-$v-debversion postgresql-$v-pg-rrule postgresql-$v-pgmp postgresql-$v-roaringbitmap postgresql-$v-pgfaceting
      #[ New Data Types    ]# - postgresql-$v-prefix postgresql-$v-asn1oid postgresql-$v-numeral postgresql-$v-rational postgresql-$v-q3c postgresql-$v-pgsphere postgresql-$v-semver postgresql-$v-debversion postgresql-$v-pg-rrule postgresql-$v-pgmp postgresql-$v-roaringbitmap postgresql-$v-pgfaceting
      #[ Program Language  ]# - postgresql-$v-pllua postgresql-$v-pldebugger postgresql-$v-plpgsql-check postgresql-$v-plprofiler postgresql-$v-plsh postgresql-$v-omnidb postgresql-$v-unit postgresql-$v-pgtap # postgresql-$v-pljava postgresql-$v-plr
      #[ Administration    ]# - postgresql-$v-cron postgresql-$v-repack postgresql-$v-squeeze postgresql-$v-dirtyread pgdd-jammy-pg$v postgresql-$v-pgfincore postgresql-$v-pgl-ddl-deploy postgresql-$v-prioritize postgresql-$v-pg-checksums postgresql-$v-auto-failover postgresql-$v-pg-catcheck pgxnclient postgresql-filedump # postgresql-$v-pgpool2
      #[ Monitor & Stat    ]# - postgresql-$v-show-plans postgresql-$v-pg-stat-kcache postgresql-$v-pg-qualstats postgresql-$v-pg-track-settings postgresql-$v-pg-wait-sampling postgresql-$v-bgw-replstatus postgresql-$v-powa postgresql-$v-toastinfo
      #[ Security & Audit  ]# - postgresql-$v-pgaudit postgresql-$v-pgauditlogtofile postgresql-$v-credcheck postgresql-$v-set-user postgresql-$v-tablelog postgresql-$v-snakeoil postgresql-$v-pgextwlist
      #[ ETL, CDC, REPL    ]# - postgresql-$v-pglogical* postgresql-$v-decoderbufs postgresql-$v-wal2json postgresql-$v-pg-failover-slots postgresql-$v-londiste-sql postgresql-$v-mimeo postgresql-$v-pg-fact-loader pgloader # postgresql-$v-repmgr postgresql-$v-slony1-2

    # define HBA rules here: https://pigsty.io/docs/pgsql/hba/#define-hba
    pg_hba_rules:                       # example hba rules
      - {user: dbuser_view , db: all ,addr: infra ,auth: pwd ,title: 'allow grafana dashboard access cmdb from infra nodes'}
      - { user: zane_center  ,db: all  ,addr: world    ,auth: pwd ,title: '允许管理员用户从任何地方用客户端密码登陆'       }

    #pg_vip_enabled: true               # define a L2 VIP which bind to cluster primary instance
    #pg_vip_address: 10.10.10.2/24      # L2 VIP Address and netmask
    #pg_vip_interface: eth1             # L2 VIP Network interface, overwrite on host vars if member have different network interface names
    node_crontab: [ '00 01 * * * postgres /pg/bin/pg-backup full' ] # make a full backup every 1am

#----------------------------------#
# example cluster (3-node pg-test)
#----------------------------------#
#pg-test:                          # define the new 3-node cluster pg-test
#  hosts:
#    10.10.10.11: { pg_seq: 1, pg_role: primary }   # primary instance, leader of cluster
#    10.10.10.12: { pg_seq: 2, pg_role: replica }   # replica instance, follower of leader
#    10.10.10.13: { pg_seq: 3, pg_role: replica, pg_offline_query: true } # replica with offline access
#  vars:
#    pg_cluster: pg-test            # define pgsql cluster name
#    pg_users:  [{ name: test , password: test , pgbouncer: true , roles: [ dbrole_admin ] }]
#    pg_databases: [{ name: test }] # create a database and user named 'test'
#    node_tune: oltp
#    pg_conf: oltp.yml
#    pg_vip_enabled: true
#    pg_vip_address: 10.10.10.3/24
#    pg_vip_interface: eth1
#    node_crontab:  # make a full backup on monday 1am, and an incremental backup during weekdays
#      - '00 01 * * 1 postgres /pg/bin/pg-backup full'
#      - '00 01 * * 2,3,4,5,6,7 postgres /pg/bin/pg-backup'

----------------------------------

GLOBAL VARS

----------------------------------

vars:

#----------------------------------#
# Meta Data
#----------------------------------#
version: v2.7.0                   # pigsty version string
admin_ip: 192.168.31.124             # admin node ip address
region: default                   # upstream mirror region: default,china,europe
infra_portal:                     # domain names and upstream servers
  home         : { domain: h.pigsty }
  grafana      : { domain: g.pigsty ,endpoint: "${admin_ip}:3000" , websocket: true }
  prometheus   : { domain: p.pigsty ,endpoint: "${admin_ip}:9090" }
  alertmanager : { domain: a.pigsty ,endpoint: "${admin_ip}:9093" }
  blackbox     : { endpoint: "${admin_ip}:9115" }
  loki         : { endpoint: "${admin_ip}:3100" }
  #minio        : { domain: sss.pigsty  ,endpoint: "${admin_ip}:9001" ,scheme: https ,websocket: true }

#----------------------------------#
# MinIO Related Options
#----------------------------------#
#pgbackrest_method: minio          # if you want to use minio as backup repo instead of 'local' fs, uncomment this
#minio_users:                      # and configure `pgbackrest_repo` & `minio_users` accordingly
#  - { access_key: dba , secret_key: S3User.DBA, policy: consoleAdmin }
#  - { access_key: pgbackrest , secret_key: S3User.Backup, policy: readwrite }
#pgbackrest_repo:                  # pgbackrest repo: https://pgbackrest.org/configuration.html#section-repository
#  minio: ...                      # optional minio repo for pgbackrest ...
#    s3_key: pgbackrest            # minio user access key for pgbackrest
#    s3_key_secret: S3User.Backup  # minio user secret key for pgbackrest
#    cipher_pass: pgBackRest       # AES encryption password, default is 'pgBackRest'
# if you want to use minio as backup repo instead of 'local' fs, uncomment this, and configure `pgbackrest_repo`
#pgbackrest_method: minio

#----------------------------------#
# Credential: CHANGE THESE PASSWORDS
#----------------------------------#
#grafana_admin_username: admin
grafana_admin_password: pigsty
#pg_admin_username: dbuser_dba
pg_admin_password: DBUser.DBA
#pg_monitor_username: dbuser_monitor
pg_monitor_password: DBUser.Monitor
#pg_replication_username: replicator
pg_replication_password: DBUser.Replicator
#patroni_username: postgres
patroni_password: Patroni.API
#haproxy_admin_username: admin
haproxy_admin_password: pigsty

#----------------------------------#
# Safe Guard
#----------------------------------#
# you can enable these flags after bootstrap, to prevent purging running etcd / pgsql instances
etcd_safeguard: false             # prevent purging running etcd instance?
pg_safeguard: false               # prevent purging running postgres instance? false by default

#----------------------------------#
# Repo, Node, Packages
#----------------------------------#
# if you wish to customize your own repo, change these settings:
repo_modules: infra,node,pgsql,redis # install upstream repo during repo bootstrap
repo_remove: true                 # remove existing repo on admin node during repo bootstrap
node_repo_modules: local          # install the local module in repo_upstream for all nodes
node_repo_remove: true            # remove existing node repo for node managed by pigsty
repo_upstream:                    # where to download (ubuntu version)
  - { name: pigsty-local  ,description: 'Pigsty Local'     ,module: local ,releases: [11,12,20,22] ,baseurl: { default: 'http://${admin_ip}/pigsty ./' }}
  - { name: pigsty-pgsql  ,description: 'Pigsty PgSQL'     ,module: pgsql ,releases: [11,12,20,22] ,baseurl: { default: 'https://repo.pigsty.io/deb/pgsql/${distro_codename}.amd64/ ./', china: 'https://repo.pigsty.cc/deb/pgsql/${distro_codename}.amd64/ ./' }}
  - { name: pigsty-infra  ,description: 'Pigsty Infra'     ,module: infra ,releases: [11,12,20,22] ,baseurl: { default: 'https://repo.pigsty.io/deb/infra/amd64/ ./', china: 'https://repo.pigsty.cc/deb/infra/amd64/ ./' }}
  - { name: nginx         ,description: 'Nginx'            ,module: infra ,releases: [11,12,20,22] ,baseurl: { default: 'http://nginx.org/packages/mainline/${distro_name} ${distro_codename} nginx' }}
  - { name: base          ,description: 'Ubuntu Basic'     ,module: node  ,releases: [      20,22] ,baseurl: { default: 'https://mirrors.edge.kernel.org/${distro_name}/ ${distro_codename}   main universe multiverse restricted' ,china: 'https://mirrors.aliyun.com/${distro_name}/ ${distro_codename}   main restricted universe multiverse' }}
  - { name: updates       ,description: 'Ubuntu Updates'   ,module: node  ,releases: [      20,22] ,baseurl: { default: 'https://mirrors.edge.kernel.org/ubuntu/ ${distro_codename}-backports main restricted universe multiverse' ,china: 'https://mirrors.aliyun.com/ubuntu/ ${distro_codename}-updates   main restricted universe multiverse' }}
  - { name: backports     ,description: 'Ubuntu Backports' ,module: node  ,releases: [      20,22] ,baseurl: { default: 'https://mirrors.edge.kernel.org/ubuntu/ ${distro_codename}-security  main restricted universe multiverse' ,china: 'https://mirrors.aliyun.com/ubuntu/ ${distro_codename}-backports main restricted universe multiverse' }}
  - { name: security      ,description: 'Ubuntu Security'  ,module: node  ,releases: [      20,22] ,baseurl: { default: 'https://mirrors.edge.kernel.org/ubuntu/ ${distro_codename}-updates   main restricted universe multiverse' ,china: 'https://mirrors.aliyun.com/ubuntu/ ${distro_codename}-security  main restricted universe multiverse' }}
  - { name: pgdg          ,description: 'PGDG'             ,module: pgsql ,releases: [11,12,20,22] ,baseurl: { default: 'http://apt.postgresql.org/pub/repos/apt/ ${distro_codename}-pgdg main' ,china: 'https://mirrors.tuna.tsinghua.edu.cn/postgresql/repos/apt/ ${distro_codename}-pgdg main' }}
  - { name: citus         ,description: 'Citus'            ,module: pgsql ,releases: [11,12,20,22] ,baseurl: { default: 'https://packagecloud.io/citusdata/community/${distro_name}/ ${distro_codename} main'   }}
  - { name: timescaledb   ,description: 'Timescaledb'      ,module: pgsql ,releases: [11,12,20,22] ,baseurl: { default: 'https://packagecloud.io/timescale/timescaledb/${distro_name}/ ${distro_codename} main' }}
  - { name: redis         ,description: 'Redis'            ,module: redis ,releases: [11,12,20,22] ,baseurl: { default: 'https://packages.redis.io/deb ${distro_codename} main' }}
  - { name: docker-ce     ,description: 'Docker'           ,module: infra ,releases: [11,12,20,22] ,baseurl: { default: 'https://download.docker.com/linux/${distro_name} ${distro_codename} stable' ,china: 'https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux//${distro_name} ${distro_codename} stable' }}
  #- { name: grafana      ,description: 'Grafana'          ,module: infra ,releases: [11,12,20,22] ,baseurl: { default: 'https://apt.grafana.com stable main' ,china: 'https://mirrors.tuna.tsinghua.edu.cn/grafana/apt/ stable main' }}
  #- { name: haproxy      ,description: 'HAProxy Ubuntu'   ,module: node  ,releases: [      20,22] ,baseurl: { default: 'https://ppa.launchpadcontent.net/vbernat/haproxy-2.9/ubuntu/ ${distro_codename} main'  }}
  - { name: pgml         ,description: 'PostgresML'       ,module: pgsql ,releases: [         22] ,baseurl: { default: 'https://apt.postgresml.org ${distro_codename} main'  }}
repo_packages:                    # which packages to be included
  - ansible python3 python3-pip python3-venv python3-jmespath dpkg-dev sshpass                                                                        # Distro & Boot
  - nginx dnsmasq etcd haproxy vip-manager pg-exporter pgbackrest-exporter                                                                            # Pigsty Addon
  - grafana loki logcli promtail prometheus2 alertmanager pushgateway node-exporter blackbox-exporter nginx-exporter keepalived-exporter              # Infra Packages
  - redis-exporter docker-ce docker-compose-plugin redis minio mcli ferretdb duckdb                                                                   # Miscellaneous
  - lz4 unzip bzip2 zlib1g pv jq git ncdu make patch bash lsof wget uuid tuned nvme-cli numactl sysstat iotop htop rsync tcpdump linux-tools-generic  # Node Tools 1
  - netcat socat ftp lrzsz net-tools ipvsadm dnsutils telnet ca-certificates openssl openssh-client libreadline-dev vim-tiny keepalived acl chrony    # Node Tools 2
  - patroni pgbouncer pgbackrest pgbadger pgloader pg-activity pgloader pg-activity postgresql-filedump pgxnclient pgformatter                        # PGSQL Packages
  - postgresql-client-16 postgresql-16 postgresql-server-dev-16 postgresql-plpython3-16 postgresql-plperl-16 postgresql-pltcl-16 postgresql-16-wal2json postgresql-16-repack
  - postgresql-16-postgis-3 postgresql-16-postgis-3-scripts postgresql-16-citus-12.1 postgresql-16-pgvector timescaledb-2-postgresql-16               # PGDG 16 Extensions
  - postgresql-16-age postgresql-16-asn1oid postgresql-16-auto-failover postgresql-16-bgw-replstatus postgresql-16-pg-catcheck postgresql-16-pg-checksums postgresql-16-credcheck postgresql-16-cron postgresql-16-debversion postgresql-16-decoderbufs postgresql-16-dirtyread postgresql-16-extra-window-functions postgresql-16-first-last-agg postgresql-16-hll postgresql-16-hypopg postgresql-16-icu-ext postgresql-16-ip4r postgresql-16-jsquery postgresql-16-londiste-sql
  - postgresql-16-mimeo postgresql-16-mysql-fdw postgresql-16-numeral postgresql-16-ogr-fdw postgresql-16-omnidb postgresql-16-oracle-fdw postgresql-16-orafce postgresql-16-partman postgresql-16-periods postgresql-16-pgaudit postgresql-16-pgauditlogtofile postgresql-16-pgextwlist postgresql-16-pg-fact-loader postgresql-16-pg-failover-slots postgresql-16-pgfincore postgresql-16-pgl-ddl-deploy postgresql-16-pglogical postgresql-16-pglogical-ticker
  - postgresql-16-pgmemcache postgresql-16-pgmp postgresql-16-pgpcre postgresql-16-pgq3 postgresql-16-pgq-node postgresql-16-pg-qualstats postgresql-16-pgsphere postgresql-16-pg-stat-kcache postgresql-16-pgtap postgresql-16-pg-track-settings postgresql-16-pg-wait-sampling postgresql-16-pldebugger postgresql-16-pllua postgresql-16-plpgsql-check postgresql-16-plprofiler postgresql-16-plproxy postgresql-16-plsh postgresql-16-pointcloud
  - postgresql-16-powa postgresql-16-prefix postgresql-16-preprepare postgresql-16-prioritize postgresql-16-q3c postgresql-16-rational postgresql-16-rum postgresql-16-semver postgresql-16-set-user postgresql-16-show-plans postgresql-16-similarity postgresql-16-snakeoil postgresql-16-squeeze postgresql-16-tablelog postgresql-16-tdigest postgresql-16-tds-fdw postgresql-16-toastinfo postgresql-16-topn postgresql-16-unit
  - postgresql-16-pg-hint-plan postgresql-16-mobilitydb postgresql-16-roaringbitmap postgresql-16-pg-rrule postgresql-16-http postgresql-16-pgfaceting postgresql-16-pgrouting postgresql-16-pgrouting-scripts postgresql-16-h3 postgresql-16-rdkit
  - pg-graphql pg-net pg-jsonschema wrappers pg-analytics pg-search pg-lakehouse pgdd-jammy-pg16
  # too heavy # - postgresql-16-pljava postgresql-16-plr postgresql-16-pgpool2 postgresql-16-slony1-2 postgresql-16-repmgr
infra_packages:                   # packages to be installed on infra nodes
  - grafana,loki,logcli,promtail,prometheus2,alertmanager,pushgateway,blackbox-exporter
  - node-exporter,blackbox-exporter,nginx-exporter,redis-exporter,pg-exporter
  - nginx,dnsmasq,ansible,etcd,python3-requests,redis,mcli
node_default_packages:            # default packages to be installed on all nodes
  - lz4,unzip,bzip2,zlib1g,pv,jq,git,ncdu,make,patch,bash,lsof,wget,uuid,tuned,nvme-cli,numactl,sysstat,iotop,htop,rsync,tcpdump,chrony,acl,python3,python3-pip
  - netcat,ftp,socat,lrzsz,net-tools,ipvsadm,dnsutils,telnet,ca-certificates,openssl,openssh-client,libreadline-dev,vim-tiny,keepalived,node-exporter,etcd,haproxy

#----------------------------------#
# PostgreSQL Packages & Extensions
#----------------------------------#
pg_version: 16                    # el9 is using postgresql 16 as the default major version
pg_dbsu_uid: 543                  # explicitly assign an unique uid for global postgres dbsu
pg_packages:                      # pg packages to be installed, `$pg_version` and `$v` will be replaced to `pg_version`
  - postgresql-*-$v
  - patroni pgbouncer pgbackrest pg-exporter pgbadger vip-manager
  - postgresql-$v-repack postgresql-$v-wal2json
pg_extensions:                    # pg extensions to be installed, `$v` will be replaced, (Overwrite by cluster vars)
  - postgresql-$v-postgis* timescaledb-2-postgresql-$v postgresql-$v-pgvector

...`

ZanePoe commented 1 month ago

能否给一些诊断方向或者可能得原因,因为确实感觉有点懵逼。

Mozhuowen commented 1 month ago

同样测试Ubuntu 22.04 LTS 重启后所有认证失效: 可能有关的日志信息:

截屏2024-08-04 21 29 34
Vonng commented 3 weeks ago

PostgreSQL Service is overwritten by the systemd enabled postgresql@.service postgresql.service. Need investigation, Will be fixed in the next v3 release.

Vonng commented 3 weeks ago

Resolved in v3.0.0-b1