DASSL / ClassDB

An open-source system to let students experiment with relational data
https://dassl.github.io/ClassDB/
Other
8 stars 2 forks source link

Connection activity logging only records the connection timestamp (E) #163

Closed wildtayne closed 6 years ago

wildtayne commented 6 years ago

The Postgres connection logs record additional information ClassDB does not user, namely connection_from and application_name. It would be useful to record these attributes in the connection activity log.

smurthys commented 6 years ago

Adding this comment to make it visible. I recommend using this issue to capture the need to add host, application, and other information discussed in this morning's meeting.

I am adding this to the M3 list so it gets attention. We can remove it from the M3 pipeline if a discussion recommends so.

wildtayne commented 6 years ago

Adding a few comments based on yesterday's discussion:

afig commented 6 years ago

Just wanted to add that my installation seems to log application_name for errors without needing to be manually set, but not for connection activity. The docs linked in the previous comment state:

The application_name can be any string of less than NAMEDATALEN characters (64 characters in a standard build). It is typically set by an application upon connection to the server

Could it be that application_name is simply not known by the server until some point after a connection is logged? Maybe it is logged on disconnect entries?

smurthys commented 6 years ago

Both the -d command-line option to psql and the \c meta-command allows setting application name using a "connection URI".

Any application creating a connection can set the application name via connection info. I expect app name to then show up in the corresponding connection entry in the server log.