PostgreSQL fields not found

Hello,
I'm new to using Metabase...
I downloaded latest version (using docker).
I connected my different dbs and have 2 issues.
First one is that the schemas are not identified in my PostgreSQL with following log error:

[afd50ee1-a235-4ac0-a0e7-673169cb958a] 2022-08-04T13:29:13+02:00 ERROR metabase.query-processor.middleware.catch-exceptions Erreur lors du traitement de la requête : Aucun champ trouvé pour la table "pcbl_pcb".
{:database_id 3,
 :started_at #t "2022-08-04T11:29:13.008652Z[GMT]",
 :error_type :invalid-query,
 :json_query
 {:database 3,
  :query {:source-table 62},
  :type "query",
  :parameters [],
  :middleware {:js-int-to-string? true, :add-default-userland-constraints? true}},
 :native nil,
 :status :failed,
 :class clojure.lang.ExceptionInfo,
 :stacktrace
 ["--> query_processor.middleware.add_implicit_clauses$fn__51151$sorted_implicit_fields_for_table__51156$fn__51157.invoke(add_implicit_clauses.clj:47)"
  "query_processor.middleware.add_implicit_clauses$fn__51151$sorted_implicit_fields_for_table__51156.invoke(add_implicit_clauses.clj:41)"
  "query_processor.middleware.add_implicit_clauses$fn__51275$add_implicit_fields__51280$fn__51284.invoke(add_implicit_clauses.clj:107)"
  "query_processor.middleware.add_implicit_clauses$fn__51275$add_implicit_fields__51280.invoke(add_implicit_clauses.clj:100)"
  "query_processor.middleware.add_implicit_clauses$add_implicit_mbql_clauses$fn__51358.invoke(add_implicit_clauses.clj:150)"
  "query_processor.middleware.add_implicit_clauses$add_implicit_mbql_clauses.invokeStatic(add_implicit_clauses.clj:143)"
  "query_processor.middleware.add_implicit_clauses$add_implicit_mbql_clauses.invoke(add_implicit_clauses.clj:140)"
  "query_processor.middleware.add_implicit_clauses$add_implicit_clauses.invokeStatic(add_implicit_clauses.clj:160)"
  "query_processor.middleware.add_implicit_clauses$add_implicit_clauses.invoke(add_implicit_clauses.clj:154)"
  "query_processor$preprocess_STAR_$fn__52919.invoke(query_processor.clj:124)"
  "query_processor$preprocess_STAR_.invokeStatic(query_processor.clj:122)"
  "query_processor$preprocess_STAR_.invoke(query_processor.clj:117)"
  "query_processor$fn__52927$combined_pre_process__52928$combined_pre_process_STAR___52929.invoke(query_processor.clj:204)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__51374$fn__51379.invoke(resolve_database_and_driver.clj:35)"
  "driver$do_with_driver.invokeStatic(driver.clj:75)"
  "driver$do_with_driver.invoke(driver.clj:71)"
  "query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__51374.invoke(resolve_database_and_driver.clj:34)"
  "query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__47479.invoke(fetch_source_query.clj:281)"
  "query_processor.middleware.store$initialize_store$fn__47667$fn__47668.invoke(store.clj:11)"
  "query_processor.store$do_with_store.invokeStatic(store.clj:44)"
  "query_processor.store$do_with_store.invoke(store.clj:38)"
  "query_processor.middleware.store$initialize_store$fn__47667.invoke(store.clj:10)"
  "query_processor.middleware.normalize_query$normalize$fn__51646.invoke(normalize_query.clj:22)"
  "query_processor.middleware.constraints$add_default_userland_constraints$fn__48736.invoke(constraints.clj:53)"
  "query_processor.middleware.process_userland_query$process_userland_query$fn__51585.invoke(process_userland_query.clj:145)"
  "query_processor.middleware.catch_exceptions$catch_exceptions$fn__51957.invoke(catch_exceptions.clj:168)"
  "query_processor.reducible$async_qp$qp_STAR___44206$thunk__44208.invoke(reducible.clj:100)"
  "query_processor.reducible$async_qp$qp_STAR___44206.invoke(reducible.clj:106)"
  "query_processor.reducible$async_qp$qp_STAR___44206.invoke(reducible.clj:91)"
  "query_processor.reducible$sync_qp$qp_STAR___44217.doInvoke(reducible.clj:126)"
  "query_processor$process_userland_query.invokeStatic(query_processor.clj:326)"
  "query_processor$process_userland_query.doInvoke(query_processor.clj:322)"
  "query_processor$fn__52974$process_query_and_save_execution_BANG___52983$fn__52986.invoke(query_processor.clj:337)"
  "query_processor$fn__52974$process_query_and_save_execution_BANG___52983.invoke(query_processor.clj:330)"
  "query_processor$fn__53018$process_query_and_save_with_max_results_constraints_BANG___53027$fn__53030.invoke(query_processor.clj:349)"
  "query_processor$fn__53018$process_query_and_save_with_max_results_constraints_BANG___53027.invoke(query_processor.clj:342)"
  "api.dataset$run_query_async$fn__66710.invoke(dataset.clj:68)"
  "query_processor.streaming$streaming_response_STAR_$fn__39328$fn__39329.invoke(streaming.clj:162)"
  "query_processor.streaming$streaming_response_STAR_$fn__39328.invoke(streaming.clj:161)"
  "async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:65)"
  "async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:63)"
  "async.streaming_response$do_f_async$task__18948.invoke(streaming_response.clj:84)"],
 :card_id nil,
 :context :ad-hoc,
 :error "Aucun champ trouvé pour la table \"pcbl_pcb\".",
 :row_count 0,
 :running_time 0,
 :preprocessed nil,
 :ex-data {:table-id 62, :type :invalid-query},
 :data {:rows [], :cols []}}

