AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / user-584993

keramat's questions

Martin Hope
keramat
Asked: 2023-04-23 18:51:08 +0800 CST

Depois de reiniciar o servidor, o Postgres não inicia

  • 3

Estou executando o Postgres 14 em um Windows Server 2022 Standard. Enquanto as operações do banco de dados estavam em execução, como a inserção, meu servidor reiniciou e agora o Postgres não inicia. Eu olhei para o arquivo de configuração e as últimas linhas são as seguintes:

2023-04-23 01:43:36.913 PDT [123528] LOG:  could not receive data from client: An existing connection was forcibly closed by the remote host.

    
2023-04-23 01:52:04.222 PDT [105764] LOG:  could not receive data from client: An existing connection was forcibly closed by the remote host.

    
2023-04-23 01:52:04.223 PDT [118464] LOG:  could not receive data from client: An existing connection was forcibly closed by the remote host.

    
2023-04-23 01:54:38.568 PDT [121492] LOG:  could not receive data from client: An existing connection was forcibly closed by the remote host.

    
2023-04-23 01:54:38.569 PDT [123696] LOG:  could not receive data from client: An existing connection was forcibly closed by the remote host.

    
2023-04-23 01:59:51.982 PDT [124252] LOG:  could not receive data from client: An existing connection was forcibly closed by the remote host.

    
2023-04-23 01:59:51.983 PDT [122440] LOG:  could not receive data from client: An existing connection was forcibly closed by the remote host.

    
2023-04-23 01:59:51.983 PDT [116252] LOG:  could not receive data from client: An existing connection was forcibly closed by the remote host.

    
2023-04-23 02:00:52.468 PDT [4988] LOG:  received fast shutdown request
2023-04-23 02:00:52.572 PDT [4988] LOG:  aborting any active transactions
2023-04-23 02:00:52.611 PDT [6172] FATAL:  terminating connection due to administrator command
2023-04-23 02:00:52.683 PDT [5984] ERROR:  canceling statement due to user request
2023-04-23 02:00:52.716 PDT [4988] LOG:  background worker "logical replication launcher" (PID 5984) exited with exit code 1
2023-04-23 02:00:52.903 PDT [5916] LOG:  shutting down
2023-04-23 02:00:55.161 PDT [4988] LOG:  database system is shut down

Além disso, conforme sugerido por outros, verifico o Visualizador de eventos e vejo:

2023-04-23 03:33:39.610 PDT [5804] FATAL:  configuration file "C:/Program Files/PostgreSQL/14/data/postgresql.conf" contains errors

Como estou usando o psycopg para trabalhar com db, estou recebendo os seguintes erros:

File "C:\Python310\lib\site-packages\psycopg2\__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061)      
        Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061)
        Is the server running on that host and accepting TCP/IP connections?

arquivo de configuração

Para limitação de tamanho, removi todos os comentários:

listen_addresses = '*'      # what IP address(es) to listen on;
port = 5432         # (change requires restart)
max_connections = 100           # (change requires restart)
shared_buffers = 4096MB         # min 128kB
work_mem = 2000MB               # min 64kB
maintenance_work_mem = 3000MB       # min 1MB
dynamic_shared_memory_type = windows    # the default is the first option
max_wal_size = 1GB
min_wal_size = 80MB
effective_cache_size = 4GB
log_destination = 'stderr'
logging_collector = on      # Enable capturing of stderr and csvlog
log_timezone = 'America/Los_Angeles'
datestyle = 'iso, mdy'
timezone = 'America/Los_Angeles'
lc_messages = 'English_United States.1252'          # locale for system error message
                    # strings
lc_monetary = 'English_United States.1252'          # locale for monetary formatting
lc_numeric = 'English_United States.1252'           # locale for number formatting
lc_time = 'English_United States.1252'              # locale for time formatting
default_text_search_config = 'pg_catalog.english'

Não tenho um backup de banco de dados recente. Como devo conquistar o problema?

postgresql
  • 1 respostas
  • 29 Views

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Você pode passar usuário/passar para autenticação básica HTTP em parâmetros de URL?

    • 5 respostas
  • Marko Smith

    Ping uma porta específica

    • 18 respostas
  • Marko Smith

    Verifique se a porta está aberta ou fechada em um servidor Linux?

    • 7 respostas
  • Marko Smith

    Como automatizar o login SSH com senha?

    • 10 respostas
  • Marko Smith

    Como posso dizer ao Git para Windows onde encontrar minha chave RSA privada?

    • 30 respostas
  • Marko Smith

    Qual é o nome de usuário/senha de superusuário padrão para postgres após uma nova instalação?

    • 5 respostas
  • Marko Smith

    Qual porta o SFTP usa?

    • 6 respostas
  • Marko Smith

    Linha de comando para listar usuários em um grupo do Windows Active Directory?

    • 9 respostas
  • Marko Smith

    O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL?

    • 3 respostas
  • Marko Smith

    Como determinar se uma variável bash está vazia?

    • 15 respostas
  • Martin Hope
    Davie Ping uma porta específica 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    kernel O scp pode copiar diretórios recursivamente? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh retorna "Proprietário incorreto ou permissões em ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil Como automatizar o login SSH com senha? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin Como lidar com um servidor comprometido? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner Como posso classificar a saída du -h por tamanho 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich O que é um arquivo Pem e como ele difere de outros formatos de arquivo de chave gerada pelo OpenSSL? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent Como determinar se uma variável bash está vazia? 2009-05-13 09:54:48 +0800 CST

Hot tag

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve