Thread

  1. BUG #18078: createdb not working

    PG Bug reporting form <noreply@postgresql.org> — 2023-08-31T15:04:50Z

    The following bug has been logged on the website:
    
    Bug reference:      18078
    Logged by:          Orhan Punar
    Email address:      exaltedsoft@gmail.com
    PostgreSQL version: 15.4
    Operating system:   ubuntu 22.04.03
    Description:        
    
    Hi, 
    
    Since i updated postgresql i receive errors when i try to createdb as
    postgres user. The new package has bugs, it has affected my server instances
    as well. Is this a known bug?
    
    Best regards,
    Orhan Punar
    
    
  2. Re: BUG #18078: createdb not working

    Daniel Gustafsson <daniel@yesql.se> — 2023-08-31T16:20:12Z

    > On 31 Aug 2023, at 17:04, PG Bug reporting form <noreply@postgresql.org> wrote:
    
    > Since i updated postgresql i receive errors when i try to createdb as
    > postgres user. The new package has bugs, it has affected my server instances
    > as well. Is this a known bug?
    
    Since you haven't provided a single piece of information about what you
    percieve as wrong there is no way for anyone to help you.
    
    --
    Daniel Gustafsson
    
    
    
    
    
  3. Re: BUG #18078: createdb not working

    Orhan Punar <exaltedsoft@gmail.com> — 2023-08-31T16:54:41Z

    That's not fair.
    
    I installed postgresql on ubuntu version 22.04.3, i am using postgres 15.4.
    Prior to this I was using the latest LTS versions. This was done on my home
    laptop.
    
    After installation i switch to the postgres user. And I type createdb
    command with the following options.
    
    createdb -p 5432 -U postgres {clustername}
    
    This worked perfectly fine and I could create this without issue. Whenever
    I do this now nothing happens, there is no message or anything. I think
    this is an ubuntu issue since postgres hasn't been updated for a long time.
    
    So i tried with another port number like 5433 then i get this error:
    
    createdb: error: connection to server on socket
    "/var/run/postgresql/.s.PGSQL.5433" failed: No such file or directory
    Is the server running locally and accepting connections on that socket?
    
    I have also tried the initdb command to initialize database clusters but
    had no success.
    
    Is there another way to achieve this? i've checked most of the
    documentations.
    
    Orhan Punar
    
    On Thu, Aug 31, 2023 at 6:20 PM Daniel Gustafsson <daniel@yesql.se> wrote:
    
    > > On 31 Aug 2023, at 17:04, PG Bug reporting form <noreply@postgresql.org>
    > wrote:
    >
    > > Since i updated postgresql i receive errors when i try to createdb as
    > > postgres user. The new package has bugs, it has affected my server
    > instances
    > > as well. Is this a known bug?
    >
    > Since you haven't provided a single piece of information about what you
    > percieve as wrong there is no way for anyone to help you.
    >
    > --
    > Daniel Gustafsson
    >
    >
    
    -- 
    *Exalted Soft*
    CEO
    Orhan Punar
    
  4. Re: BUG #18078: createdb not working

    Jeff Janes <jeff.janes@gmail.com> — 2023-08-31T17:12:45Z

    On Thu, Aug 31, 2023 at 12:12 PM PG Bug reporting form <
    noreply@postgresql.org> wrote:
    
    > The following bug has been logged on the website:
    >
    > Bug reference:      18078
    > Logged by:          Orhan Punar
    > Email address:      exaltedsoft@gmail.com
    > PostgreSQL version: 15.4
    > Operating system:   ubuntu 22.04.03
    > Description:
    >
    > Hi,
    >
    > Since i updated postgresql i receive errors when i try to createdb as
    > postgres user. The new package has bugs, it has affected my server
    > instances
    > as well. Is this a known bug?
    >
    >
    createdb in 15.4 works for me.  And presumably lots of other people, this
    is not the kind of thing that would go unnoticed.
    
    You will need to provide some actual information.  Like, what your complete
    command was, and quote what error you got. Also how you installed and
    upgraded (and upgraded from what) might be useful.
    
    Cheers,
    
    Jeff
    
  5. Re: BUG #18078: createdb not working

    Orhan Punar <exaltedsoft@gmail.com> — 2023-08-31T17:21:18Z

    Have you tried the command in ubuntu 22.04.3 LTS version?
    ,,
    Orhan
    
    On Thu, Aug 31, 2023 at 7:12 PM Jeff Janes <jeff.janes@gmail.com> wrote:
    
    > On Thu, Aug 31, 2023 at 12:12 PM PG Bug reporting form <
    > noreply@postgresql.org> wrote:
    >
    >> The following bug has been logged on the website:
    >>
    >> Bug reference:      18078
    >> Logged by:          Orhan Punar
    >> Email address:      exaltedsoft@gmail.com
    >> PostgreSQL version: 15.4
    >> Operating system:   ubuntu 22.04.03
    >> Description:
    >>
    >> Hi,
    >>
    >> Since i updated postgresql i receive errors when i try to createdb as
    >> postgres user. The new package has bugs, it has affected my server
    >> instances
    >> as well. Is this a known bug?
    >>
    >>
    > createdb in 15.4 works for me.  And presumably lots of other people, this
    > is not the kind of thing that would go unnoticed.
    >
    > You will need to provide some actual information.  Like, what your
    > complete command was, and quote what error you got. Also how you installed
    > and upgraded (and upgraded from what) might be useful.
    >
    > Cheers,
    >
    > Jeff
    >
    
    
    -- 
    *Exalted Soft*
    CEO
    Orhan Punar
    
  6. Re: BUG #18078: createdb not working

    Daniel Gustafsson <daniel@yesql.se> — 2023-08-31T17:37:52Z

    > On 31 Aug 2023, at 18:54, Orhan Punar <exaltedsoft@gmail.com> wrote:
    
    > createdb: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5433" failed: No such file or directory
    > Is the server running locally and accepting connections on that socket?
    
    As the error states, there is no server running on that socket and port.  Have
    you actually started the server?
    
    This is almost guaranteed to not be a postgres bug, I recommend posting on the
    pgsql-general mailinglist for assistance.
    
    --
    Daniel Gustafsson
    
    
    
    
    
  7. Re: BUG #18078: createdb not working

    Orhan Punar <exaltedsoft@gmail.com> — 2023-08-31T17:41:19Z

    sudo pg_createcluster 15 {clustername} -p 5432 -u postgres
    
    This worked, thanks for the help ;DDD
    
    On Thu, Aug 31, 2023 at 7:37 PM Daniel Gustafsson <daniel@yesql.se> wrote:
    
    > > On 31 Aug 2023, at 18:54, Orhan Punar <exaltedsoft@gmail.com> wrote:
    >
    > > createdb: error: connection to server on socket
    > "/var/run/postgresql/.s.PGSQL.5433" failed: No such file or directory
    > > Is the server running locally and accepting connections on that socket?
    >
    > As the error states, there is no server running on that socket and port.
    > Have
    > you actually started the server?
    >
    > This is almost guaranteed to not be a postgres bug, I recommend posting on
    > the
    > pgsql-general mailinglist for assistance.
    >
    > --
    > Daniel Gustafsson
    >
    >
    
    -- 
    *Exalted Soft*
    CEO
    Orhan Punar
    
  8. Re: BUG #18078: createdb not working

    Andrew Dunstan <andrew@dunslane.net> — 2023-08-31T19:59:23Z

    On 2023-08-31 Th 13:21, Orhan Punar wrote:
    > Have you tried the command in ubuntu 22.04.3 LTS version?
    
    
    Yes:
    
    
    postgres@da3e702c6a02:~$ pg_ctlcluster 15 main start
    postgres@da3e702c6a02:~$ psql -l
                                                  List of databases
        Name    |  Owner   | Encoding | Collate |  Ctype  | ICU Locale | 
    Locale Provider |   Access privileges
    -----------+----------+----------+---------+---------+------------+-----------------+-----------------------
      postgres  | postgres | UTF8     | C.UTF-8 | C.UTF-8 | | libc            |
      template0 | postgres | UTF8     | C.UTF-8 | C.UTF-8 | | 
    libc            | =c/postgres          +
                |          |          |         |         | 
    |                 | postgres=CTc/postgres
      template1 | postgres | UTF8     | C.UTF-8 | C.UTF-8 | | 
    libc            | =c/postgres          +
                |          |          |         |         | 
    |                 | postgres=CTc/postgres
    (3 rows)
    
    postgres@da3e702c6a02:~$ createdb blurfl
    postgres@da3e702c6a02:~$ psql -l
                                                  List of databases
        Name    |  Owner   | Encoding | Collate |  Ctype  | ICU Locale | 
    Locale Provider |   Access privileges
    -----------+----------+----------+---------+---------+------------+-----------------+-----------------------
      blurfl    | postgres | UTF8     | C.UTF-8 | C.UTF-8 | | libc            |
      postgres  | postgres | UTF8     | C.UTF-8 | C.UTF-8 | | libc            |
      template0 | postgres | UTF8     | C.UTF-8 | C.UTF-8 | | 
    libc            | =c/postgres          +
                |          |          |         |         | 
    |                 | postgres=CTc/postgres
      template1 | postgres | UTF8     | C.UTF-8 | C.UTF-8 | | 
    libc            | =c/postgres          +
                |          |          |         |         | 
    |                 | postgres=CTc/postgres
    (4 rows)
    
    postgres@da3e702c6a02:~$ cat /etc/os-release
    PRETTY_NAME="Ubuntu 22.04.3 LTS"
    NAME="Ubuntu"
    VERSION_ID="22.04"
    VERSION="22.04.3 LTS (Jammy Jellyfish)"
    VERSION_CODENAME=jammy
    ID=ubuntu
    ID_LIKE=debian
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    UBUNTU_CODENAME=jammy
    
    
    It's not clear what you're doing wrong, but there does not appear to be 
    any bug.
    
    
    cheers
    
    
    andrew
    
    
    --
    Andrew Dunstan
    EDB:https://www.enterprisedb.com