modified: backend/src/services/SqlExecutor.ts
This commit is contained in:
@@ -56,6 +56,10 @@ export class SqlExecutor {
|
|||||||
|
|
||||||
// Execute with retry mechanism
|
// Execute with retry mechanism
|
||||||
const result = await this.retryQuery(async () => {
|
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);
|
const queryResult = await pool.query(sqlQuery, params);
|
||||||
console.log('[SQL Result] rowCount:', queryResult.rowCount, 'rows:', JSON.stringify(queryResult.rows).substring(0, 500));
|
console.log('[SQL Result] rowCount:', queryResult.rowCount, 'rows:', JSON.stringify(queryResult.rows).substring(0, 500));
|
||||||
return queryResult;
|
return queryResult;
|
||||||
|
|||||||
Reference in New Issue
Block a user