the problem is the same for all tables.
I read here and there in the forum and did not found relevant information concerning my issue (mostly update to latest version but it is already the case).

Any help would be much appreciated.

Second issue is with oracle db which is scanning permanently, I'll wirte another topic for this one...

Thank you very much to whom will read/help.
Thomas

Hi @Proff77
Post "Diagnostic Info" from Admin > Troubleshooting.
The English string would be No fields found for table
Sounds like problems during sync, but it's hard to tell, there should be errors about that.
Have a look at: https://www.metabase.com/docs/latest/troubleshooting-guide/cant-see-tables.html

Hi Flamber,
Thank you very for taking the time to answer.
Below is diagnostics info in the admin panel:

{
"browser-info": {
"language": "fr",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0",
"vendor": ""
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.16+8",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.16",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.16+8",
"os.name": "Linux",
"os.version": "5.10.102.1-microsoft-standard-WSL2",
"user.language": "en",
"user.timezone": "GMT"
},
"metabase-info": {
"databases": [
"h2",
"mysql",
"postgres",
"oracle",
"sqlserver"
],
"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-07-29",
"tag": "v0.43.4.2",
"branch": "release-x.43.x",
"hash": "7809f82"
},
"settings": {
"report-timezone": null
}
}
}

No error here.
I read the page you were referring to and did not find useful info for my case. Connections are all ok, I can run sql requests and get data but cannot display the tables' columns in the navigation menu, In the settings i'm using the same DB credentials as used in my current intranet (so no user's limitation here).

Thank you very much for your help.

Cheers,
Thomas

@Proff77 Then run a manual sync and look in the logs:
https://www.metabase.com/docs/latest/troubleshooting-guide/sync-fingerprint-scan.html#cant-sync-fingerprint-scan

You should migrate away from H2 if you are using Metabase in production:
https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html

Thanks @flamber,

A part of the log brelow; it's referring to a request error, "pg-enum" relation does not exist... it makes this error for all tables actually (the log is huuuuuge with repeating this exact message related to each table of the DB).

[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:31+02:00 WARN metabase.sync.util Erreur lors de la synchronisation des champs pour la table 'Table 91 'tpsysdb_10.lytl_layout''
org.postgresql.util.PSQLException: ERROR: relation "pg_enum" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:166)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:118)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:1471)
at clojure.java.jdbc$execute_query_with_params.invokeStatic(jdbc.clj:1090)
at clojure.java.jdbc$execute_query_with_params.invoke(jdbc.clj:1084)
at clojure.java.jdbc$db_query_with_resultset_STAR_.invokeStatic(jdbc.clj:1113)
at clojure.java.jdbc$db_query_with_resultset_STAR_.invoke(jdbc.clj:1093)
at clojure.java.jdbc$query.invokeStatic(jdbc.clj:1182)
at clojure.java.jdbc$query.invoke(jdbc.clj:1144)
at clojure.java.jdbc$query.invokeStatic(jdbc.clj:1160)
at clojure.java.jdbc$query.invoke(jdbc.clj:1144)
at metabase.driver.postgres$enum_types.invokeStatic(postgres.clj:178)
at metabase.driver.postgres$enum_types.invoke(postgres.clj:175)
at metabase.driver.postgres$fn__59125.invokeStatic(postgres.clj:191)
at metabase.driver.postgres$fn__59125.invoke(postgres.clj:189)
at clojure.lang.MultiFn.invoke(MultiFn.java:239)
at metabase.sync.fetch_metadata$fn__64198$table_metadata__64203$fn__64204.invoke(fetch_metadata.clj:19)
at metabase.sync.fetch_metadata$fn__64198$table_metadata__64203.invoke(fetch_metadata.clj:16)
at metabase.sync.sync_metadata.fields.fetch_metadata$fn__64466$db_metadata__64471$fn__64472.invoke(fetch_metadata.clj:88)
at metabase.sync.sync_metadata.fields.fetch_metadata$fn__64466$db_metadata__64471.invoke(fetch_metadata.clj:84)
at metabase.sync.sync_metadata.fields$fn__64964$sync_fields_for_table_BANG___64973$fn__64976$fn__64977.invoke(fields.clj:72)
at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:158)
at metabase.sync.util$do_with_error_handling.invoke(util.clj:151)
at metabase.sync.sync_metadata.fields$fn__64964$sync_fields_for_table_BANG___64973$fn__64976.invoke(fields.clj:71)
at metabase.sync.sync_metadata.fields$fn__64964$sync_fields_for_table_BANG___64973.invoke(fields.clj:65)
at clojure.core$partial$fn__5857.invoke(core.clj:2628)
at clojure.core$map$fn__5884.invoke(core.clj:2757)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:51)
at clojure.lang.RT.seq(RT.java:535)
at clojure.core$seq__5419.invokeStatic(core.clj:139)
at clojure.core$filter$fn__5911.invoke(core.clj:2813)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:58)
at clojure.lang.Cons.next(Cons.java:39)
at clojure.lang.RT.boundedLength(RT.java:1793)
at clojure.lang.RestFn.applyTo(RestFn.java:130)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$apply.invoke(core.clj:662)
at metabase.sync.sync_metadata.fields$fn__65002$sync_fields_BANG___65007$fn__65008.invoke(fields.clj:85)
at metabase.sync.sync_metadata.fields$fn__65002$sync_fields_BANG___65007.invoke(fields.clj:77)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$apply.invoke(core.clj:662)
at metabase.sync.util$fn__41554$run_step_with_metadata__41559$fn__41563$fn__41565.doInvoke(util.clj:388)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at metabase.sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:100)
at metabase.sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:94)
at metabase.sync.util$with_start_and_finish_debug_logging.invokeStatic(util.clj:117)
at metabase.sync.util$with_start_and_finish_debug_logging.invoke(util.clj:114)
at metabase.sync.util$fn__41554$run_step_with_metadata__41559$fn__41563.invoke(util.clj:383)
at metabase.sync.util$fn__41554$run_step_with_metadata__41559.invoke(util.clj:378)
at metabase.sync.util$fn__41770$run_sync_operation__41775$fn__41776$fn__41784.invoke(util.clj:489)
at metabase.sync.util$fn__41770$run_sync_operation__41775$fn__41776.invoke(util.clj:487)
at metabase.sync.util$fn__41770$run_sync_operation__41775.invoke(util.clj:481)
at metabase.sync.sync_metadata$fn__66507$sync_db_metadata_BANG___66512$fn__66513$fn__66514.invoke(sync_metadata.clj:50)
at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:158)
at metabase.sync.util$do_with_error_handling.invoke(util.clj:151)
at clojure.core$partial$fn__5859.invoke(core.clj:2634)
at metabase.driver$fn__32609.invokeStatic(driver.clj:592)
at metabase.driver$fn__32609.invoke(driver.clj:592)
at clojure.lang.MultiFn.invoke(MultiFn.java:239)
at metabase.sync.util$sync_in_context$fn__41463.invoke(util.clj:136)
at metabase.sync.util$with_db_logging_disabled$fn__41460.invoke(util.clj:127)
at metabase.sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:100)
at metabase.sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:94)
at metabase.sync.util$with_start_and_finish_logging$fn__41449.invoke(util.clj:112)
at metabase.sync.util$with_sync_events$fn__41444.invoke(util.clj:86)
at metabase.sync.util$with_duplicate_ops_prevented$fn__41435.invoke(util.clj:65)
at metabase.sync.util$do_sync_operation.invokeStatic(util.clj:179)
at metabase.sync.util$do_sync_operation.invoke(util.clj:176)
at metabase.sync.sync_metadata$fn__66507$sync_db_metadata_BANG___66512$fn__66513.invoke(sync_metadata.clj:49)
at metabase.sync.sync_metadata$fn__66507$sync_db_metadata_BANG___66512.invoke(sync_metadata.clj:46)
at metabase.api.database$fn__74860$fn__74861.invoke(database.clj:751)
at clojure.core$binding_conveyor_fn$fn__5772.invoke(core.clj:2034)
at clojure.lang.AFn.call(AFn.java:18)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:31+02:00 INFO metabase.sync.util FINISHED: étape 'sync-fields' pour postgres Base de données 3 'TPSys' (658.2 ms)
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:31+02:00 INFO metabase.sync.util STARTING: étape 'sync-fks' pour postgres Base de données 3 'TPSys'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:31+02:00 DEBUG metabase.server.middleware.log GET /api/database 200 8.3 ms (3 appels de DB) Connexions App DB : 0/4 Threads Jetty : 5/50 (1 inactif, 0 en file d'attente) (49 total de threads actifs) Requêtes en cours : 0 (0 en file d'attente)
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:31+02:00 DEBUG metabase.server.middleware.log GET /api/database 200 3.2 ms (3 appels de DB) Connexions App DB : 0/4 Threads Jetty : 5/50 (1 inactif, 0 en file d'attente) (49 total de threads actifs) Requêtes en cours : 0 (0 en file d'attente)
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util FINISHED: étape 'sync-fks' pour postgres Base de données 3 'TPSys' (1.3 s)
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util STARTING: étape 'sync-metabase-metadata' pour postgres Base de données 3 'TPSys'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util FINISHED: étape 'sync-metabase-metadata' pour postgres Base de données 3 'TPSys' (201.6 ms)
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util FINISHED: Sync metadata for postgres Base de données 3 'TPSys' (2.6 s)
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util STARTING: Analyze data for postgres Base de données 3 'TPSys'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util STARTING: étape 'fingerprint-fields' pour postgres Base de données 3 'TPSys'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.analyze fingerprint-fields Analyzed [·············································] :cry: 10% Table 54 'tpsysdb_10.lytl_boardpositiontrimpoints'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.analyze fingerprint-fields Analyzed [········································] :disappointed: 20% Table 70 'tpsysdb_10.elog_events'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.analyze fingerprint-fields Analyzed [
···································] :confused: 30% Table 86 'tpsysdb_10.panelpcbpositions'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util FINISHED: étape 'fingerprint-fields' pour postgres Base de données 3 'TPSys' (36.2 ms)
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util STARTING: étape 'classify-fields' pour postgres Base de données 3 'TPSys'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.analyze classify-fields Analyzed [······························] :neutral_face: 40% Table 49 'tpsysdb_10.cmnt_boardstatus'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.analyze classify-fields Analyzed [·························] :grimacing: 50% Table 65 'tpsysdb_10.pack_header'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.analyze classify-fields Analyzed [
····················] :relieved: 60% Table 81 'tpsysdb_10.pcbl_mntpos'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util FINISHED: étape 'classify-fields' pour postgres Base de données 3 'TPSys' (11.0 ms)
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util STARTING: étape 'classify-tables' pour postgres Base de données 3 'TPSys'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.analyze classify-tables Analyzed [················] :smirk: 70% Table 44 'tpsysdb_10.user_userdata'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.analyze classify-tables Analyzed [
******··········] :blush: 80% Table 60 'tpsysdb_10.line_machine'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.analyze classify-tables Analyzed [
*****************************······] :heart_eyes: 90% Table 76 'tpsysdb_10.magl_vibfeederdata'
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util FINISHED: étape 'classify-tables' pour postgres Base de données 3 'TPSys' (17.9 ms)
[7dd77c31-eab0-4dcb-aa00-336ff56e3f65] 2022-08-05T09:21:32+02:00 INFO metabase.sync.util FINISHED: Analyze data for postgres Base de données 3 'TPSys' (69.9 ms)

@Proff77 Metabase was incorrectly not finding enum columns in non-default schemas:
https://github.com/metabase/metabase/pull/23599
That was fixed in 0.44.0:
https://github.com/metabase/metabase/releases/latest

@flamber,
Thank you very much. I updated the docker image, reset the connections (i backed up the application database as instructed but copying back the db file had not effect and I started like a fresh image, I must've done something wrong...)
Unfortunately I still can't see the columns (tables are shown only, as before).

Below the log of trying to consult the table:

[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:44:38+02:00 ERROR metabase.query-processor.middleware.catch-exceptions Error processing query: No fields found for table "pcbl_pcb".
{:database_id 2,
:started_at #t "2022-08-05T08:44:38.797704Z[GMT]",
:error_type :invalid-query,
:json_query
{:database 2,
:query {:source-table 28},
:type "query",
:parameters [],
:middleware {:js-int-to-string? true, :add-default-userland-constraints? true}},
:native nil,
:status :failed,
:class clojure.lang.ExceptionInfo,
:stacktrace
["--> query_processor.middleware.add_implicit_clauses$fn__52106$sorted_implicit_fields_for_table__52111$fn__52112.invoke(add_implicit_clauses.clj:47)"
"query_processor.middleware.add_implicit_clauses$fn__52106$sorted_implicit_fields_for_table__52111.invoke(add_implicit_clauses.clj:41)"
"query_processor.middleware.add_implicit_clauses$fn__52230$add_implicit_fields__52235$fn__52239.invoke(add_implicit_clauses.clj:107)"
"query_processor.middleware.add_implicit_clauses$fn__52230$add_implicit_fields__52235.invoke(add_implicit_clauses.clj:100)"
"query_processor.middleware.add_implicit_clauses$add_implicit_mbql_clauses$fn__52313.invoke(add_implicit_clauses.clj:150)"
"query_processor.middleware.add_implicit_clauses$add_implicit_mbql_clauses.invokeStatic(add_implicit_clauses.clj:143)"
"query_processor.middleware.add_implicit_clauses$add_implicit_mbql_clauses.invoke(add_implicit_clauses.clj:140)"
"query_processor.middleware.add_implicit_clauses$add_implicit_clauses.invokeStatic(add_implicit_clauses.clj:160)"
"query_processor.middleware.add_implicit_clauses$add_implicit_clauses.invoke(add_implicit_clauses.clj:154)"
"query_processor$preprocess_STAR_$fn__53876.invoke(query_processor.clj:126)"
"query_processor$preprocess_STAR_.invokeStatic(query_processor.clj:124)"
"query_processor$preprocess_STAR_.invoke(query_processor.clj:119)"
"query_processor$fn__53884$combined_pre_process__53885$combined_pre_process_STAR___53886.invoke(query_processor.clj:208)"
"query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__52329$fn__52334.invoke(resolve_database_and_driver.clj:35)"
"driver$do_with_driver.invokeStatic(driver.clj:75)"
"driver$do_with_driver.invoke(driver.clj:71)"
"query_processor.middleware.resolve_database_and_driver$resolve_database_and_driver$fn__52329.invoke(resolve_database_and_driver.clj:34)"
"query_processor.middleware.fetch_source_query$resolve_card_id_source_tables$fn__48363.invoke(fetch_source_query.clj:346)"
"query_processor.middleware.store$initialize_store$fn__48551$fn__48552.invoke(store.clj:11)"
"query_processor.store$do_with_store.invokeStatic(store.clj:44)"
"query_processor.store$do_with_store.invoke(store.clj:38)"
"query_processor.middleware.store$initialize_store$fn__48551.invoke(store.clj:10)"
"query_processor.middleware.normalize_query$normalize$fn__52601.invoke(normalize_query.clj:22)"
"query_processor.middleware.constraints$add_default_userland_constraints$fn__49633.invoke(constraints.clj:53)"
"query_processor.middleware.process_userland_query$process_userland_query$fn__52540.invoke(process_userland_query.clj:145)"
"query_processor.middleware.catch_exceptions$catch_exceptions$fn__52912.invoke(catch_exceptions.clj:167)"
"query_processor.reducible$async_qp$qp_STAR___44771$thunk__44773.invoke(reducible.clj:100)"
"query_processor.reducible$async_qp$qp_STAR___44771.invoke(reducible.clj:106)"
"query_processor.reducible$async_qp$qp_STAR___44771.invoke(reducible.clj:91)"
"query_processor.reducible$sync_qp$qp_STAR___44782.doInvoke(reducible.clj:126)"
"query_processor$process_userland_query.invokeStatic(query_processor.clj:330)"
"query_processor$process_userland_query.doInvoke(query_processor.clj:326)"
"query_processor$fn__53931$process_query_and_save_execution_BANG___53940$fn__53943.invoke(query_processor.clj:341)"
"query_processor$fn__53931$process_query_and_save_execution_BANG___53940.invoke(query_processor.clj:334)"
"query_processor$fn__53975$process_query_and_save_with_max_results_constraints_BANG___53984$fn__53987.invoke(query_processor.clj:353)"
"query_processor$fn__53975$process_query_and_save_with_max_results_constraints_BANG___53984.invoke(query_processor.clj:346)"
"api.dataset$run_query_async$fn__68659.invoke(dataset.clj:69)"
"query_processor.streaming$streaming_response_STAR_$fn__39889$fn__39890.invoke(streaming.clj:162)"
"query_processor.streaming$streaming_response_STAR_$fn__39889.invoke(streaming.clj:161)"
"async.streaming_response$do_f_STAR_.invokeStatic(streaming_response.clj:65)"
"async.streaming_response$do_f_STAR_.invoke(streaming_response.clj:63)"
"async.streaming_response$do_f_async$task__19006.invoke(streaming_response.clj:84)"],
:card_id nil,
:context :ad-hoc,
:error "No fields found for table "pcbl_pcb".",
:row_count 0,
:running_time 0,
:preprocessed nil,
:ex-data {:table-id 28, :type :invalid-query},
:data {:rows [], :cols []}}

here the log when I try to manually sync the tables:

[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:27+02:00 WARN metabase.sync.util Error syncing Fields for Table 'Table 57 'tpsysdb_10.lytl_layout''
org.postgresql.util.PSQLException: ERROR: relation "pg_enum" does not exist
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:490)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:408)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:167)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:119)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:1471)
at clojure.java.jdbc$execute_query_with_params.invokeStatic(jdbc.clj:1090)
at clojure.java.jdbc$execute_query_with_params.invoke(jdbc.clj:1084)
at clojure.java.jdbc$db_query_with_resultset_STAR_.invokeStatic(jdbc.clj:1113)
at clojure.java.jdbc$db_query_with_resultset_STAR_.invoke(jdbc.clj:1093)
at clojure.java.jdbc$query.invokeStatic(jdbc.clj:1182)
at clojure.java.jdbc$query.invoke(jdbc.clj:1144)
at clojure.java.jdbc$query.invokeStatic(jdbc.clj:1160)
at clojure.java.jdbc$query.invoke(jdbc.clj:1144)
at metabase.driver.postgres$enum_types.invokeStatic(postgres.clj:189)
at metabase.driver.postgres$enum_types.invoke(postgres.clj:185)
at metabase.driver.postgres$fn__60207.invokeStatic(postgres.clj:201)
at metabase.driver.postgres$fn__60207.invoke(postgres.clj:199)
at clojure.lang.MultiFn.invoke(MultiFn.java:239)
at metabase.sync.fetch_metadata$fn__65872$table_metadata__65877$fn__65878.invoke(fetch_metadata.clj:19)
at metabase.sync.fetch_metadata$fn__65872$table_metadata__65877.invoke(fetch_metadata.clj:16)
at metabase.sync.sync_metadata.fields.fetch_metadata$fn__66140$db_metadata__66145$fn__66146.invoke(fetch_metadata.clj:88)
at metabase.sync.sync_metadata.fields.fetch_metadata$fn__66140$db_metadata__66145.invoke(fetch_metadata.clj:84)
at metabase.sync.sync_metadata.fields$fn__66638$sync_fields_for_table_BANG___66647$fn__66650$fn__66651.invoke(fields.clj:72)
at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:158)
at metabase.sync.util$do_with_error_handling.invoke(util.clj:151)
at metabase.sync.sync_metadata.fields$fn__66638$sync_fields_for_table_BANG___66647$fn__66650.invoke(fields.clj:71)
at metabase.sync.sync_metadata.fields$fn__66638$sync_fields_for_table_BANG___66647.invoke(fields.clj:65)
at clojure.core$partial$fn__5908.invoke(core.clj:2641)
at clojure.core$map$fn__5935.invoke(core.clj:2770)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:51)
at clojure.lang.RT.seq(RT.java:535)
at clojure.core$seq__5467.invokeStatic(core.clj:139)
at clojure.core$filter$fn__5962.invoke(core.clj:2826)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:58)
at clojure.lang.Cons.next(Cons.java:39)
at clojure.lang.RT.boundedLength(RT.java:1790)
at clojure.lang.RestFn.applyTo(RestFn.java:130)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$apply.invoke(core.clj:662)
at metabase.sync.sync_metadata.fields$fn__66676$sync_fields_BANG___66681$fn__66682.invoke(fields.clj:85)
at metabase.sync.sync_metadata.fields$fn__66676$sync_fields_BANG___66681.invoke(fields.clj:77)
at clojure.lang.AFn.applyToHelper(AFn.java:154)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$apply.invoke(core.clj:662)
at metabase.sync.util$fn__42110$run_step_with_metadata__42115$fn__42119$fn__42121.doInvoke(util.clj:388)
at clojure.lang.RestFn.invoke(RestFn.java:397)
at metabase.sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:100)
at metabase.sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:94)
at metabase.sync.util$with_start_and_finish_debug_logging.invokeStatic(util.clj:117)
at metabase.sync.util$with_start_and_finish_debug_logging.invoke(util.clj:114)
at metabase.sync.util$fn__42110$run_step_with_metadata__42115$fn__42119.invoke(util.clj:383)
at metabase.sync.util$fn__42110$run_step_with_metadata__42115.invoke(util.clj:378)
at metabase.sync.util$fn__42329$run_sync_operation__42334$fn__42335$fn__42343.invoke(util.clj:493)
at metabase.sync.util$fn__42329$run_sync_operation__42334$fn__42335.invoke(util.clj:491)
at metabase.sync.util$fn__42329$run_sync_operation__42334.invoke(util.clj:485)
at metabase.sync.sync_metadata$fn__68243$sync_db_metadata_BANG___68248$fn__68249$fn__68250.invoke(sync_metadata.clj:50)
at metabase.sync.util$do_with_error_handling.invokeStatic(util.clj:158)
at metabase.sync.util$do_with_error_handling.invoke(util.clj:151)
at clojure.core$partial$fn__5910.invoke(core.clj:2647)
at metabase.driver$fn__33070.invokeStatic(driver.clj:598)
at metabase.driver$fn__33070.invoke(driver.clj:598)
at clojure.lang.MultiFn.invoke(MultiFn.java:239)
at metabase.sync.util$sync_in_context$fn__42019.invoke(util.clj:136)
at metabase.sync.util$with_db_logging_disabled$fn__42016.invoke(util.clj:127)
at metabase.sync.util$with_start_and_finish_logging_STAR_.invokeStatic(util.clj:100)
at metabase.sync.util$with_start_and_finish_logging_STAR_.invoke(util.clj:94)
at metabase.sync.util$with_start_and_finish_logging$fn__42005.invoke(util.clj:112)
at metabase.sync.util$with_sync_events$fn__42000.invoke(util.clj:86)
at metabase.sync.util$with_duplicate_ops_prevented$fn__41991.invoke(util.clj:65)
at metabase.sync.util$do_sync_operation.invokeStatic(util.clj:179)
at metabase.sync.util$do_sync_operation.invoke(util.clj:176)
at metabase.sync.sync_metadata$fn__68243$sync_db_metadata_BANG___68248$fn__68249.invoke(sync_metadata.clj:49)
at metabase.sync.sync_metadata$fn__68243$sync_db_metadata_BANG___68248.invoke(sync_metadata.clj:46)
at metabase.api.database$fn__76357$fn__76358.invoke(database.clj:808)
at clojure.core$binding_conveyor_fn$fn__5823.invoke(core.clj:2047)
at clojure.lang.AFn.call(AFn.java:18)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:27+02:00 INFO metabase.sync.util STARTING: step 'sync-fks' for postgres Database 2 'MyData'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util FINISHED: step 'sync-fks' for postgres Database 2 'MyData' (1.2 s)
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util STARTING: step 'sync-metabase-metadata' for postgres Database 2 'MyData'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util FINISHED: step 'sync-metabase-metadata' for postgres Database 2 'MyData' (270.4 ms)
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util FINISHED: Sync metadata for postgres Database 2 'MyData' (2.5 s)
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util STARTING: Analyze data for postgres Database 2 'MyData'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util STARTING: step 'fingerprint-fields' for postgres Database 2 'MyData'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.analyze fingerprint-fields Analyzed [·············································] :cry: 10% Table 20 'tpsysdb_10.lytl_boardpositiontrimpoints'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.analyze fingerprint-fields Analyzed [········································] :disappointed: 20% Table 36 'tpsysdb_10.elog_events'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.analyze fingerprint-fields Analyzed [
···································] :confused: 30% Table 52 'tpsysdb_10.panelpcbpositions'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util FINISHED: step 'fingerprint-fields' for postgres Database 2 'MyData' (37.4 ms)
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util STARTING: step 'classify-fields' for postgres Database 2 'MyData'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.analyze classify-fields Analyzed [······························] :neutral_face: 40% Table 15 'tpsysdb_10.cmnt_boardstatus'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.analyze classify-fields Analyzed [·························] :grimacing: 50% Table 31 'tpsysdb_10.pack_header'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.analyze classify-fields Analyzed [
····················] :relieved: 60% Table 47 'tpsysdb_10.pcbl_mntpos'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util FINISHED: step 'classify-fields' for postgres Database 2 'MyData' (11.6 ms)
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util STARTING: step 'classify-tables' for postgres Database 2 'MyData'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.analyze classify-tables Analyzed [················] :smirk: 70% Table 10 'tpsysdb_10.user_userdata'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.analyze classify-tables Analyzed [
******··········] :blush: 80% Table 26 'tpsysdb_10.line_machine'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.analyze classify-tables Analyzed [
*****************************······] :heart_eyes: 90% Table 42 'tpsysdb_10.magl_vibfeederdata'
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util FINISHED: step 'classify-tables' for postgres Database 2 'MyData' (18.3 ms)
[19229c93-2cc3-402c-82ed-ca3c3a2109a9] 2022-08-05T10:51:28+02:00 INFO metabase.sync.util FINISHED: Analyze data for postgres Database 2 'MyData' (74.4 ms)

