PostgreSQL as Metabase Application Database

Though I can list the users (i.e. accounts) of my Metabase Application Database (MAD) in PostgreSQL (v14) environment by means of metabase API (https://mydomain/api/user?status=active), I can't see those users in the core_user table in the public schema of the MAD (namely "metabase") using pgAdmin connected to the ubuntu server at , as shown below.
Regards,

Dr. Hayati TASTAN

Hi @haytastan
Post "Diagnostic Info" from Admin > Troubleshooting.
I don't understand. Sounds like you are probably using two different application databases.
https://www.metabase.com/docs/latest/operations-guide/configuring-application-database.html

I searched for "metabase.db.mv.db" using the linux command "find / -name metabase.db.mv.db" and got the message " ‘metabase.db.mv.db’: No such file or directory" which means that I have been successful to migrate initital MAD in H2 into PostgreSQL as explaned at https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html as well as at Redirecting…
Attached is the screenshot of my commands at Ubuntu server which I ınstalled metabase at.
Regards, Dr. Hayati TASTAN

@haytastan Just because you have migrated from H2 to Postgres doesn't mean that the H2 file has been removed, since that is not done via the migration automatically, nor does it tell how you are running Metabase, or if you have called the H2 database something differently.

Post "Diagnostic Info" from Admin > Troubleshooting.

Metabase Diagnostic Info

{
  "browser-info": {
    "language": "tr-TR",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.13+8-Ubuntu-0ubuntu1.20.04",
    "java.vendor": "Ubuntu",
    "java.vendor.url": "https://ubuntu.com/",
    "java.version": "11.0.13",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.13+8-Ubuntu-0ubuntu1.20.04",
    "os.name": "Linux",
    "os.version": "5.4.0-58-generic",
    "user.language": "en",
    "user.timezone": "Europe/Istanbul"
  },
  "metabase-info": {
    "databases": [
      "h2",
      "postgres"
    ],
    "hosting-env": "unknown",
    "application-database": "h2",
    "application-database-details": {
      "database": {
        "name": "H2",
        "version": "1.4.197 (2018-03-18)"
      },
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "1.4.197 (2018-03-18)"
      }
    },
    "run-mode": "prod",
    "version": {
      "date": "2022-02-08",
      "tag": "v0.42.0",
      "branch": "release-x.42.x",
      "hash": "de1264e"
    },
    "settings": {
      "report-timezone": null
    }
  }
}

@haytastan You are not starting with the Postgres application database defined.
I don't know how you are running Metabase, but I guess you are running it as a service:
https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-debian.html

Yes, I am running metabase as a service using the linux command sudo systemctl start
metabase and followed the procedure defined at Redirecting…

@haytastan Then you didn't define the application database correctly, since you're using H2.

Post your environment variable file - redact the username/password.

the content of my my envirenment file:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
JAVA_HOME=“/usr/lib/jvm/java-11-openjdk-amd64/bin/java”
MB_DB_TYPE=postgres
MB_DB_DBNAME=metabase
MB_DB_PORT=5432
MB_DB_USER=metabase
MB_DB_PASS=metabase
MB_DB_HOST=localhost

I selected /usr/lib/jvm/java-11-openjdk-amd64/bin/java using the command sudo update-alternatives --config java

And I reactivated the envirenment variables using the command: source /etc/environment

The screenshot of my server is below:

@haytastan Follow https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-debian.html exactly again, then it will work. You are not loading the environment variables correctly in your service. Make sure to check file permissions.