public inbox for [email protected]help / color / mirror / Atom feed
[PATCH 07/17] pg_restore: "must be specified" and --list 3+ messages / 3 participants [nested] [flat]
* [PATCH 07/17] pg_restore: "must be specified" and --list @ 2020-12-06 04:43 Justin Pryzby <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Justin Pryzby @ 2020-12-06 04:43 UTC (permalink / raw) This was discussed here, but the idea got lost. https://www.postgresql.org/message-id/flat/20190612170201.GA11881%40alvherre.pgsql#2984347ab074e6f19... Note that -d and -f are exclusive. Perhaps we should also reject -d and -l ? --- src/bin/pg_dump/pg_restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c index 589b4aed53..742e4140eb 100644 --- a/src/bin/pg_dump/pg_restore.c +++ b/src/bin/pg_dump/pg_restore.c @@ -305,7 +305,7 @@ main(int argc, char **argv) /* Complain if neither -f nor -d was specified (except if dumping TOC) */ if (!opts->cparams.dbname && !opts->filename && !opts->tocSummary) { - pg_log_error("one of -d/--dbname and -f/--file must be specified"); + pg_log_error("one of -d/--dbname, -f/--file or -l/--list must be specified"); exit_nicely(1); } -- 2.17.0 --PVZB3C997XEKXh6G Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0008-pg_dump-fix-pre-existing-docs-comments.patch" ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Missing LWLock protection in pgstat_reset_replslot() @ 2024-03-05 08:49 shveta malik <[email protected]> 0 siblings, 1 reply; 3+ messages in thread From: shveta malik @ 2024-03-05 08:49 UTC (permalink / raw) To: Heikki Linnakangas <[email protected]>; +Cc: Bertrand Drouvot <[email protected]>; [email protected]; shveta malik <[email protected]> On Tue, Mar 5, 2024 at 1:25 PM Heikki Linnakangas <[email protected]> wrote: > SearchNamedReplicationSlot() will also acquire the lock in LW_SHARED > mode, when you pass need_lock=true. So that at least should be changed > to false. > Also don't we need to release the lock when we return here: /* * Nothing to do for physical slots as we collect stats only for logical * slots. */ if (SlotIsPhysical(slot)) return; thanks Shveta ^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Missing LWLock protection in pgstat_reset_replslot() @ 2024-03-05 13:22 Bertrand Drouvot <[email protected]> parent: shveta malik <[email protected]> 0 siblings, 0 replies; 3+ messages in thread From: Bertrand Drouvot @ 2024-03-05 13:22 UTC (permalink / raw) To: shveta malik <[email protected]>; +Cc: Heikki Linnakangas <[email protected]>; [email protected] Hi, On Tue, Mar 05, 2024 at 02:19:19PM +0530, shveta malik wrote: > On Tue, Mar 5, 2024 at 1:25 PM Heikki Linnakangas <[email protected]> wrote: > > > SearchNamedReplicationSlot() will also acquire the lock in LW_SHARED > > mode, when you pass need_lock=true. So that at least should be changed > > to false. > > > > Also don't we need to release the lock when we return here: > > /* > * Nothing to do for physical slots as we collect stats only for logical > * slots. > */ > if (SlotIsPhysical(slot)) > return; D'oh! Thanks! Fixed in v2 shared up-thread. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-03-05 13:22 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-12-06 04:43 [PATCH 07/17] pg_restore: "must be specified" and --list Justin Pryzby <[email protected]> 2024-03-05 08:49 Re: Missing LWLock protection in pgstat_reset_replslot() shveta malik <[email protected]> 2024-03-05 13:22 ` Re: Missing LWLock protection in pgstat_reset_replslot() Bertrand Drouvot <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox