modified: backend/src/services/SqlExecutor.ts

This commit is contained in:
GEgorov
2025-11-29 16:14:54 +03:00
parent 4de1118804
commit 31506d2f87

View File

@@ -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;