mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
In pg_upgrade, add various logging improvements:
add ability to control permissions of created files have psql echo its queries for easier debugging output four separate log files, and delete them on success add -r/--retain option to keep log files after success make logs file append-only remove -g/-G/-l logging options sugggest tailing appropriate log file on failure enhance -v/--verbose behavior
This commit is contained in:
@ -218,8 +218,7 @@ check_loadable_libraries(void)
|
||||
|
||||
prep_status("Checking for presence of required libraries");
|
||||
|
||||
snprintf(output_path, sizeof(output_path), "%s/loadable_libraries.txt",
|
||||
os_info.cwd);
|
||||
snprintf(output_path, sizeof(output_path), "loadable_libraries.txt");
|
||||
|
||||
for (libnum = 0; libnum < os_info.num_libraries; libnum++)
|
||||
{
|
||||
@ -257,7 +256,7 @@ check_loadable_libraries(void)
|
||||
if (PQresultStatus(res) != PGRES_COMMAND_OK)
|
||||
{
|
||||
found = true;
|
||||
if (script == NULL && (script = fopen(output_path, "w")) == NULL)
|
||||
if (script == NULL && (script = fopen_priv(output_path, "w")) == NULL)
|
||||
pg_log(PG_FATAL, "Could not open file \"%s\": %s\n",
|
||||
output_path, getErrorText(errno));
|
||||
fprintf(script, "Could not load library \"%s\"\n%s\n",
|
||||
|
Reference in New Issue
Block a user