Re: psql: FATAL: the database system is starting up

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Tom K <tomkcpr(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: psql: FATAL: the database system is starting up
Date: 2019-06-01 21:46:27
Message-ID: 8fb107a7-58e4-99ed-a0b3-04d739c162ff@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 6/1/19 2:30 PM, Tom K wrote:
>
>
> On Sat, Jun 1, 2019 at 4:52 PM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
>
> On 6/1/19 12:42 PM, Tom K wrote:
> >
> >
>
> >
> > Of note are the characters f2W below.  I see nothing in the postgres
> > source code to indicate this is any recognizable postgres
> message.  A
> > part of me suspects that the postgres binaries got corrupted.
> Had this
> > case occur with glib-common and a reinstall fixed it.  However the
> > postgres binaries csum matches a standalone install perfectly so
> that
> > should not be an issue.
>
> It comes from timeline.c:
>
> https://doxygen.postgresql.org/bin_2pg__rewind_2timeline_8c.html
>
> pg_log_error("syntax error in history file: %s", fline);
>
> ...
>
> There should be another error message after the above.
>
>
> Nope.  Here's the full set of lines in the postgres logs when running
> the above line:
>

> 2019-06-01 17:13:03.263 EDT [14909] FATAL:  syntax error in history
> file: f2W
> 2019-06-01 17:13:03.263 EDT [14909] HINT:  Expected a numeric timeline ID.

Actually the above HINT is what I was looking for.

> ^C
> -bash-4.2$
>
> What's interesting is that f2W isn't a string you'd expect to be printed
> as part of the code logic   ( I mean, what is f2W? ).

As the HINT said neither was Postgres. That is probably down to file
corruption.

>
> The point of the POC and the LAB is to test these things across failures
> as well as various configurations.  To that end, I'm just as curious how
> to recover from these error conditions as I am just getting things to work.

I think what it proved was that a single point of failure is not good
and that there needs to be steps taken to prevent or deal with it e.g.
second location backup of some sort.

>
>
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-06-01 21:51:06 Re: psql: FATAL: the database system is starting up
Previous Message Tom K 2019-06-01 21:31:47 Re: psql: FATAL: the database system is starting up