Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tkiKk-006CbR-Af for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Feb 2025 11:33:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tkiJk-007Zoy-1x for pgsql-hackers@arkaria.postgresql.org; Wed, 19 Feb 2025 11:32:40 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tkiJj-007Zom-Lz for pgsql-hackers@lists.postgresql.org; Wed, 19 Feb 2025 11:32:39 +0000 Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tkiJd-001hXy-2F for pgsql-hackers@lists.postgresql.org; Wed, 19 Feb 2025 11:32:38 +0000 Received: by mail-qt1-x830.google.com with SMTP id d75a77b69052e-471f88518c8so15001541cf.0 for ; Wed, 19 Feb 2025 03:32:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739964752; x=1740569552; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=CbrB9VmT8LARV93NWehi0QWzSVCwLqt6FdP0JWFgTnA=; b=Kejx6dl+uX6WpzzkUaxCYRMdA8A7ZzN527HrtHxVtC92E7BDFHr6mmYe0cy3J+MvAZ k8DNrMWftGhwnkxcrjxcmK9L3xqvYhXaDs8q4RkrGiW8KLY/cMDkhHPVyubRl7WciLo6 O086c4i/I6iXj7J8QO0KNjxH/4+DKQSJNc6jmeQVHuGLKv+i2+3jdpceCFzXhLSeCe/Y +PRePc5w5wntySZJKIO7pHFJGH1u0cA7ws8hXYJZAqev85cvoDRbVEzxdTR5/LPK/LhV 1CKXnMTBWKjtUZ2hevYx5hclkAYPJSI1RRSbBaktBM1fg1GurIjwnIP+Rk6gAMf87+hO MRRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739964752; x=1740569552; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CbrB9VmT8LARV93NWehi0QWzSVCwLqt6FdP0JWFgTnA=; b=V6m9smGWwPKPqXv0mpW46JwaTEf5LEsVUlDr4hzfGnR9e+vuJtIF/gxOFoZP5aIRAp aH2YCIl26KGzt2buEKFFvI6HhXRMaf570v/vw8QI16yj2GG3eRoZa5fLvOwHU+FZxgGA K72MjFfc6Y0VU9b0iDwcqdAAfZH0I5rh71c/8T04bM7H2NCYp5h0DBPbsskKkyAqfqU6 FRm4zBkFdlLkGVHXdCQWisfH7P9ijnBLTZaLnS4yp3V2nZHIw+77HCJRc6dHoUWmD11K Bfs9WhNjeTI8NI6vxvR2++HTzQ+pqBGEu+/sOvl8pJivVryWyuUmlIfgWNqnREUscDwr efOg== X-Forwarded-Encrypted: i=1; AJvYcCXBXWOZ2xavj7ZfD84EPGmD1qBzlWFR4fTrgPIYDKMKO0mFNTXiqgx4Zbty+mZ+7rO+KpDc88aPhoaSFAlu@lists.postgresql.org X-Gm-Message-State: AOJu0Yz71jF+Ks9YU9xz267PKJ+s9Xfhsxs+/MP+Dh2PNYnElksRWqCk s0PmxVGH0PqpoM+8RP/DfSzC3yASEPPEOhFN+w1vagCK2nXo6twBGAsXWICsyvq6fHEyfoC4KgL TNstLeoSVEcVQN0p0fKbmLMl8RNQ= X-Gm-Gg: ASbGncuiXhpmmBqQ6Lpbvh8t/fJuerS8hKyJZTre5onHB1qw0dU2BKfK5/n/NR4mQHz 2Dd4JJl9p/E3wLZZH5JzP4d21Jnia6VEtGSgMOL6sfWRAhiLnGAfmoDyShnKDbGsiwAfBPnBYZC vOJ6ooYrYUZiFYyJgtEJh++6/MQzDrLw== X-Google-Smtp-Source: AGHT+IFEMnROT43Ety/CQB6eCoSwtGk/RJwRdpXkAOJRU3N3kTqi/1eHBxwFrSuhYNdZA27IqUOsAcEKoAXhdQiKjKs= X-Received: by 2002:a05:622a:1485:b0:471:edf0:8366 with SMTP id d75a77b69052e-472082badcamr35792091cf.42.1739964752035; Wed, 19 Feb 2025 03:32:32 -0800 (PST) MIME-Version: 1.0 References: <202501110844.5ztsym4vbflm@alvherre.pgsql> In-Reply-To: From: Mahendra Singh Thalor Date: Wed, 19 Feb 2025 17:02:17 +0530 X-Gm-Features: AWEUYZliJ4sa_lwcF0soEyJF29kZtB0eUUhhpP40unsdxiNgV2wKZb40a2v9uWw Message-ID: Subject: Re: Non-text mode for pg_dumpall To: Srinath Reddy Cc: jian.universality@gmail.com, pgsql-hackers@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, 18 Feb 2025 at 10:00, Srinath Reddy wrote: > > Hi, > i think during restore we should not force user to use -C during cases like > ./pg_restore pdd -g -f - > ./pg_restore pdd -a -f - > ./pg_restore pdd -s -f - > because its not good to use -C to create database every time when we are using these options individually. > latest patch throws following error for all the above cases -g => we can allow this case without the -C option. -a and -s => user should use this option with a single database (i mean user should use a particular dump file to restore, not full dump directory of all the databases.) As pg_dumpall dumps all the databases in create mode, we should either use --create option in our code or we should give an error. I think, error is a good option if the user is using a dump of pg_dumpall. If the user wants to use all the options, then the user should use a single database dump path. If we allow users without the --create option, then pg_restore will create all the tables under a single database even if those tables are in different databases. I will fix the -g option(1st test case) in the next patch. -- Thanks and Regards Mahendra Singh Thalor EnterpriseDB: http://www.enterprisedb.com