public inbox for [email protected]  
help / color / mirror / Atom feed
From: Laurenz Albe <[email protected]>
To: Ashutosh Bapat <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: Re: pg_restore documentation and --create/--single-transaction limitation
Date: Tue, 30 Sep 2025 14:36:31 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAExHW5tvMaJupX9c33NqKQ41D-QoDxeYAnnJS580+N690LrA2A@mail.gmail.com>
References: <CAExHW5ti5igDwOOde6shgfS7JPtCY9gNrkB3xNr=FuGTYVDSjQ@mail.gmail.com>
	<[email protected]>
	<CAExHW5tvMaJupX9c33NqKQ41D-QoDxeYAnnJS580+N690LrA2A@mail.gmail.com>

On Tue, 2025-09-30 at 17:01 +0530, Ashutosh Bapat wrote:
> Thanks a lot for the research and pointing out missing --jobs.
> 
> > So I think that your suggestion makes sense.
> > 
> > I tried to improve the English, and I have added the incompatibility
> > with multiple --jobs to the --single-transaction documentation.
> > 
> > Does that look alright to you?
> 
> @@ -541,7 +545,9 @@ PostgreSQL documentation
> emitted commands in <command>BEGIN</command>/<command>COMMIT</command>). This
> ensures that either all the commands complete successfully, or no
> changes are applied. This option implies
> - <option>--exit-on-error</option>.
> + <option>--exit-on-error</option>. It cannot be used together with
> + <option>--create</option>, which switches database connections, or with
> 
> I didn't understand ", which switches ..." part. The code comment says
> /*
> * -C is not compatible with -1, because we can't create a database inside
> * a transaction block.
> */
> if (opts->createDB && opts->single_txn)
> pg_fatal("options -C/--create and -1/--single-transaction cannot be
> used together");
> 
> It doesn't say anything about switching connections. But it's too low
> level of detail, which we may just eliminate.
> 
> + multiple <option>--jobs</option>.
> 
> This seems to be confusing. I read it as --single-transaction can not
> be used when there are multiple --jobs specifications e.g.
> --single-transaction --jobs 1 --jobs 2. Maybe just say " multiple
> jobs". Even corresponding --jobs documentation says
> 
> pipe or standard input). Also, multiple
> jobs cannot be used together with the
> option <option>--single-transaction</option>.
> 
> Attached patch with those changes.

I agree with your simpler version.  I'll mark the patch "ready for committer".

Yours,
Laurenz Albe





view thread (6+ 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]
  Subject: Re: pg_restore documentation and --create/--single-transaction limitation
  In-Reply-To: <[email protected]>

* 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