Thread

  1. Need Support to Upgrade from 13.6 to 15.3

    Dippu Kumar <dippu.k@deeplynx.com> — 2023-05-16T08:58:18Z

    Dear Support Team,
    I'm facing an issue while upgrading PostgreSQL from version 13.6 to 15.3.
    Here are steps I'm following:
    - I hosted my existing PostgreSQL 13.6 instance on AWS (Ubuntu)
    - I create an instance using AMIs ( same image of hosted instance )
    - I run the below command after a few steps , I face initdb issue
    sudo apt install postgresql
    I need your help here.
    
    sudo pg_createcluster 15 main --start
    
    Creating new PostgreSQL cluster 15/main ...
    
    /usr/lib/postgresql/15/bin/initdb -D /var/lib/postgresql/15/main
    --auth-local peer --auth-host scram-sha-256 --no-instructions
    
    /usr/lib/postgresql/15/bin/initdb: symbol lookup error:
    /usr/lib/postgresql/15/bin/initdb: undefined symbol: PQmblenBounded
    
    Error: initdb failed
    
  2. Re: Need Support to Upgrade from 13.6 to 15.3

    Jeff Janes <jeff.janes@gmail.com> — 2023-05-17T23:43:47Z

    On Tue, May 16, 2023 at 5:07 AM Dippu Kumar <dippu.k@deeplynx.com> wrote:
    
    > Dear Support Team,
    > - I run the below command after a few steps , I face initdb issue
    > sudo apt install postgresql
    >
    
    
    > sudo pg_createcluster 15 main --start
    >
    > Creating new PostgreSQL cluster 15/main ...
    >
    > /usr/lib/postgresql/15/bin/initdb -D /var/lib/postgresql/15/main
    > --auth-local peer --auth-host scram-sha-256 --no-instructions
    >
    > /usr/lib/postgresql/15/bin/initdb: symbol lookup error:
    > /usr/lib/postgresql/15/bin/initdb: undefined symbol: PQmblenBounded
    >
    > Error: initdb failed
    >
    
    I can't reproduce this.  What release of Ubuntu are you using? (Maybe what
    specific API?) What machine type? What repository are you installing from?
    (I don't think any Ubuntu is coming with PostgreSQL v15 right now by
    default from the default repo).  Do you have to have already installed v13
    first before you get this problem?
    
    Cheers,
    
    Jeff
    
  3. Re: Need Support to Upgrade from 13.6 to 15.3

    Tom Lane <tgl@sss.pgh.pa.us> — 2023-05-17T23:50:42Z

    Jeff Janes <jeff.janes@gmail.com> writes:
    > On Tue, May 16, 2023 at 5:07 AM Dippu Kumar <dippu.k@deeplynx.com> wrote:
    >> /usr/lib/postgresql/15/bin/initdb -D /var/lib/postgresql/15/main
    >> --auth-local peer --auth-host scram-sha-256 --no-instructions
    >> /usr/lib/postgresql/15/bin/initdb: symbol lookup error:
    >> /usr/lib/postgresql/15/bin/initdb: undefined symbol: PQmblenBounded
    
    > I can't reproduce this.
    
    This is pretty clearly a case of the initdb executable binding to
    an old copy of libpq.so.  You could find out which one by running
    "ldd /usr/lib/postgresql/15/bin/initdb".  Then, update that
    installation to something released in the last two years.  Or
    perhaps better, fix your dynamic linker search path so that it
    finds the libpq.so that came with your v15 Postgres installation.
    
    			regards, tom lane
    
    
    
    
  4. Re: Need Support to Upgrade from 13.6 to 15.3

    Dippu Kumar <dippu.k@deeplynx.com> — 2023-05-19T13:25:56Z

    Hello Tom Lane,
    Thank you for your response! I really appreciate it.
    I don't know why I couldn't make it well. I got tired after doing many
    approaches.
    I tried 3 approaches for this :
    *Approach 1* :
    I tried with a new instance installed postgresql version 13 then created
    some test DB, and inserts a few data into a table. Then update version 15,
    I can see all data - *Succeed*
    *Approach 2 *:
    I tried with a new instance installed postgresql version 13 then created an
    Image of this instance and launched a new instance using this image (AMIs).
    Then update version 15, I can see all data of version 13 - *Succeed*
    *Approach 3 : *
        I launch a new instance using the latest image of our postgresql
    instance. Then update version 15, it shows error - *Failed*
        => Reasons or error :
        /usr/lib/postgresql/15/bin/pg_upgrade: symbol lookup error:
    /usr/lib/postgresql/15/bin/pg_upgrade: undefined symbol: PQmblenBounded
    
          - Always get *PQmblenBounded *error whenever I try to execute
    postgresql binary.
    *Information:*
    *    -* I'm using Postgresql 13.6 which is hosted on Ubuntu ( 18.04.6 LTS,
    Codename : bionic)
        - DB Data is more than 650 GB so I can't go with *pgdump *option
    You suggested that I fix a dynamic linker but I always get some errors and
    finally I am stuck in a loop of these solutions.
    If I try to fix one another problem come up.
    Please suggest steps to complete this task.I'm writing to you as a last
    option, I stopped searching on google.
    
    *Thanks & Regards*
    *Dippu*
    
    
    
    
    
    
    
    
    On Thu, May 18, 2023 at 5:20 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
    
    > Jeff Janes <jeff.janes@gmail.com> writes:
    > > On Tue, May 16, 2023 at 5:07 AM Dippu Kumar <dippu.k@deeplynx.com>
    > wrote:
    > >> /usr/lib/postgresql/15/bin/initdb -D /var/lib/postgresql/15/main
    > >> --auth-local peer --auth-host scram-sha-256 --no-instructions
    > >> /usr/lib/postgresql/15/bin/initdb: symbol lookup error:
    > >> /usr/lib/postgresql/15/bin/initdb: undefined symbol: PQmblenBounded
    >
    > > I can't reproduce this.
    >
    > This is pretty clearly a case of the initdb executable binding to
    > an old copy of libpq.so.  You could find out which one by running
    > "ldd /usr/lib/postgresql/15/bin/initdb".  Then, update that
    > installation to something released in the last two years.  Or
    > perhaps better, fix your dynamic linker search path so that it
    > finds the libpq.so that came with your v15 Postgres installation.
    >
    >                         regards, tom lane
    >
    
  5. Re: Need Support to Upgrade from 13.6 to 15.3

    Alvaro Herrera <alvherre@alvh.no-ip.org> — 2023-05-23T08:48:40Z

    On 2023-May-19, Dippu Kumar wrote:
    
    > You suggested that I fix a dynamic linker but I always get some errors and
    > finally I am stuck in a loop of these solutions.
    
    What did you try to fix the dynamic linker?  Since you mentioned Ubuntu,
    maybe look at /etc/ld.so.conf.d.  Also: maybe show the output of `ldd
    /path/to/initdb` (for all versions of initdb).
    
    -- 
    Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
    "I dream about dreams about dreams", sang the nightingale
    under the pale moon (Sandman)
    
    
    
    
  6. Re: Need Support to Upgrade from 13.6 to 15.3

    Dippu Kumar <dippu.k@deeplynx.com> — 2023-05-23T09:20:32Z

    Thank you for your response!
    I've attached what you asked for.PFA.
    I tried every possible way but couldn't make it.
    Whatever I do it's always pointing me to '*undefined symbol: PQmblenBounded*'.
    So it's kind of loop of problems where I stucked.
    
    
    
    
    On Tue, May 23, 2023 at 2:18 PM Alvaro Herrera <alvherre@alvh.no-ip.org>
    wrote:
    
    > On 2023-May-19, Dippu Kumar wrote:
    >
    > > You suggested that I fix a dynamic linker but I always get some errors
    > and
    > > finally I am stuck in a loop of these solutions.
    >
    > What did you try to fix the dynamic linker?  Since you mentioned Ubuntu,
    > maybe look at /etc/ld.so.conf.d.  Also: maybe show the output of `ldd
    > /path/to/initdb` (for all versions of initdb).
    >
    > --
    > Álvaro Herrera               48°01'N 7°57'E  —
    > https://www.EnterpriseDB.com/
    > "I dream about dreams about dreams", sang the nightingale
    > under the pale moon (Sandman)
    >
    
  7. Re: Need Support to Upgrade from 13.6 to 15.3

    Alvaro Herrera <alvherre@alvh.no-ip.org> — 2023-05-23T09:28:05Z

    On 2023-May-23, Dippu Kumar wrote:
    
    > =>>ldd for initdb
    > ldd /usr/lib/postgresql/15/bin/initdb
    > 	linux-vdso.so.1 (0x00007ffe52231000)
    > 	libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5 (0x00007fddbb92d000)
    
    Please run
    
    dpkg -S /usr/lib/x86_64-linux-gnu/libpq.so.5
    apt policy libpq5
    
    and paste the output of both commands.
    
    -- 
    Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
    "Cuando mañana llegue pelearemos segun lo que mañana exija" (Mowgli)
    
    
    
    
  8. Re: Need Support to Upgrade from 13.6 to 15.3

    Dippu Kumar <dippu.k@deeplynx.com> — 2023-05-23T09:31:51Z

    Here are:
    =>>
    dpkg -S /usr/lib/x86_64-linux-gnu/libpq.so.5
    libpq5:amd64: /usr/lib/x86_64-linux-gnu/libpq.so.5
    
    =>>
    apt policy libpq5
    libpq5:
      Installed: 2:13.10-1.bionic
      Candidate: 2:13.10-1.bionic
      Version table:
     *** 2:13.10-1.bionic 500
            500 http://repo.percona.com/ppg-13/apt bionic/main amd64 Packages
            100 /var/lib/dpkg/status
         2:13.9-1.bionic 500
            500 http://repo.percona.com/ppg-13/apt bionic/main amd64 Packages
         2:13.8-3.bionic 500
            500 http://repo.percona.com/ppg-13/apt bionic/main amd64 Packages
         2:13.7-3.bionic 500
            500 http://repo.percona.com/ppg-13/apt bionic/main amd64 Packages
         2:13.6-3.bionic 500
            500 http://repo.percona.com/ppg-13/apt bionic/main amd64 Packages
         15.3-1.pgdg18.04+1 500
            500 http://apt.postgresql.org/pub/repos/apt bionic-pgdg/main amd64
    Packages
         10.23-0ubuntu0.18.04.1 500
            500 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu
    bionic-updates/main amd64 Packages
         10.22-0ubuntu0.18.04.1 500
            500 http://security.ubuntu.com/ubuntu bionic-security/main amd64
    Packages
         10.3-1 500
            500 http://ap-southeast-1.ec2.archive.ubuntu.com/ubuntu bionic/main
    amd64 Packages
    
    On Tue, May 23, 2023 at 2:58 PM Alvaro Herrera <alvherre@alvh.no-ip.org>
    wrote:
    
    > On 2023-May-23, Dippu Kumar wrote:
    >
    > > =>>ldd for initdb
    > > ldd /usr/lib/postgresql/15/bin/initdb
    > >       linux-vdso.so.1 (0x00007ffe52231000)
    > >       libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5
    > (0x00007fddbb92d000)
    >
    > Please run
    >
    > dpkg -S /usr/lib/x86_64-linux-gnu/libpq.so.5
    > apt policy libpq5
    >
    > and paste the output of both commands.
    >
    > --
    > Álvaro Herrera         PostgreSQL Developer  —
    > https://www.EnterpriseDB.com/
    > "Cuando mañana llegue pelearemos segun lo que mañana exija" (Mowgli)
    >
    
  9. Re: Need Support to Upgrade from 13.6 to 15.3

    Alvaro Herrera <alvherre@alvh.no-ip.org> — 2023-05-23T09:45:13Z

    On 2023-May-23, Dippu Kumar wrote:
    
    > apt policy libpq5
    > libpq5:
    >   Installed: 2:13.10-1.bionic
    >   Candidate: 2:13.10-1.bionic
    >   Version table:
    >  *** 2:13.10-1.bionic 500
    >         500 http://repo.percona.com/ppg-13/apt bionic/main amd64 Packages
    >         100 /var/lib/dpkg/status
    
    So you seem to have a Percona repository enabled, and the libpq5 package
    comes from there.  You need to ask Percona about this, not the Postgres
    community -- or maybe get rid of the Percona repo completely, as it is
    clearly breaking your system.
    
    Also, maybe upgrade from Bionic.
    
    -- 
    Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
    "The important things in the world are problems with society that we don't
    understand at all. The machines will become more complicated but they won't
    be more complicated than the societies that run them."    (Freeman Dyson)
    
    
    
    
  10. Re: Need Support to Upgrade from 13.6 to 15.3

    Dippu Kumar <dippu.k@deeplynx.com> — 2023-05-23T11:20:39Z

    I really appreciate your help!
    Please provide me with steps to do this.
    Will it impact my existing data (+ 650 GB) and compatibility?
    
    On Tue, May 23, 2023 at 3:15 PM Alvaro Herrera <alvherre@alvh.no-ip.org>
    wrote:
    
    > On 2023-May-23, Dippu Kumar wrote:
    >
    > > apt policy libpq5
    > > libpq5:
    > >   Installed: 2:13.10-1.bionic
    > >   Candidate: 2:13.10-1.bionic
    > >   Version table:
    > >  *** 2:13.10-1.bionic 500
    > >         500 http://repo.percona.com/ppg-13/apt bionic/main amd64
    > Packages
    > >         100 /var/lib/dpkg/status
    >
    > So you seem to have a Percona repository enabled, and the libpq5 package
    > comes from there.  You need to ask Percona about this, not the Postgres
    > community -- or maybe get rid of the Percona repo completely, as it is
    > clearly breaking your system.
    >
    > Also, maybe upgrade from Bionic.
    >
    > --
    > Álvaro Herrera               48°01'N 7°57'E  —
    > https://www.EnterpriseDB.com/
    > "The important things in the world are problems with society that we don't
    > understand at all. The machines will become more complicated but they won't
    > be more complicated than the societies that run them."    (Freeman Dyson)
    >