Here the diagnostics info

{
"browser-info": {
"language": "fr",
"platform": "Win32",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0",
"vendor": ""
},
"system-info": {
"file.encoding": "UTF-8",
"java.runtime.name": "OpenJDK Runtime Environment",
"java.runtime.version": "11.0.16+8",
"java.vendor": "Eclipse Adoptium",
"java.vendor.url": "https://adoptium.net/",
"java.version": "11.0.16",
"java.vm.name": "OpenJDK 64-Bit Server VM",
"java.vm.version": "11.0.16+8",
"os.name": "Linux",
"os.version": "5.10.102.1-microsoft-standard-WSL2",
"user.language": "en",
"user.timezone": "GMT"
},
"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-08-04",
"tag": "v0.44.0",
"branch": "release-x.44.x",
"hash": "d3700f5"
},
"settings": {
"report-timezone": null
}
}
}

Thank you again for your help.
Thomas

@Proff77 Read the "Production installation", since I don't know what you are doing wrong with the H2 file, but I guess it's bad file permissions or something like that:
https://www.metabase.com/docs/latest/operations-guide/running-metabase-on-docker.html

Try running this SQL query from within Metabase:
select * from tpsysdb_10.lytl_layout limit 1

Looks like there's enum references in your database, which might not have correct references (or lacking privileges).
Check debug logs on your Postgres database for more help on figuring out what is going wrong, since there's 50,000+ installations of Metabase and I haven't seen this problem before.

