Re: dropdb --force - Mailing list pgsql-hackers

From Ibrar Ahmed
Subject Re: dropdb --force
Date
Msg-id CALtqXTdnsvGuBZJ=iup5fy5Hwcr2YWf0XHgcb2Kmv3MAZ+8OgQ@mail.gmail.com
Whole thread Raw
In response to Re: dropdb --force  (Ibrar Ahmed <ibrar.ahmad@gmail.com>)
Responses Re: dropdb --force
List pgsql-hackers
Yes, I think it is because of this code Snippet

                    if (force_terminate)
                    {
                        /* try to terminate backend */
#ifdef HAVE_SETSID
                            kill(-(proc->pid), SIGTERM);
#else
                            kill(proc->pid, SIGTERM);



On Tue, Apr 9, 2019 at 3:06 PM Ibrar Ahmed <ibrar.ahmad@gmail.com> wrote:
>
> Is this the intended behavior? SIGTERM is received.
>
> test=# begin;
> BEGIN
> test=# create table test(a int);
> CREATE TABLE
>
>
> In another terminal drop the database.
>
> test=# begin;
> psql: FATAL:  terminating connection due to administrator command
> server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
> The connection to the server was lost. Attempting reset: Failed.
> !>



-- 
Ibrar Ahmed



pgsql-hackers by date:

Previous
From: Ibrar Ahmed
Date:
Subject: Re: dropdb --force
Next
From: Peter Eisentraut
Date:
Subject: Re: PGCOLOR? (Re: pgsql: Unified logging system for command-lineprograms)