mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Fix getLiveExecutionRowsOnPostgres when there are multiple n8n schemas (#17635)
This commit is contained in:
committed by
GitHub
parent
a415dbfd96
commit
9e3bfff68d
@@ -922,7 +922,7 @@ export class ExecutionRepository extends Repository<ExecutionEntity> {
|
||||
async getLiveExecutionRowsOnPostgres() {
|
||||
const tableName = `${this.globalConfig.database.tablePrefix}execution_entity`;
|
||||
|
||||
const pgSql = `SELECT n_live_tup as result FROM pg_stat_all_tables WHERE relname = '${tableName}';`;
|
||||
const pgSql = `SELECT n_live_tup as result FROM pg_stat_all_tables WHERE relname = '${tableName}' and schemaname = '${this.globalConfig.database.postgresdb.schema}';`;
|
||||
|
||||
try {
|
||||
const rows = (await this.query(pgSql)) as Array<{ result: string }>;
|
||||
|
||||
Reference in New Issue
Block a user