@flamber,
I ran the sql query (from metabase of course) and got following answer:

modinfo
("2022-06-16 10:36:33.92207",81875)

domain
1

id
4,217

normalizeducname
SON-TSN-IO-V2-B

name
SON-TSN-IO-V2-B

createtime
juin 16, 2022, 11:13 AM

modifiedtime
juin 16, 2022, 10:36 AM

modifiedby
Vide

comment
MY500

batchsize
0

batchsizetype
LAYOUTS

conveyorwidth
100,500

clampforce
NORMAL

orderinfo
Vide

barcode
Vide

globalgrouping
1

overlapwarning
1

checkzleveltype
NEW

To give some context, this is a production tool's db to which I have limited access (mostly by query but no access to server's terminal...).
the version is a bit old (8.2.4...) maybe it is related...
Thanks

@Proff77 So you are saying that you are using Postgres 8.2.4, then that's why. It has been EOL for many years. Minimum required version is Postgres 9.4, but I would strongly suggest a newer version.
https://www.postgresql.org/support/versioning/

@flamber,
I cannot update postgres version on my production tool (assembling machine) without reaching out to the machine supplier (would cost big $ if even feasible...).
Thank you very much for your answers, this is much appreciated.

Cheers!

@Proff77 I understand that, I've worked in similar types of companies. Your best option is to setup a new Postgres database somewhere, which gets data pushed to it every night/hour from all the old production databases. Then you'll connect Metabase to the new Postgres database, which you have full control of.

The amount of hacks you need to do with legacy equipment/setups will just continue to raise.