public inbox for [email protected]
help / color / mirror / Atom feedFrom: Hayato Kuroda (Fujitsu) <[email protected]>
To: 'Chao Li' <[email protected]>
To: Gyan Sreejith <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: shveta malik <[email protected]>
Cc: Shlok Kyal <[email protected]>
Cc: vignesh C <[email protected]>
Cc: Euler Taveira <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Peter Smith <[email protected]>
Subject: RE: [Proposal] Adding Log File Capability to pg_createsubscriber
Date: Tue, 24 Mar 2026 09:50:39 +0000
Message-ID: <OS9PR01MB121499DDB9D2E2C563832FBBCF548A@OS9PR01MB12149.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <[email protected]>
References: <OSOPR01MB1215385EAC6A76650444E40B0F54FA@OSOPR01MB12153.jpnprd01.prod.outlook.com>
<CAEqnbaU=EgqhxEx0ig4TdY8pdt0Vn+vmCJBuoORRHOzovW9dWA@mail.gmail.com>
<TYRPR01MB12156F431E4B83ECFF14034BDF54CA@TYRPR01MB12156.jpnprd01.prod.outlook.com>
<CAEqnbaXb-TKUm7P-=_zrgQ=shRXkkZscPOHEL9OS6Cb2V8YT8Q@mail.gmail.com>
<CAA4eK1JiAzaY7UYnya7uDhX-kAL1PrsOAxBtys7c35t4q4H3_A@mail.gmail.com>
<CAEqnbaVF0yXQk=VVzr-8V23E=iUpUqyah6hxx2fy0ZVJh+CaGA@mail.gmail.com>
<CAJpy0uAwPNG3GN5+jTajnccLe+F1mW6dZh-9112u3QQQYugA=Q@mail.gmail.com>
<CAA4eK1JyYHPgaPTow5co8wBh8Ga+fx=vqHLhk2zHeqdOGYN4Vg@mail.gmail.com>
<OS9PR01MB12149FECFFF25973C167F9CFAF54BA@OS9PR01MB12149.jpnprd01.prod.outlook.com>
<CAEqnbaULSSQcir8Z8KDXduV4o4NZvJLeBMZN0VW3wh5QZjpEnw@mail.gmail.com>
<[email protected]>
<[email protected]>
Dear Chao,
> I forgot to mention one small suggestion.
>
> Since the internal log file path includes a timestamped directory, it is a bit
> inconvenient to figure out the full path of the file after the command finishes. I
> think it would be helpful to print the full path of the internal log file at the end,
> something like:
> ```
> if (internal_log_file_fp != NULL)
> {
> if (fclose(internal_log_file_fp) != 0)
> report_createsub_fatal("could not
> close %s/%s.log: %m", logdir, INTERNAL_LOG_FILE_NAME);
> internal_log_file_fp = NULL;
> printf("check the internal log file at \"%s/%s.log\"", logdir,
> INTERNAL_LOG_FILE_NAME);
> }
> ```
I don't think it's needed, because pg_upgrade does not print such points.
> Note that I used printf() here, because based on my test, pg_log_info() does not
> work in this place.
It might be becasue you used pg_log_info(). pg_createsubscriber outputs only
warning or error level messages, info-level cannot be printed.
> The other thing I noticed while trying the above code is that
> cleanup_objects_atexit() has this:
> ```
> if (success)
> return;
> ```
>
> That means on the success path, internal_log_file_fp will not be closed. So this
> part would need some adjustment as well. Maybe one way is to jump to the
> log-file cleanup part before returning, for example with a goto, so that
> internal_log_file_fp is always closed.
As the same reason I posted, I think it's not needed.
[1]: https://www.postgresql.org/message-id/OS9PR01MB12149F1AD9C79A2644753A18AF548A%40OS9PR01MB12149.jpnpr...
Best regards,
Hayato Kuroda
FUJITSU LIMITED
view thread (65+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: RE: [Proposal] Adding Log File Capability to pg_createsubscriber
In-Reply-To: <OS9PR01MB121499DDB9D2E2C563832FBBCF548A@OS9PR01MB12149.jpnprd01.prod.outlook.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox