From 31506d2f879e4a7dd27b68584944233f8b59b4d0 Mon Sep 17 00:00:00 2001 From: GEgorov Date: Sat, 29 Nov 2025 16:14:54 +0300 Subject: [PATCH] modified: backend/src/services/SqlExecutor.ts --- backend/src/services/SqlExecutor.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/services/SqlExecutor.ts b/backend/src/services/SqlExecutor.ts index a3d3107..76f174f 100644 --- a/backend/src/services/SqlExecutor.ts +++ b/backend/src/services/SqlExecutor.ts @@ -56,6 +56,10 @@ export class SqlExecutor { // Execute with retry mechanism const result = await this.retryQuery(async () => { + // Check search_path and backend PID for debugging + const debugResult = await pool.query('SELECT current_setting(\'search_path\') as search_path, pg_backend_pid() as pid, inet_server_addr() as server_ip'); + console.log('[SQL Debug] search_path:', debugResult.rows[0]?.search_path, 'pid:', debugResult.rows[0]?.pid, 'server_ip:', debugResult.rows[0]?.server_ip); + const queryResult = await pool.query(sqlQuery, params); console.log('[SQL Result] rowCount:', queryResult.rowCount, 'rows:', JSON.stringify(queryResult.rows).substring(0, 500)); return queryResult;