Re: Corrupted data due to system power failure - Mailing list pgsql-hackers
From | Gaetano Mendola |
---|---|
Subject | Re: Corrupted data due to system power failure |
Date | |
Msg-id | CAJycT5pQ7_oPcnw_XshE5eci97y=LCC=7jMXikaFQNC-5h7Ssw@mail.gmail.com Whole thread Raw |
In response to | Corrupted data due to system power failure (Enzo Diletti <E.Diletti@selettra.com>) |
List | pgsql-hackers |
This kind of reports is the exact reason you should never install the OS in a different language than english. you could have at least googled for the exact phrase "controllo di integrita fallito...." to see how other people have solved it.
On Mon, 12 Mar 2018 at 14:50 Enzo Diletti <E.Diletti@selettra.com> wrote:
A description of what you are trying to achieve and what results you expect: we'd like to recover the more data possible from a damaged psql databasePostgreSQL version number you are running: PostgreSQL 9.6.6 on x86_64-pc-linux-gnu, compiled by gcc (Debian 6.3.0-18) 6.3.0 20170516, 64-bitHow you installed PostgreSQL: Installed via APT, version 9.6+181+deb9u1 (/var/lib/apt/lists/ftp.it.debian.org_debian_dists_stretch_main_binary-amd64_Packages) (/var/lib/apt/lists/security.debian.org_debian-security_dists_stretch_updates_main_binary-amd64_Packages)Changes made to the settings in the postgresql.conf file:name | current_setting | source----------------------------+------------------------------------------+----------------------application_name | psql | clientclient_encoding | UTF8 | clientcluster_name | 9.6/main | configuration fileDateStyle | ISO, DMY | configuration filedefault_text_search_config | pg_catalog.italian | configuration filedynamic_shared_memory_type | posix | configuration fileexternal_pid_file | /var/run/postgresql/9.6-main.pid | configuration fileignore_system_indexes | on | configuration filelc_messages | it_IT.UTF-8 | configuration filelc_monetary | it_IT.UTF-8 | configuration filelc_numeric | it_IT.UTF-8 | configuration filelc_time | it_IT.UTF-8 | configuration filelisten_addresses | * | configuration filelog_line_prefix | %m [%p] %q%u@%d | configuration filelog_timezone | localtime | configuration filemax_connections | 100 | configuration filemax_stack_depth | 2MB | environment variableport | 5432 | configuration fileshared_buffers | 128MB | configuration filessl | on | configuration filessl_cert_file | /etc/ssl/certs/ssl-cert-snakeoil.pem | configuration filessl_key_file | /etc/ssl/private/ssl-cert-snakeoil.key | configuration filestats_temp_directory | /var/run/postgresql/9.6-main.pg_stat_tmp | configuration fileTimeZone | localtime | configuration fileunix_socket_directories | /var/run/postgresql | configuration filezero_damaged_pages | on | configuration fileOperating system and version: Linux sbiron 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3 (2017-12-03) x86_64 GNU/LinuxWhat program you're using to connect to PostgreSQL: command line tool and pgAdmin4Is there anything relevant or unusual in the PostgreSQL server logs?: there are many errors also due to a read-only mount of the filesystem after the server rebooted; we can still read "incomplete boot packet" (I don't the exact text because we have italian language text, that says "pacchetto di avvio incompleto").For questions about any kind of error:What you were doing when the error happened / how to cause the error: a system power failure happened. When it happened, none was working on the database because the working day was already finished from some hour. No scheduled job was running.The EXACT TEXT of the error message you're getting, if there is one: when we had the info early this morning, postgres failed to start. We tried to run pg_resetxlog, after that psql was able to start but we cannot access the data. Tried to reindex, vacuum analyze: finally we can access to data, but a very few part of them. Then, we added ignore_system_index=on and zero_damaged_pages=on and we tried to reindex but it fails. When we try to rum pg_dumpall we have:pg_dump: ATTENZIONE: using index "pg_toast_2618_index" despite IgnoreSystemIndexesRIGA 1: ....tableoid, n.oid, n.nspname, (SELECT rolname FROM pg_catalog...^pg_dump: ATTENZIONE: using index "pg_toast_2619_index" despite IgnoreSystemIndexespg_dump: ATTENZIONE: using index "pg_toast_2618_index" despite IgnoreSystemIndexesRIGA 1: ....tableoid, n.oid, n.nspname, (SELECT rolname FROM pg_catalog...^pg_dump: ATTENZIONE: using index "pg_toast_2619_index" despite IgnoreSystemIndexespg_dump: ATTENZIONE: using index "pg_toast_2619_index" despite IgnoreSystemIndexespg_dump: ATTENZIONE: using index "pg_toast_2618_index" despite IgnoreSystemIndexesRIGA 1: ....tableoid, n.oid, n.nspname, (SELECT rolname FROM pg_catalog...^pg_dump: controllo di integrità fallito, tabella con OID 17909 proprietaria della sequenza con OID 17907 non trovatapg_dumpall: pg_dump fallito per il database "smartboard_users_op", in uscitaSome other details about the server: it is runnig on Hyper-V (6.3.9600.16384 on Win Server 2012 R2 Standard) as the only virtual machine on the host with 80GB vhd dinamic disk, 2 vCPU and 2GB RAM.Thanks in advanceEnzo Diletti
pgsql-hackers by date: