Re: There should be a way to use the force flag when restoring databases

2024-01-14 Thread vignesh C
On Wed, 20 Sept 2023 at 17:27, Daniel Gustafsson wrote: > > > On 20 Sep 2023, at 11:24, Peter Eisentraut wrote: > > > > On 06.08.23 21:39, Ahmed Ibrahim wrote: > >> I have addressed the pg version compatibility with the FORCE option in > >> drop. Here is the last version of the patch > > > > The

Re: There should be a way to use the force flag when restoring databases

2023-09-20 Thread Daniel Gustafsson
> On 20 Sep 2023, at 11:24, Peter Eisentraut wrote: > > On 06.08.23 21:39, Ahmed Ibrahim wrote: >> I have addressed the pg version compatibility with the FORCE option in drop. >> Here is the last version of the patch > > The patch is pretty small, but I think there is some disagreement whether

Re: There should be a way to use the force flag when restoring databases

2023-09-20 Thread Peter Eisentraut
On 06.08.23 21:39, Ahmed Ibrahim wrote: I have addressed the pg version compatibility with the FORCE option in drop. Here is the last version of the patch The patch is pretty small, but I think there is some disagreement whether we want this option at all? Maybe some more people can make the

Re: There should be a way to use the force flag when restoring databases

2023-08-06 Thread Ahmed Ibrahim
Hi all, I have addressed the pg version compatibility with the FORCE option in drop. Here is the last version of the patch On Tue, Aug 1, 2023 at 6:19 PM Ahmed Ibrahim wrote: > Hi Gurjeet, > > I have addressed all your comments except for the tests. > > I have tried adding test cases but I wasn

Re: There should be a way to use the force flag when restoring databases

2023-08-01 Thread Ahmed Ibrahim
Hi Gurjeet, I have addressed all your comments except for the tests. I have tried adding test cases but I wasn't able to do it as it's in my mind. I am not able to do things like having connections to the database and trying to force the restore, then it will complete successfully otherwise it sh

Re: There should be a way to use the force flag when restoring databases

2023-07-26 Thread Gurjeet Singh
On Sun, Jul 23, 2023 at 6:09 AM Ahmed Ibrahim wrote: > > Hi everyone, > > I have been working on this. This is a proposed patch for it so we have a > force option for DROPping the database. > > I'd appreciate it if anyone can review. Hi Ahmed, Thanks for working on this patch! + +int

Re: There should be a way to use the force flag when restoring databases

2023-07-23 Thread Ahmed Ibrahim
Hi everyone, I have been working on this. This is a proposed patch for it so we have a force option for DROPping the database. I'd appreciate it if anyone can review. On Thu, Jul 20, 2023 at 9:36 PM Gurjeet Singh wrote: > On Thu, Jul 20, 2023 at 2:10 AM Daniel Gustafsson wrote: > > > > > On

Re: There should be a way to use the force flag when restoring databases

2023-07-20 Thread Gurjeet Singh
On Thu, Jul 20, 2023 at 2:10 AM Daniel Gustafsson wrote: > > > On 19 Jul 2023, at 19:28, Gurjeet Singh wrote: > > > > The docs for 'pg_restore --create` say "Create the database before > > restoring into it. If --clean is also specified, drop and recreate the > > target database before connecting

Re: There should be a way to use the force flag when restoring databases

2023-07-20 Thread Daniel Gustafsson
> On 19 Jul 2023, at 19:28, Gurjeet Singh wrote: > > On Tue, Jul 18, 2023 at 12:53 AM Joan wrote: >> >> Since posgres 13 there's the option to do a FORCE when dropping a database >> (so it disconnects current users) Documentation here: >> https://www.postgresql.org/docs/current/sql-dropdataba

Re: There should be a way to use the force flag when restoring databases

2023-07-19 Thread Joan
HI Gurjeet, that woulld be great, all the cases where a FORCE won't apply make totally sense (either complex scenarios or permission issues) > It doesn't terminate if prepared transactions, active logical replication > slots or subscriptions are present in the target database. > This will fail if

Re: There should be a way to use the force flag when restoring databases

2023-07-19 Thread Gurjeet Singh
On Tue, Jul 18, 2023 at 12:53 AM Joan wrote: > > Since posgres 13 there's the option to do a FORCE when dropping a database > (so it disconnects current users) Documentation here: > https://www.postgresql.org/docs/current/sql-dropdatabase.html > > I am currently using dir format for the output >

There should be a way to use the force flag when restoring databases

2023-07-18 Thread Joan
Since posgres 13 there's the option to do a FORCE when dropping a database (so it disconnects current users) Documentation here: https://www.postgresql.org/docs/current/sql-dropdatabase.html I am currently using dir format for the output pg_dump -d "bdname" -F d -j 4 -v -f /tmp/dir And restori