PG-153: Log application name.

This commit is contained in:
Ibrar Ahmed
2020-11-24 21:03:32 +00:00
parent 33b0b4a3e0
commit 6ec5c2b4ed
3 changed files with 58 additions and 17 deletions

View File

@@ -64,6 +64,7 @@
#define REL_LST 10
#define CMD_LST 10
#define CMD_LEN 20
#define APPLICATIONNAME_LEN 100
typedef struct GucVariables
{
@@ -121,6 +122,7 @@ typedef struct QueryInfo
Oid dbid; /* database OID */
uint host; /* client IP */
int64 type; /* type of query, options are query, info, warning, error, fatal */
char application_name[APPLICATIONNAME_LEN];
int32 relations[REL_LST];
char cmd_type[CMD_LST][CMD_LEN]; /* query command type SELECT/UPDATE/DELETE/INSERT */
} QueryInfo;