Re: postgresql-11 installation errors via deb package on ubuntu 16

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Vijaykumar Jain <vjain(at)opentable(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: postgresql-11 installation errors via deb package on ubuntu 16
Date: 2019-03-18 14:36:46
Message-ID: 4c39b821-b89c-9b52-37a0-905c824e15ae@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 3/18/19 7:24 AM, Vijaykumar Jain wrote:
> Hey Guys,
>
> I do not know if this list is also for asking ubuntu package related queries.
>
> We have been recently getting a lot of below errors, as a result of
> which the entire postgresql installation gets broken.
> the config folder /etc/postgresql/* is empty, initdb fails to
> initialize the db and we cannot move forward.
>
> the problem is this is happening only on a certain set of servers, but not all.
> so i do not know if this is an issue with the package or anything else?
> maybe bad mirror?

Per the package below the servers are all Xenial, correct?
More below.

>
> i came across a similar issue but this is ages back.
> https://stackoverflow.com/questions/2748607/how-to-thoroughly-purge-and-reinstall-postgresql-on-ubuntu
> and it was marked close for some reasons.
> i get the part that removing everything and reinstalling the package
> resolves the issue,
>
>
> 24 service postgresql stop
> 25 rm -rf /etc/postgresql*
> 26 rm -rf /var/lib/postgresql*
> 27 rm -rf /var/run/postgresql*
> 28 rm /var/cache/apt/archives/postgresql-*
> 29 apt-get purge postgresql-11
> 30 apt-get purge postgresql-client-common
> 31 rm -rf /var/log/postgresql*
> 32 puppet agent -t --debug --verbose (this takes care of installation)

So what is Puppet actually doing?

Do you have Postgres clusters that exist before you try the initial install?

>
> and then things are fine from here on.
>
>
>
> error messages from /var/log/apt/term.log
>
>
> Preparing to unpack .../postgresql-11_11.2-1.pgdg16.04+1_amd64.deb ...
> Unpacking postgresql-11 (11.2-1.pgdg16.04+1) ...
> Processing triggers for postgresql-common (199.pgdg16.04+1) ...
> Building PostgreSQL dictionaries from installed myspell/hunspell packages...
> Removing obsolete dictionary files:
> Setting up postgresql-11 (11.2-1.pgdg16.04+1) ...
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Unescaped left brace in regex is deprecated, passed through in regex;
> marked by <-- HERE in m/(?<!\\)\${ <-- HERE ([^}]+)}/ at
> /usr/sbin/pam_getenv line 78.
> Configuring already existing cluster (configuration:
> /etc/postgresql/11/main, data: /var/lib/postgresql/11/main, owner:
> 112:118)
> Error: move_conffile: required configuration file
> /var/lib/postgresql/11/main/postgresql.conf does not exist
> Error: could not create default cluster. Please create it manually with
>
> pg_createcluster 11 main --start
>
> ----
> all installation happen via
> deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main 11
>
> this has been really painful to debug, coz i do not know how randomly
> we get these errors and sometimes not.
>
>
>
> Regards,
> Vijay
>
>

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-03-18 14:39:17 Re: Performance of ByteA: ascii vs binary
Previous Message Thomas Güttler 2019-03-18 14:33:17 Performance of ByteA: ascii vs binary