public inbox for [email protected]  
help / color / mirror / Atom feed
From: Mahendra Singh Thalor <[email protected]>
To: jian he <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Guillaume Lelarge <[email protected]>
Cc: Nathan Bossart <[email protected]>
Cc: Magnus Hagander <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Cc: Dilip Kumar <[email protected]>
Subject: Re: Non-text mode for pg_dumpall
Date: Sat, 11 Jan 2025 21:38:12 +0530
Message-ID: <CAKYtNAqd4k+4+XANxjDc35i+WPme476DkP7msjYpX85F+4UsUg@mail.gmail.com> (raw)
In-Reply-To: <CACJufxGcZ1rK94cgfdc9McCD7W-83PT9_cx5VoFeC-HVc10Wzg@mail.gmail.com>
References: <CAKYtNAp9vOtydXL3_pnGJ+TetZtN=FYSnZSMCqXceU3mkHPxPg@mail.gmail.com>
	<[email protected]>
	<CAKYtNAo-6HZy-JhTYS321AxGE_BPCg7WTFVLeXTuFMZ6HYK2vg@mail.gmail.com>
	<CACJufxGcZ1rK94cgfdc9McCD7W-83PT9_cx5VoFeC-HVc10Wzg@mail.gmail.com>

On Sat, 11 Jan 2025 at 9:30 PM, jian he <[email protected]> wrote:

> hi.
> the following two tests, you can add to src/bin/pg_dump/t/001_basic.pl
>
> command_fails_like(
>     [ 'pg_restore', '--globals-only', '-f', 'xxx' ],
>     qr/\Qpg_restore: error: option -g\/--globals-only requires option
> -d\/--dbname\E/,
>     'pg_restore: error: option -g/--globals-only requires option
> -d/--dbname'
> );
> command_fails_like(
>     [ 'pg_restore', '--globals-only', '--file=xxx',
> '--exclude-database=x',],
>     qr/\Qpg_restore: error: option --exclude-database cannot be used
> together with -g\/--globals-only\E/,
>     'pg_restore: error: option --exclude-database cannot be used
> together with -g/--globals-only'
> );
>
>
> in pg_restore.sgml.
>      <varlistentry>
>       <term><option>--exclude-database=<replaceable
> class="parameter">pattern</replaceable></option></term>
>       <listitem>
> the position should right after
>      <varlistentry>
>       <term><option>-d <replaceable
> class="parameter">dbname</replaceable></option></term>
>       <term><option>--dbname=<replaceable
> class="parameter">dbname</replaceable></option></term>
>
>
> should
> pg_restore --globals-only
> pg_restore --exclude-database=pattern
> be in a separate patch?
>
>
> i am also wondering what will happen:
> pg_restore --exclude-database=pattern --dbname=pattern


For restore, we will make server connection with ‘pattern’ database and we
will skip restoring for ‘pattern’ database as we are giving ‘pattern’ with
—exclude-database.
With server connection, we will restore global.dat at the start of
pg_restore.

Thanks and regards
Mahendra Singh Thalor
 EDB postgres


>


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], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: Non-text mode for pg_dumpall
  In-Reply-To: <CAKYtNAqd4k+4+XANxjDc35i+WPme476DkP7msjYpX85F+4UsUg@mail.gmail.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