Re: pg_upgrade generated files in subdir follow-up

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_upgrade generated files in subdir follow-up
Date: 2022-08-31 14:41:24
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> On 31 Aug 2022, at 15:59, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
>> Commit 38bfae36526 moved the .txt files pg_upgrade generates to a separate
>> subdir, but there are a few left which are written to cwd. The thread
>> resulting in that patch doesn't discuss these files specifically so it seems
>> they are just an oversight. Unless I'm missing something.
>> Should something the attached be applied to ensure all generated files are
>> placed in the subdirectory?
> It certainly looks inconsistent ATM. I wondered if maybe the plan was to
> put routine output into the log directory but problem-reporting files
> into cwd --- but that isn't what's happening now.

Right, check_proper_datallowconn and check_for_isn_and_int8_passing_mismatch
and a few other check functions already place error reporting in the subdir.

> As long as we report the path to where the file is, I don't see a reason
> not to put problem-reporting files in the subdir too.

Agreed. The documentation states:

"pg_upgrade creates various working files, such as schema dumps, stored
within pg_upgrade_output.d in the directory of the new cluster. Each
run creates a new subdirectory named with a timestamp formatted as per
ISO 8601 (%Y%m%dT%H%M%S), where all the generated files are stored."

The delete_old_cluster and reindex_hash scripts are still placed in CWD, which
isn't changed by this patch, as that seems correct (and might break scripts if
we move them). Maybe we should amend the docs to mention that scripts aren't
generated in the subdir?

Daniel Gustafsson

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-08-31 15:29:31 Re: introduce bufmgr hooks
Previous Message Jonathan S. Katz 2022-08-31 14:20:24 Re: SQL/JSON features for v15