pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16606: V 4.25: unable to drop database
2+ messages / 2 participants
[nested] [flat]

* BUG #16606: V 4.25: unable to drop database
@ 2020-09-03 08:43  PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2020-09-03 08:43 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: g.borri@nemesix.it

The following bug has been logged on the website:

Bug reference:      16606
Logged by:          G. Borri
Email address:      g.borri@nemesix.it
PostgreSQL version: 10.14
Operating system:   ubuntu 18.04 desktop 64bit
Description:        

Hi, after several attempts, I tried the system just started.
So I opened pgAdmin, insert my admin pwd, opened the server tree till the
database I need to delete.
Right click on the db name and then click on Delete/Drop database, then
click on OK on the confirm request. 
After some seconds this error appear: The database is in use, there is 1
session client.

Before the last update I was always able to delete the databases in this way



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #16606: V 4.25: unable to drop database
@ 2020-09-03 17:32  Alexander Korotkov <aekorotkov@gmail.com>
  parent: PG Bug reporting form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alexander Korotkov @ 2020-09-03 17:32 UTC (permalink / raw)
  To: g.borri@nemesix.it; pgsql-bugs@lists.postgresql.org

Hi!

On Thu, Sep 3, 2020 at 11:46 AM PG Bug reporting form
<noreply@postgresql.org> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      16606
> Logged by:          G. Borri
> Email address:      g.borri@nemesix.it
> PostgreSQL version: 10.14
> Operating system:   ubuntu 18.04 desktop 64bit
> Description:
>
> Hi, after several attempts, I tried the system just started.
> So I opened pgAdmin, insert my admin pwd, opened the server tree till the
> database I need to delete.
> Right click on the db name and then click on Delete/Drop database, then
> click on OK on the confirm request.
> After some seconds this error appear: The database is in use, there is 1
> session client.

Yes, it's not possible to drop the PostgreSQL database, while there is
another session using it.  You can check the session, which uses the
database, by querying pg_stat_activity view.

SELECT * FROM pg_stat_activity WHERE datname = 'postgres' AND pid <>
pg_backend_pid();

> Before the last update I was always able to delete the databases in this way

This behavior wasn't changed in PostgreSQL 10.  But you might be
interested that there is a FORCE option for DROP TABLE [1] in
PostgreSQL 13, which will be released soon.

Links
1. https://www.postgresql.org/docs/13/sql-dropdatabase.html

------
Regards,
Alexander Korotkov





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2020-09-03 17:32 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 08:43 BUG #16606: V 4.25: unable to drop database PG Bug reporting form <noreply@postgresql.org>
2020-09-03 17:32 ` Alexander Korotkov <aekorotkov@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox