According to https://www.postgresql.org/docs/current/gssapi-auth.html:
When GSSAPI uses Kerberos, it uses a standard principal in the format servicename/hostname@realm
and
care needs to be taken to specify the correct principal details when making the connection from the client using the krbsrvname connection parameter. (See also Section 33.1.2.) The installation default can be changed from the default postgres at build time using ./configure --with-krb-srvnam=whatever.
But if I look into the Postgres source code at Github,
- the settings seems to propagate into C program code as PG_KRB_SRVNAM
- the only place it is used seems to be in the libpq library at https://github.com/postgres/postgres/blob/master/src/interfaces/libpq/fe-connect.c
Does this mean the server does not need to be recompiled if I need to use another krbsrvname?