You can use Rust's standard macros directly to print:
eprintln!("test_sql_speed: {:?}", difference);
will be printed to PostgreSQL's STDERR.
If the log dump function of PostgreSQL is not enabled, the default is:
/var/log/postgresql/
in the log file in the directory.
If the log dump function is enabled, it will go to the log directory under the data directory, but this speed is a bit slow, and it will take a few seconds to come out.
It is best not to open log dumps for local debugging, but directly monitor the /var/log/postgresql/postgresql-10-main.log file.
{{o.name}}
{{m.name}}