From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Tom K <tomkcpr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: psql: FATAL: the database system is starting up
Date: Sat, 1 Jun 2019 06:55:12 -0700
Message-ID: <43b5c459-6ee4-c8ec-c402-47ea92738c86@aklaver.com> (raw)
In-Reply-To: <CAE3EmBAfMa=eA1LqBB0zf-kZwBPTbRhzY5wUxcPYNQ8hathDQA@mail.gmail.com>
References: <CAE3EmBDX+TRLot5Ar6fJwV_QazSrbQ8JmWb9ZhGtj9wgtu7c_g@mail.gmail.com>
<5b7e0d74-8d6e-c3b8-fb62-3aab1fe0145d@aklaver.com>
<CAE3EmBC5biD+xPEHfGWg0iuTojhWvJrREnSh-3AViQmOsOx9ZQ@mail.gmail.com>
<76851993-4826-f300-85ac-42d8b705a56f@aklaver.com>
<CAE3EmBAfMa=eA1LqBB0zf-kZwBPTbRhzY5wUxcPYNQ8hathDQA@mail.gmail.com>
On 5/31/19 7:53 PM, Tom K wrote:
>
> There are two places to connect with the Patroni community: on github,
> via Issues and PRs, and on channel #patroni in the PostgreSQL Slack. If
> you're using Patroni, or just interested, please join us.
>
>
> Will post there as well. Thank you. My thinking was to post here first
> since I suspect the Patroni community will simply refer me back here
> given that the PostgreSQL errors are originating directly from PostgreSQL.
>
>
> That being said, can you start the copied Postgres instance without
> using the Patroni instrumentation?
>
>
> Yes, that is something I have been trying to do actually. But I hit a
> dead end with the three errors above.
>
> So what I did is to copy a single node's backed up copy of the data
> files to */data/patroni* of the same node ( this is the psql data
> directory as defined through patroni ) of the same node then ran this (
> psql03 = 192.168.0.118 ):
>
> # sudo su - postgres
> $ /usr/pgsql-10/bin/postgres -D /data/patroni
> --config-file=/data/patroni/postgresql.conf
> --listen_addresses=192.168.0.118 --max_worker_processes=8
> --max_locks_per_transaction=64 --wal_level=replica
> --track_commit_timestamp=off --max_prepared_transactions=0 --port=5432
> --max_replication_slots=10 --max_connections=100 --hot_standby=on
> --cluster_name=postgres --wal_log_hints=on --max_wal_senders=10 -d 5
Why all the options?
That should be covered in postgresql.conf, no?
>
> This resulted in one of the 3 messages above. Hence the post here. If
> I can start a single instance, I should be fine since I could then 1)
> replicate over to the other two or 2) simply take a dump, reinitialize
> all the databases then restore the dump.
>
What if you move the recovery.conf file out?
The below looks like missing/corrupted/incorrect files. Hard to tell
without knowing what Patroni did?
> Using the above procedure I get one of three error messages when using
> the data files of each node:
>
> [ PSQL01 ]
> postgres: postgres: startup process waiting for 000000010000000000000008
>
> [ PSQL02 ]
> PANIC:replicationcheckpointhas wrong magic 0 instead of 307747550
>
> [ PSQL03 }
> FATAL:syntax error inhistory file:f2W
>
> And I can't start any one of them.
>
>
>
> >
> > Thx,
> > TK
> >
>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: adrian.klaver@aklaver.com, tomkcpr@gmail.com
Subject: Re: psql: FATAL: the database system is starting up
In-Reply-To: <43b5c459-6ee4-c8ec-c402-47ea92738c86@aklaver.com>
References: <CAE3EmBDX+TRLot5Ar6fJwV_QazSrbQ8JmWb9ZhGtj9wgtu7c_g@mail.gmail.com> <5b7e0d74-8d6e-c3b8-fb62-3aab1fe0145d@aklaver.com> <CAE3EmBC5biD+xPEHfGWg0iuTojhWvJrREnSh-3AViQmOsOx9ZQ@mail.gmail.com> <76851993-4826-f300-85ac-42d8b705a56f@aklaver.com> <CAE3EmBAfMa=eA1LqBB0zf-kZwBPTbRhzY5wUxcPYNQ8hathDQA@mail.gmail.com> <43b5c459-6ee4-c8ec-c402-47ea92738c86@aklaver.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox