On Sat, Nov 30, 2019 at 7:46 AM Michael Paquier wrote:
>
> On Fri, Nov 29, 2019 at 03:31:21PM +0530, Amit Kapila wrote:
> > It might be better to move it to next CF as the discussion is still active.
>
> OK, just did that.
>
I have marked this as committed in CF. This was committed some time
bac
On Fri, Nov 29, 2019 at 03:31:21PM +0530, Amit Kapila wrote:
> It might be better to move it to next CF as the discussion is still active.
OK, just did that.
--
Michael
signature.asc
Description: PGP signature
';
$killme_stderr = '';
-# Check the connections on foobar1 database.
-is( $node->safe_psql(
- 'postgres',
- qq[SELECT pid FROM pg_stat_activity WHERE datname='foobar1' AND pid = $pid;]
- ),
- $pid,
- 'database foobar1 is used');
-
# Now drop database with dropdb --force command.
$node->issues_sql_like(
[ 'dropdb', '--force', 'foobar1' ],
On Fri, Nov 29, 2019 at 1:36 PM Juan José Santamaría Flecha
wrote:
>
>
> On Fri, Nov 29, 2019 at 7:30 AM Michael Paquier wrote:
>>
>> On Thu, Nov 28, 2019 at 08:53:56AM +0530, Amit Kapila wrote:
>> > I have pushed the refactoring patch. In the second patch, I have a
>> > few more comments. I am
On Fri, Nov 29, 2019 at 7:30 AM Michael Paquier wrote:
> On Thu, Nov 28, 2019 at 08:53:56AM +0530, Amit Kapila wrote:
> > I have pushed the refactoring patch. In the second patch, I have a
> > few more comments. I am not completely sure if it is a good idea to
> > write a new test file 060_drop
On Thu, Nov 28, 2019 at 08:53:56AM +0530, Amit Kapila wrote:
> I have pushed the refactoring patch. In the second patch, I have a
> few more comments. I am not completely sure if it is a good idea to
> write a new test file 060_dropdb_force.pl when we already have an
> existing file 050_dropdb.pl
rnings;
use PostgresNode;
use TestLib;
-use Test::More tests => 13;
+use Test::More tests => 11;
program_help_ok('dropdb');
program_version_ok('dropdb');
@@ -19,11 +19,5 @@ $node->issues_sql_like(
qr/statement: DROP DATABASE foobar1/,
'SQL DROP DATABAS
On Wed, Nov 27, 2019 at 10:15 AM vignesh C wrote:
>
>
> Attached patch has the fixes for the above comments.
>
I have pushed the refactoring patch. In the second patch, I have a
few more comments. I am not completely sure if it is a good idea to
write a new test file 060_dropdb_force.pl when we
derr) = ('', '', '');
+my $killme = IPC::Run::start(
+ [
+ 'psql', '-X', '-qAt', '-v', 'ON_ERROR_STOP=1', '-f', '-', '-d',
+ $node->connstr('foobar1')
+ ],
+ '<',
+ \$k
On Mon, Nov 25, 2019 at 11:22 PM vignesh C wrote:
>
> On Sun, Nov 24, 2019 at 5:06 PM Pavel Stehule wrote:
> >
> >
> >
> > ne 24. 11. 2019 v 11:25 odesílatel vignesh C napsal:
> >>
> >> On Sat, Nov 23, 2019 at 4:42 PM Amit Kapila
> >> wrote:
> >> >
> >> > On Fri, Nov 22, 2019 at 3:16 PM vignes
On Sun, Nov 24, 2019 at 5:06 PM Pavel Stehule wrote:
>
>
>
> ne 24. 11. 2019 v 11:25 odesílatel vignesh C napsal:
>>
>> On Sat, Nov 23, 2019 at 4:42 PM Amit Kapila wrote:
>> >
>> > On Fri, Nov 22, 2019 at 3:16 PM vignesh C wrote:
>> > >
>> > > Thanks for fixing the comments. The changes looks f
On Sun, Nov 24, 2019 at 3:55 PM vignesh C wrote:
>
> On Sat, Nov 23, 2019 at 4:42 PM Amit Kapila wrote:
> >
>
> > 2.
> > ok( TestLib::pump_until(
> > + $killme,
> > + $psql_timeout,
> > + \$killme_stderr,
> > + qr/FATAL: terminating connection due to administrator command/m
> > + ),
> > + "psql
ne 24. 11. 2019 v 11:25 odesílatel vignesh C napsal:
> On Sat, Nov 23, 2019 at 4:42 PM Amit Kapila
> wrote:
> >
> > On Fri, Nov 22, 2019 at 3:16 PM vignesh C wrote:
> > >
> > > Thanks for fixing the comments. The changes looks fine to me. I have
> > > fixed the first comment, attached patch has
as the previous connection will be
+# terminated by previous drop database.
+($killme_stdin, $killme_stdout, $killme_stderr) = ('', '', '');
+$killme->run();
+
+# Acquire pid of new backend.
+$killme_stdin .= q[
+SELECT pg_backend_pid();
+];
+ok(TestLib::pump_until
On Fri, Nov 22, 2019 at 3:16 PM vignesh C wrote:
>
> Thanks for fixing the comments. The changes looks fine to me. I have
> fixed the first comment, attached patch has the changes for the same.
>
Few comments:
--
1. There is a lot of duplicate code in this test. Basically
pá 22. 11. 2019 v 10:46 odesílatel vignesh C napsal:
> On Fri, Nov 22, 2019 at 12:10 AM Pavel Stehule
> wrote:
> >
> >
> >
> > čt 21. 11. 2019 v 6:33 odesílatel vignesh C
> napsal:
> >>
> >> On Mon, Nov 18, 2019 at 6:30 PM Pavel Stehule
> wrote:
> >> >>
> >> >> I'll send this test today
> >> >
EXISTS(SELECT * FROM pg_database WHERE datname='foobar1');]),
+ 'f', 'database foobar1 was removed');
+
+# Create database that will be dropped.
+$node->safe_psql('postgres', 'CREATE DATABASE foobar1');
+
+# Restart psql as the previous connection w
čt 21. 11. 2019 v 6:33 odesílatel vignesh C napsal:
> On Mon, Nov 18, 2019 at 6:30 PM Pavel Stehule
> wrote:
> >>
> >> I'll send this test today
> >
> >
> > here is it
> >
>
> Thanks for adding the test.
> Few comments:
> This function is same as in test/recovery/t/013_crash_restart.pl, we
> can
On Mon, Nov 18, 2019 at 6:30 PM Pavel Stehule wrote:
>>
>> I'll send this test today
>
>
> here is it
>
Thanks for adding the test.
Few comments:
This function is same as in test/recovery/t/013_crash_restart.pl, we
can add to a common file and use in both places:
+# Pump until string is matched,
st 20. 11. 2019 v 12:40 odesílatel Amit Kapila
napsal:
> On Mon, Nov 18, 2019 at 10:59 AM Pavel Stehule
> wrote:
> > po 18. 11. 2019 v 6:24 odesílatel Amit Kapila
> napsal:
> >>
> >>
> >> I have slightly modified the main patch and attached is the result.
> >> Basically, I don't see any need to
On Mon, Nov 18, 2019 at 10:59 AM Pavel Stehule wrote:
> po 18. 11. 2019 v 6:24 odesílatel Amit Kapila
> napsal:
>>
>>
>> I have slightly modified the main patch and attached is the result.
>> Basically, I don't see any need to repeat what is mentioned in the
>> Drop Database page. Let me know w
o administrator command/m
+ ),
+ "psql query died successfully after SIGTERM");
+$killme_stderr = '';
+$killme_stdout = '';
+$killme->finish;
+
+# and there is not a database with this name
+is($node->safe_psql('postgres', qq[SELECT EXISTS(SELECT * F
po 18. 11. 2019 v 7:37 odesílatel Amit Kapila
napsal:
> On Mon, Nov 18, 2019 at 10:59 AM Pavel Stehule
> wrote:
> > po 18. 11. 2019 v 6:24 odesílatel Amit Kapila
> napsal:
> >>
> >> On Mon, Nov 18, 2019 at 10:33 AM Pavel Stehule
> wrote:
> >> >
> >> > po 18. 11. 2019 v 4:43 odesílatel vignesh
On Mon, Nov 18, 2019 at 10:59 AM Pavel Stehule wrote:
> po 18. 11. 2019 v 6:24 odesílatel Amit Kapila
> napsal:
>>
>> On Mon, Nov 18, 2019 at 10:33 AM Pavel Stehule
>> wrote:
>> >
>> > po 18. 11. 2019 v 4:43 odesílatel vignesh C napsal:
>> >>
>> >>
>> >> I had seen that isolation test(src/tes
po 18. 11. 2019 v 6:24 odesílatel Amit Kapila
napsal:
> On Mon, Nov 18, 2019 at 10:33 AM Pavel Stehule
> wrote:
> >
> > po 18. 11. 2019 v 4:43 odesílatel vignesh C
> napsal:
> >>
> >>
> >> When we don't specify -e option, the query used to drop db will not be
> >> printed like below:
> >> ./dro
On Mon, Nov 18, 2019 at 10:33 AM Pavel Stehule wrote:
>
> po 18. 11. 2019 v 4:43 odesílatel vignesh C napsal:
>>
>>
>> When we don't specify -e option, the query used to drop db will not be
>> printed like below:
>> ./dropdb testdb1
>> When we specify -e option, the query used to drop db will be
t;first try to terminate other
> connections". It is shorter. The current text has 78 chars, what should be
> acceptable
> >
> >>
> >> We can add one test including -e option which validates the command
> >> generation including WITH (FORCE):
> >
try to terminate other
>> connection before dropping\n"));
>>
>
> done. maybe alternative can be "first try to terminate other connections". It
> is shorter. The current text has 78 chars, what should be acceptable
>
>>
>> We can add one test
terminate other
> connection before dropping\n"));
>
>
done. maybe alternative can be "first try to terminate other connections".
It is shorter. The current text has 78 chars, what should be acceptable
> We can add one test including -e option which validates the comma
CE):
+$node->safe_psql('postgres', 'CREATE DATABASE foobar2');
+$node->issues_sql_like(
+[ 'dropdb', '--force', 'foobar2' ],
+qr/statement: DROP DATABASE foobar2 WITH \(FORCE\);/,
+'SQL DROP DATABASE (FORCE) run');
+
Al
deleting anything\n"));
+ printf(_(" -f, --force try to terminate other connection before\n"));
printf(_(" -V, --version output version information, then exit\n"));
printf(_(" --if-exists don't report error if database doesn't exist\n"));
printf(_(" -?, --helpshow this help, then exit\n"));
diff --git a/src/bin/scripts/t/050_dropdb.pl b/src/bin/scripts/t/050_dropdb.pl
index 25aa54a4ae..c51babe093 100644
--- a/src/bin/scripts/t/050_dropdb.pl
+++ b/src/bin/scripts/t/050_dropdb.pl
@@ -3,7 +3,7 @@ use warnings;
use PostgresNode;
use TestLib;
-use Test::More tests => 11;
+use Test::More tests => 13;
program_help_ok('dropdb');
program_version_ok('dropdb');
@@ -19,5 +19,11 @@ $node->issues_sql_like(
qr/statement: DROP DATABASE foobar1/,
'SQL DROP DATABASE run');
+$node->safe_psql('postgres', 'CREATE DATABASE foobar2');
+$node->issues_sql_like(
+ [ 'dropdb', '--force', 'foobar2' ],
+ qr/statement: DROP DATABASE foobar2 WITH \(FORCE\);/,
+ 'SQL DROP DATABASE (FORCE) run');
+
$node->command_fails([ 'dropdb', 'nonexistent' ],
'fails with nonexistent database');
On Wed, Nov 13, 2019 at 8:05 PM Pavel Stehule wrote:
>
>
>
> st 13. 11. 2019 v 7:13 odesílatel Pavel Stehule
> napsal:
>>
>>
>>
>> st 13. 11. 2019 v 7:12 odesílatel Amit Kapila
>> napsal:
>>>
>>> On Tue, Nov 12, 2019 at 11:17 AM Amit Kapila
>>> wrote:
>>> >
>>> > I am planning to commit this
čt 14. 11. 2019 v 7:44 odesílatel Amit Kapila
napsal:
> On Thu, Nov 14, 2019 at 11:43 AM Pavel Stehule
> wrote:
> >
> > st 13. 11. 2019 v 15:34 odesílatel Pavel Stehule <
> pavel.steh...@gmail.com> napsal:
> >>
> >>
> >> here it is. It's based on Filip Rembialkowski's patch if I remember
> corre
On Thu, Nov 14, 2019 at 12:14 PM Amit Kapila wrote:
>
> On Thu, Nov 14, 2019 at 11:43 AM Pavel Stehule
> wrote:
> >
> > st 13. 11. 2019 v 15:34 odesílatel Pavel Stehule
> > napsal:
> >>
> >>
> >> here it is. It's based on Filip Rembialkowski's patch if I remember
> >> correctly
> >
> >
> > ha
On Thu, Nov 14, 2019 at 11:43 AM Pavel Stehule wrote:
>
> st 13. 11. 2019 v 15:34 odesílatel Pavel Stehule
> napsal:
>>
>>
>> here it is. It's based on Filip Rembialkowski's patch if I remember correctly
>
>
> have I this patch assign to next commitfest or you process it in this
> commitfest?
>
st 13. 11. 2019 v 15:34 odesílatel Pavel Stehule
napsal:
>
>
> st 13. 11. 2019 v 7:13 odesílatel Pavel Stehule
> napsal:
>
>>
>>
>> st 13. 11. 2019 v 7:12 odesílatel Amit Kapila
>> napsal:
>>
>>> On Tue, Nov 12, 2019 at 11:17 AM Amit Kapila
>>> wrote:
>>> >
>>> > I am planning to commit this p
/scripts/t/050_dropdb.pl b/src/bin/scripts/t/050_dropdb.pl
index 25aa54a4ae..c51babe093 100644
--- a/src/bin/scripts/t/050_dropdb.pl
+++ b/src/bin/scripts/t/050_dropdb.pl
@@ -3,7 +3,7 @@ use warnings;
use PostgresNode;
use TestLib;
-use Test::More tests => 11;
+use Test::More tests => 13;
program_help_ok('dropdb');
program_version_ok('dropdb');
@@ -19,5 +19,11 @@ $node->issues_sql_like(
qr/statement: DROP DATABASE foobar1/,
'SQL DROP DATABASE run');
+$node->safe_psql('postgres', 'CREATE DATABASE foobar2');
+$node->issues_sql_like(
+ [ 'dropdb', '--force', 'foobar2' ],
+ qr/statement: DROP DATABASE foobar2 WITH \(FORCE\);/,
+ 'SQL DROP DATABASE (FORCE) run');
+
$node->command_fails([ 'dropdb', 'nonexistent' ],
'fails with nonexistent database');
st 13. 11. 2019 v 7:12 odesílatel Amit Kapila
napsal:
> On Tue, Nov 12, 2019 at 11:17 AM Amit Kapila
> wrote:
> >
> > I am planning to commit this patch tomorrow unless I see more comments
> > or interest from someone else to review this.
> >
>
> Pushed. Pavel, feel free to submit dropdb utilit
On Tue, Nov 12, 2019 at 11:17 AM Amit Kapila wrote:
>
> I am planning to commit this patch tomorrow unless I see more comments
> or interest from someone else to review this.
>
Pushed. Pavel, feel free to submit dropdb utility-related patch if you want.
--
With Regards,
Amit Kapila.
Enterprise
On Mon, Nov 11, 2019 at 1:57 PM Amit Kapila wrote:
>
> This patch adds a few test cases to test the syntax in
> /src/test/regress/sql/drop_if_exists.sql which I think is not the best
> place to add the tests for this feature as it is primarily testing ..
> IF EXISTS .. syntax. OTOH, I am not sure
On Mon, Nov 11, 2019 at 8:45 AM Amit Kapila wrote:
>
> On Fri, Nov 8, 2019 at 4:57 PM Pavel Stehule wrote:
> >
> > I check it now - it has sense. the described switch can protect users
> > against useless client killing.
> >
>
> I have committed that patch. Please find the rebased patch attache
On Fri, Nov 8, 2019 at 4:57 PM Pavel Stehule wrote:
>
> pá 8. 11. 2019 v 11:50 odesílatel Amit Kapila
> napsal:
>>
>> Thanks, but are you planning to look at the other thread mentioned in
>> my previous email? We need to finish that before this.
>
>
> I check it now - it has sense. the describe
pá 8. 11. 2019 v 11:50 odesílatel Amit Kapila
napsal:
> On Fri, Nov 8, 2019 at 4:13 PM Pavel Stehule
> wrote:
> >
> >>> Did you get a chance to look at the other related patch posted by me
> >>> [1]? I have asked it before as well because I think that need to go
> >>> before this. We need to a
On Fri, Nov 8, 2019 at 4:13 PM Pavel Stehule wrote:
>
>>> Did you get a chance to look at the other related patch posted by me
>>> [1]? I have asked it before as well because I think that need to go
>>> before this. We need to avoid errors to happen after terminating the
>>> connections as other
pá 8. 11. 2019 v 6:40 odesílatel Pavel Stehule
napsal:
>
>
> pá 8. 11. 2019 v 6:39 odesílatel Amit Kapila
> napsal:
>
>> On Thu, Nov 7, 2019 at 11:29 AM Pavel Stehule
>> wrote:
>> > čt 7. 11. 2019 v 6:56 odesílatel Amit Kapila
>> napsal:
>> >>
>> >> Okay, no problem. I will pick the previous
pá 8. 11. 2019 v 6:39 odesílatel Amit Kapila
napsal:
> On Thu, Nov 7, 2019 at 11:29 AM Pavel Stehule
> wrote:
> > čt 7. 11. 2019 v 6:56 odesílatel Amit Kapila
> napsal:
> >>
> >> Okay, no problem. I will pick the previous version and do this. I
> >> will post the patch in a day or so for your
On Thu, Nov 7, 2019 at 11:29 AM Pavel Stehule wrote:
> čt 7. 11. 2019 v 6:56 odesílatel Amit Kapila napsal:
>>
>> Okay, no problem. I will pick the previous version and do this. I
>> will post the patch in a day or so for your review.
>
>
> Thank you very much
>
Did you get a chance to look at
čt 7. 11. 2019 v 6:56 odesílatel Amit Kapila
napsal:
> On Thu, Nov 7, 2019 at 10:46 AM Pavel Stehule
> wrote:
> >
> > čt 7. 11. 2019 v 3:42 odesílatel Amit Kapila
> napsal:
> >>
> >> On Wed, Nov 6, 2019 at 11:46 PM Pavel Stehule
> wrote:
> >> >
> >> > st 6. 11. 2019 v 14:59 odesílatel Tom Lane
On Thu, Nov 7, 2019 at 10:46 AM Pavel Stehule wrote:
>
> čt 7. 11. 2019 v 3:42 odesílatel Amit Kapila napsal:
>>
>> On Wed, Nov 6, 2019 at 11:46 PM Pavel Stehule
>> wrote:
>> >
>> > st 6. 11. 2019 v 14:59 odesílatel Tom Lane napsal:
>> >>
>> >> Amit Kapila writes:
>> >> > I think there is sti
čt 7. 11. 2019 v 3:42 odesílatel Amit Kapila
napsal:
> On Wed, Nov 6, 2019 at 11:46 PM Pavel Stehule
> wrote:
> >
> > st 6. 11. 2019 v 14:59 odesílatel Tom Lane napsal:
> >>
> >> Amit Kapila writes:
> >> > I think there is still a window where the same problem can happen, say
> >> > the signal
On Wed, Nov 6, 2019 at 11:46 PM Pavel Stehule wrote:
>
> st 6. 11. 2019 v 14:59 odesílatel Tom Lane napsal:
>>
>> Amit Kapila writes:
>> > I think there is still a window where the same problem can happen, say
>> > the signal has been sent by SendProcSignal to the required process and
>> > it re
st 6. 11. 2019 v 14:59 odesílatel Tom Lane napsal:
> Amit Kapila writes:
> > I think there is still a window where the same problem can happen, say
> > the signal has been sent by SendProcSignal to the required process and
> > it releases the ProcArrayLock. Now, the target process exits and a
>
Amit Kapila writes:
> I think there is still a window where the same problem can happen, say
> the signal has been sent by SendProcSignal to the required process and
> it releases the ProcArrayLock. Now, the target process exits and a
> new process gets the same pid before the signal is received.
On Sun, Nov 3, 2019 at 2:08 AM Pavel Stehule wrote:
>
>> pá 25. 10. 2019 v 4:55 odesílatel Amit Kapila
>> napsal:
>>>
>>> On Thu, Oct 24, 2019 at 8:22 PM Pavel Stehule
>>> wrote:
>>> >
>>> > čt 24. 10. 2019 v 11:10 odesílatel Amit Kapila
>>> > napsal:
>>> >>
>>> >> While making some changes
> I am sending patch where kill was replaced by SendProcSignal. I tested it
> on pg_bench with 400 connections, and it works without problems.
>
I tested it under high load and it is works. But it is slower than just
kill - under load the killing 400 connections needs about 1.5 sec.
Maybe for for
Hi
so 2. 11. 2019 v 17:18 odesílatel Pavel Stehule
napsal:
>
>
> pá 25. 10. 2019 v 4:55 odesílatel Amit Kapila
> napsal:
>
>> On Thu, Oct 24, 2019 at 8:22 PM Pavel Stehule
>> wrote:
>> >
>> > čt 24. 10. 2019 v 11:10 odesílatel Amit Kapila
>> napsal:
>> >>
>> >> While making some changes in th
pá 25. 10. 2019 v 4:55 odesílatel Amit Kapila
napsal:
> On Thu, Oct 24, 2019 at 8:22 PM Pavel Stehule
> wrote:
> >
> > čt 24. 10. 2019 v 11:10 odesílatel Amit Kapila
> napsal:
> >>
> >> While making some changes in the patch, I noticed that in
> >> TerminateOtherDBBackends, there is a race cond
On Thu, Oct 24, 2019 at 8:22 PM Pavel Stehule wrote:
>
> čt 24. 10. 2019 v 11:10 odesílatel Amit Kapila
> napsal:
>>
>> While making some changes in the patch, I noticed that in
>> TerminateOtherDBBackends, there is a race condition where after we
>> release the ProcArrayLock, the backend proces
čt 24. 10. 2019 v 11:10 odesílatel Amit Kapila
napsal:
> On Wed, Oct 23, 2019 at 12:59 PM Amit Kapila
> wrote:
> >
> > On Tue, Oct 22, 2019 at 4:51 PM Pavel Stehule
> wrote:
> > >
> > > út 22. 10. 2019 v 5:09 odesílatel Amit Kapila
> napsal:
> > >>
> > >>
> > >> CountOtherDBBackends is called
On Wed, Oct 23, 2019 at 12:59 PM Amit Kapila wrote:
>
> On Tue, Oct 22, 2019 at 4:51 PM Pavel Stehule wrote:
> >
> > út 22. 10. 2019 v 5:09 odesílatel Amit Kapila
> > napsal:
> >>
> >>
> >> CountOtherDBBackends is called from other places as well, so I don't
> >> think it is advisable to change
On Tue, Oct 22, 2019 at 4:51 PM Pavel Stehule wrote:
>
> út 22. 10. 2019 v 5:09 odesílatel Amit Kapila
> napsal:
>>
>>
>> CountOtherDBBackends is called from other places as well, so I don't
>> think it is advisable to change the sleep time in that function.
>> Also, I don't want to add a parame
út 22. 10. 2019 v 5:09 odesílatel Amit Kapila
napsal:
> On Mon, Oct 21, 2019 at 2:15 PM Pavel Stehule
> wrote:
> >
> > po 21. 10. 2019 v 10:25 odesílatel Amit Kapila
> napsal:
> >>
> >>
> >> Sorry, but I am not able to understand the reason. Are you worried
> >> about the comments atop CountOt
On Mon, Oct 21, 2019 at 2:15 PM Pavel Stehule wrote:
>
> po 21. 10. 2019 v 10:25 odesílatel Amit Kapila
> napsal:
>>
>>
>> Sorry, but I am not able to understand the reason. Are you worried
>> about the comments atop CountOtherDBBackends which says it is used in
>> Drop Database and related com
po 21. 10. 2019 v 10:25 odesílatel Amit Kapila
napsal:
> On Mon, Oct 21, 2019 at 12:24 PM Pavel Stehule
> wrote:
> >
> > po 21. 10. 2019 v 8:38 odesílatel Amit Kapila
> napsal:
> >>
> >> > If we don't wait in TerminateOtherDBBackends, then probably there
> should be necessary some cycles inside
On Mon, Oct 21, 2019 at 12:24 PM Pavel Stehule wrote:
>
> po 21. 10. 2019 v 8:38 odesílatel Amit Kapila
> napsal:
>>
>> > If we don't wait in TerminateOtherDBBackends, then probably there should
>> > be necessary some cycles inside CountOtherDBBackends. I think so code like
>> > is correct
>>
Hi
> When you say 'without any problem', do you mean to say that the drop
> database is successful? In your tests were those sessions idle? If
> so, I think we should try with busy sessions. Also, if you write any
> script to do these tests, kindly share the same so that others can
> also repe
po 21. 10. 2019 v 8:38 odesílatel Amit Kapila
napsal:
> On Mon, Oct 21, 2019 at 11:08 AM Pavel Stehule
> wrote:
> >
> > po 21. 10. 2019 v 7:11 odesílatel Amit Kapila
> napsal:
> >>
> >> >(under low load (only pg_sleep was called).
> >> >
> >>
> >> I guess this is also possible because immediate
On Mon, Oct 21, 2019 at 11:08 AM Pavel Stehule wrote:
>
> po 21. 10. 2019 v 7:11 odesílatel Amit Kapila
> napsal:
>>
>> >(under low load (only pg_sleep was called).
>> >
>>
>> I guess this is also possible because immediately after
>> TerminateOtherDBBackends, we call CountOtherDBBackends which
po 21. 10. 2019 v 7:11 odesílatel Amit Kapila
napsal:
> On Sun, Oct 20, 2019 at 2:06 AM Pavel Stehule
> wrote:
> >
> > so 19. 10. 2019 v 12:37 odesílatel Amit Kapila
> napsal:
> >>
> >> On Fri, Oct 4, 2019 at 9:54 PM Pavel Stehule
> wrote:
> >> >
> >> >>
> >> >> Can we add few tests for this f
On Sun, Oct 20, 2019 at 2:06 AM Pavel Stehule wrote:
>
> so 19. 10. 2019 v 12:37 odesílatel Amit Kapila
> napsal:
>>
>> On Fri, Oct 4, 2019 at 9:54 PM Pavel Stehule wrote:
>> >
>> >>
>> >> Can we add few tests for this feature.
>> >
>> > there are not any other test for DROP DATABASE
>> >
>>
>>
so 19. 10. 2019 v 12:37 odesílatel Amit Kapila
napsal:
> On Fri, Oct 4, 2019 at 9:54 PM Pavel Stehule
> wrote:
> >
> >>
> >> Can we add few tests for this feature.
> >
> > there are not any other test for DROP DATABASE
> >
>
> I think there are no dedicated tests for it but in a few tests, we us
On Fri, Oct 4, 2019 at 9:54 PM Pavel Stehule wrote:
>
>>
>> Can we add few tests for this feature.
>
> there are not any other test for DROP DATABASE
>
I think there are no dedicated tests for it but in a few tests, we use
it like in contrib\sepgsql\sql\alter.sql. I am not sure if we can
write a
ne 6. 10. 2019 v 10:19 odesílatel vignesh C napsal:
> On Fri, Oct 4, 2019 at 9:54 PM Pavel Stehule
> wrote:
> >
> >
> >
> > čt 3. 10. 2019 v 19:48 odesílatel vignesh C
> napsal:
> >>
> >> On Wed, Oct 2, 2019 at 10:21 PM Pavel Stehule
> wrote:
> >> >
> >> > Thank you for careful review. I hope
On Fri, Oct 4, 2019 at 9:54 PM Pavel Stehule wrote:
>
>
>
> čt 3. 10. 2019 v 19:48 odesílatel vignesh C napsal:
>>
>> On Wed, Oct 2, 2019 at 10:21 PM Pavel Stehule
>> wrote:
>> >
>> > Thank you for careful review. I hope so all issues are out.
>> >
>> >
>> Thanks Pavel for fixing the comments.
čt 3. 10. 2019 v 19:48 odesílatel vignesh C napsal:
> On Wed, Oct 2, 2019 at 10:21 PM Pavel Stehule
> wrote:
> >
> > Thank you for careful review. I hope so all issues are out.
> >
> >
> Thanks Pavel for fixing the comments.
> Few comments:
> The else part cannot be hit in DropDatabase function
On Thu, Oct 3, 2019 at 11:18 PM vignesh C wrote:
>
> On Wed, Oct 2, 2019 at 10:21 PM Pavel Stehule wrote:
> >
> > Thank you for careful review. I hope so all issues are out.
> >
> >
> Thanks Pavel for fixing the comments.
> Few comments:
> The else part cannot be hit in DropDatabase function as g
On Wed, Oct 2, 2019 at 10:21 PM Pavel Stehule wrote:
>
> Thank you for careful review. I hope so all issues are out.
>
>
Thanks Pavel for fixing the comments.
Few comments:
The else part cannot be hit in DropDatabase function as gram.y expects FORCE.
+
+ if (strcmp(opt->defname, "force") == 0)
+ f
st 2. 10. 2019 v 5:20 odesílatel Amit Kapila
napsal:
> On Thu, Sep 26, 2019 at 7:18 PM Pavel Stehule
> wrote:
>
>>
>> út 24. 9. 2019 v 14:52 odesílatel Amit Kapila
>> napsal:
>>
>>>
>>> One other minor comment:
>>> +
>>> + This will also fail, if the connections do not terminate in 5
>>> s
On Thu, Sep 26, 2019 at 7:18 PM Pavel Stehule
wrote:
>
> út 24. 9. 2019 v 14:52 odesílatel Amit Kapila
> napsal:
>
>>
>> One other minor comment:
>> +
>> + This will also fail, if the connections do not terminate in 5
>> seconds.
>> +
>>
>> Is there any implementation in the patch for
On Thu, Sep 26, 2019 at 10:04 PM Peter Eisentraut
wrote:
>
> On 2019-09-26 17:35, Alvaro Herrera wrote:
> > Well, you would have one of those:
> >
> > DROP DATABASE [IF EXISTS] name WITH (FORCE)
> > DROP DATABASE [IF EXISTS] name
> >
> > Naturally, the WITH is optional in the sense that the clause
čt 26. 9. 2019 v 18:34 odesílatel Peter Eisentraut <
peter.eisentr...@2ndquadrant.com> napsal:
> On 2019-09-26 17:35, Alvaro Herrera wrote:
> > Well, you would have one of those:
> >
> > DROP DATABASE [IF EXISTS] name WITH (FORCE)
> > DROP DATABASE [IF EXISTS] name
> >
> > Naturally, the WITH is o
On 2019-09-26 17:35, Alvaro Herrera wrote:
> Well, you would have one of those:
>
> DROP DATABASE [IF EXISTS] name WITH (FORCE)
> DROP DATABASE [IF EXISTS] name
>
> Naturally, the WITH is optional in the sense that the clause itself is
> optional. (Note we don't have CASCADE/RESTRICT in DROP DAT
čt 26. 9. 2019 v 17:35 odesílatel Alvaro Herrera
napsal:
> On 2019-Sep-26, Pavel Stehule wrote:
>
> > Alternative is DROP DATABASE [IF EXISTS] name [ CASCADE | RESTRICT ] [
> WITH
> > FORCE ]
> >
> > but in this case WIDTH keyword should not be optional (If I need to solve
> > Tom's note). Curren
On 2019-Sep-26, Pavel Stehule wrote:
> Alternative is DROP DATABASE [IF EXISTS] name [ CASCADE | RESTRICT ] [ WITH
> FORCE ]
>
> but in this case WIDTH keyword should not be optional (If I need to solve
> Tom's note). Currently WITH keyword is optional every where, so I think so
> using syntax wi
st 25. 9. 2019 v 4:14 odesílatel Amit Kapila
napsal:
> On Tue, Sep 24, 2019 at 6:22 PM Amit Kapila
> wrote:
> > On Sat, Sep 21, 2019 at 10:09 PM Pavel Stehule
> wrote:
> > >
> > > Thank you for check. I am sending updated patch
> > >
> >
> > Alvaro has up thread suggested some alternative synta
st 25. 9. 2019 v 6:38 odesílatel vignesh C napsal:
> On Sat, Sep 21, 2019 at 10:09 PM Pavel Stehule
> wrote:
> > fixed
> >
> > Thank you for check. I am sending updated patch
> >
> Thanks for fixing all the comments.
> Couple of suggestions:
> -DROP DATABASE [ IF EXISTS ] class="parameter">name
út 24. 9. 2019 v 17:51 odesílatel vignesh C napsal:
> On Tue, Sep 24, 2019 at 6:22 PM Amit Kapila
> wrote:
> >
> > On Sat, Sep 21, 2019 at 10:09 PM Pavel Stehule
> wrote:
> > >
> > > Thank you for check. I am sending updated patch
> > >
> >
> Session termination in case of drop database is solv
út 24. 9. 2019 v 14:52 odesílatel Amit Kapila
napsal:
> On Sat, Sep 21, 2019 at 10:09 PM Pavel Stehule
> wrote:
> >
> > Thank you for check. I am sending updated patch
> >
>
> Alvaro has up thread suggested some alternative syntax [1] for this
> patch, but I don't see any good argument to not go
On Sat, Sep 21, 2019 at 10:09 PM Pavel Stehule wrote:
> fixed
>
> Thank you for check. I am sending updated patch
>
Thanks for fixing all the comments.
Couple of suggestions:
-DROP DATABASE [ IF EXISTS ] name
+DROP DATABASE [ ( option
[, ...] ) ] [ IF EXISTS ] name
+
+where option can
be one of:
+
On Tue, Sep 24, 2019 at 6:22 PM Amit Kapila wrote:
> On Sat, Sep 21, 2019 at 10:09 PM Pavel Stehule
> wrote:
> >
> > Thank you for check. I am sending updated patch
> >
>
> Alvaro has up thread suggested some alternative syntax [1] for this
> patch, but I don't see any good argument to not go wi
On Tue, Sep 24, 2019 at 6:22 PM Amit Kapila wrote:
>
> On Sat, Sep 21, 2019 at 10:09 PM Pavel Stehule
> wrote:
> >
> > Thank you for check. I am sending updated patch
> >
>
Session termination in case of drop database is solved.
Some typos:
+ /*
+ * Similar code to pg_terminate_backend, but we c
On Sat, Sep 21, 2019 at 10:09 PM Pavel Stehule wrote:
>
> Thank you for check. I am sending updated patch
>
Alvaro has up thread suggested some alternative syntax [1] for this
patch, but I don't see any good argument to not go with what he has
proposed. In other words, why we should prefer the c
pá 20. 9. 2019 v 5:10 odesílatel Thomas Munro
napsal:
> On Thu, Sep 19, 2019 at 6:44 AM Pavel Stehule
> wrote:
> > I am sending updated version
>
> +appendPQExpBuffer(&sql, "DROP DATABASE %s%s%s;",
> + (force ? " (FORCE) " : ""),
>
> An extra space before (FORCE) caused
commands being sent to the server\n"));
printf(_(" -i, --interactive prompt before deleting anything\n"));
+ printf(_(" -f, --force force termination of connected backends\n"));
printf(_(" -V, --version output version informa
On Thu, Sep 19, 2019 at 12:14 AM Pavel Stehule wrote:
>
> Hi
>
> I am sending updated version - the changes against last patch are two. I use
> pg_terminate_backed for killing other terminates like Tom proposed. I am not
> sure if it is 100% practical - on second hand the necessary right to kill
On Thu, Sep 19, 2019 at 11:41 PM Pavel Stehule wrote:
>
>
>
> čt 19. 9. 2019 v 13:52 odesílatel vignesh C napsal:
>>
>> On Thu, Sep 19, 2019 at 12:14 AM Pavel Stehule
>> wrote:
>> >
>> > Hi
>> >
>> > I am sending updated version - the changes against last patch are two. I
>> > use pg_terminate
On Thu, Sep 19, 2019 at 6:44 AM Pavel Stehule wrote:
> I am sending updated version
+appendPQExpBuffer(&sql, "DROP DATABASE %s%s%s;",
+ (force ? " (FORCE) " : ""),
An extra space before (FORCE) caused the test to fail:
# 2019-09-19 19:07:22.203 UTC [1516] 050_dropdb.pl
čt 19. 9. 2019 v 13:52 odesílatel vignesh C napsal:
> On Thu, Sep 19, 2019 at 12:14 AM Pavel Stehule
> wrote:
> >
> > Hi
> >
> > I am sending updated version - the changes against last patch are two. I
> use pg_terminate_backed for killing other terminates like Tom proposed. I
> am not sure if i
On Thu, Sep 19, 2019 at 12:14 AM Pavel Stehule wrote:
>
> Hi
>
> I am sending updated version - the changes against last patch are two. I use
> pg_terminate_backed for killing other terminates like Tom proposed. I am not
> sure if it is 100% practical - on second hand the necessary right to kill
if database doesn't exist\n"));
printf(_(" -?, --helpshow this help, then exit\n"));
diff --git a/src/bin/scripts/t/050_dropdb.pl b/src/bin/scripts/t/050_dropdb.pl
index 25aa54a4ae..8e1899a6c5 100644
--- a/src/bin/scripts/t/050_dropdb.pl
+++ b/src/bin/script
1 - 100 of 136 matches
Mail list logo