listmonk icon indicating copy to clipboard operation
listmonk copied to clipboard

Postgres V14 installation issue

Open amaisonneuvedev opened this issue 1 year ago • 2 comments

Version:

  • listmonk: v3.0.0
  • OS: Ubuntu

Description of the bug and steps to reproduce: Postgres V14 fails on this version

Screenshots:

./listmonk --install

2024/05/20 15:34:45 main.go:64: v0.7.0-alpha (0f055ea 2020-08-09T14:44:45Z) 2024/05/20 15:34:45 init.go:91: reading config: config.toml 2024/05/20 15:34:45 init.go:167: connecting to db: localhost:5432/fadslkfasdlfa

** first time installation ** ** IMPORTANT: This will wipe existing listmonk tables and types in the DB 'MY_DB_NAME' ** continue (y/n)? y 2024/05/20 15:34:48 install.go:51: error loading SQL queries: Error preparing query 'next-campaign-subscribers': pq: SELECT DISTINCT ON expressions must match initial ORDER BY expressions r

amaisonneuvedev avatar May 20 '24 15:05 amaisonneuvedev

Hi @amaisonneuvedev. Did you download the pre-compiled binary from the releases page? The latest release works fine on PG 14. Here's my installation.

listmonk=# select version();
                                                      version                                                      
-------------------------------------------------------------------------------------------------------------------
 PostgreSQL 14.10 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924, 64-bit
(1 row)

knadh avatar May 24 '24 09:05 knadh

Yes, I did.. interesting..

I downloaded it, into the web root and attempted to run the scrip there.

./listmonk --new-config

edited the config.toml and set the needed details.

./listmonk --install

and got the error above.

any thoughts what would be the issue, its a new Postgres install and clean DB.

amaisonneuvedev avatar May 24 '24 14:05 amaisonneuvedev

Can you share the exact Postgres version?

knadh avatar May 25 '24 08:05 knadh

14+238

amaisonneuvedev avatar May 25 '24 11:05 amaisonneuvedev

Any further insights I would like to get this up and running, but it would seem that this version of Postgres has a specific order in how the queries are done.

amaisonneuvedev avatar May 29 '24 12:05 amaisonneuvedev

Sorry, confused about 14+238. These are the actual Postgres releases. Which one are you referring to?


    14.12
    14.11
    14.10
    14.9
    14.8
    14.7
    14.6
    14.5
    14.4
    14.3
    14.2
    14.1
    14.0

https://www.postgresql.org/docs/release/

knadh avatar May 30 '24 16:05 knadh

Just to be clear from a command prompt I get:

psql (PostgreSQL) 14.11 (Ubuntu 14.11-0ubuntu0.22.04.1)

amaisonneuvedev avatar May 30 '24 16:05 amaisonneuvedev

Update I just updated PostgreSQL:

postgresql-14 (14.12-0ubuntu0.22.04.1)

Same Results:

httpdocs/list# ./listmonk --install

2024/05/30 17:26:44 install.go:51: error loading SQL queries: Error preparing query 'next-campaign-subscribers': pq: SELECT DISTINCT ON expressions must match initial ORDER BY expressions

amaisonneuvedev avatar May 30 '24 17:05 amaisonneuvedev

Any further insights on this issue and how i could possibly correct things?

amaisonneuvedev avatar Jun 10 '24 12:06 amaisonneuvedev

I'm not sure what's happening in your case. I've tested listmonk with version 14.2 specifically (it works fine with the latest Postgres 16 also) and it works fine. Have not received this particular report from elsewhere either. Please try a different version.

Here's Postgres v14.12:

listmonk=# select version();
                                                        version                                                        
-----------------------------------------------------------------------------------------------------------------------
 PostgreSQL 14.12 (Debian 14.12-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
(1 row)
$ ./listmonk --config=/tmp/config.toml --install --yes
2024/06/10 19:31:13 main.go:102: v3.0.0 (f9120d9 2024-02-04T11:20:27Z, linux/amd64)
2024/06/10 19:31:13 init.go:150: reading config: /tmp/config.toml
2024/06/10 19:31:13 init.go:289: connecting to db: localhost:5432/listmonk

** first time installation **
** IMPORTANT: This will wipe existing listmonk tables and types in the DB 'listmonk' **
2024/06/10 19:31:13 install.go:179: setup complete
2024/06/10 19:31:13 install.go:180: run the program and access the dashboard at 0.0.0.0:9000

knadh avatar Jun 10 '24 14:06 knadh