Merge pull request #289 from EngineeredVirus/main

PG-476: pg_stat_monitor causing errors : could not read file /tmp/pg_…
pull/293/head
Ibrar Ahmed 2022-08-09 21:22:27 +05:00 committed by GitHub
commit 63bc740a20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@
#ifdef BENCHMARK #ifdef BENCHMARK
#include <time.h> /* clock() */ #include <time.h> /* clock() */
#endif #endif
#include "pgstat.h"
#include "commands/explain.h" #include "commands/explain.h"
#include "pg_stat_monitor.h" #include "pg_stat_monitor.h"
@ -29,7 +30,7 @@ PG_MODULE_MAGIC;
#define BUILD_VERSION "1.1.0-dev" #define BUILD_VERSION "1.1.0-dev"
#define PG_STAT_STATEMENTS_COLS 53 /* maximum of above */ #define PG_STAT_STATEMENTS_COLS 53 /* maximum of above */
#define PGSM_TEXT_FILE "/tmp/pg_stat_monitor_query" #define PGSM_TEXT_FILE PGSTAT_STAT_PERMANENT_DIRECTORY "pg_stat_monitor_query"
#define roundf(x,d) ((floor(((x)*pow(10,d))+.5))/pow(10,d)) #define roundf(x,d) ((floor(((x)*pow(10,d))+.5))/pow(10,d))