Skip to content

Commit

Permalink
add application_name field to proxy model (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pete-J-Matthews authored Oct 24, 2024
1 parent dda3810 commit 93128b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pgactivity/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def get_ctes(self):
BOTH '_' FROM UPPER(REGEXP_REPLACE(wait_event, '([A-Z])','_\1', 'g'))
) AS wait_event,
state_change,
application_name,
client_addr::text,
client_hostname,
client_port
Expand Down Expand Up @@ -201,6 +202,7 @@ class PGActivity(PGTable):
LOGICAL_REPLICATION_LAUNCHER, LOGICAL_REPLICATION_WORKER, PARALLEL_WORKER,
BACKGROUND_WRITER, CLIENT_BACKEND, CHECKPOINTER, ARCHIVER, STARTUP, WALRECEIVER,
WALSENDER, or WALWRITER.
application_name (models.CharField): Name of the application that is connected to this backend.
client_addr (models.CharField): IP address of the client connected to this backend, if any.
client_hostname (models.CharField): Host name of the connected client, as reported by a
reverse DNS lookup of client_addr.
Expand All @@ -221,6 +223,7 @@ class PGActivity(PGTable):
backend_xid = models.CharField(max_length=256, null=True)
backend_xmin = models.CharField(max_length=256, null=True)
backend_type = models.CharField(max_length=64)
application_name = models.CharField(max_length=64, null=True)
client_addr = models.CharField(max_length=256, null=True)
client_hostname = models.CharField(max_length=256, null=True)
client_port = models.IntegerField()
Expand Down

0 comments on commit 93128b2

Please sign in to comment.