I’ve been following the (very sparse and cryptic) instructions here: https://www.postgresql.org/docs/12/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-CSVLOG
I’ve set up the
postgres_log table exactly like it says on that page.
I’ve set up my
postgresql.conf like this:
log_destination = ‘csvlog’
logging_collector = on
log_directory = ‘C:pglogs’
log_filename = ‘PG_%Y-%m-%d_%H;%M;%S’
log_rotation_age = 1d
log_rotation_size = 0
log_truncate_on_rotation = on
I’ve restarted PostgreSQL, and it has created a
I am able to successfully run a
COPY query to import the
PG_2020-09-20_00;56;19.csv into my database table, if I explicitly name it.
- How am I supposed to determine which filename(s) to pick to COPY into the table from my automated, regularly run script? (Since it can’t be the "current" one.)
- After I have somehow determined which filename(s) are safe to COPY in, and I’ve loaded them into my table, am I expected to delete these myself?
- What’s with the plaintext-format
PG_2020-09-20_00;56;19 file? Why is that created when I clearly tell PG to use CSV?
None of this is addressed on the page I linked to and which I’ve been following.
If $A, B$ are independent, real valued variables with finite means and variances, what do we know about the variance of $log ( exp(A) + exp(B) )$, in terms of the variances of $A, B$?