Your message dated Mon, 14 Mar 2016 19:49:11 +0000
with message-id <[email protected]>
and subject line Bug#755908: fixed in dbconfig-common 2.0.4
has caused the Debian Bug report #755908,
regarding dbconfig-common: fails to purge active PostgreSQL database
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
755908: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=755908
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: dbconfig-common
Version: 1.8.47+nmu1
Severity: normal

Hi,

I’m working on packaging a web application that uses PostgreSQL
(well, will do once I finish converting it from SQLite2 to it).

When I 'apt-get purge packagename', dbconfig-common tries to
remove the database (as I tell it to), but fails to do that.

I discovered the reason for this is that I cannot purge the
database manually “the easy way” either:

postgres=# DROP DATABASE simkolab;
ERROR:  database "simkolab" is being accessed by other users
DETAIL:  There is 1 other session using the database.

Some related reading:
- http://stackoverflow.com/a/5109190/2171120
- http://stackoverflow.com/a/7489673/2171120

The reason here is that Apache has not yet been restarted/reloaded
and that one of its children is holding the connection open.

I’m currently trying to shuffle the dbc_go call in postrm in
between do_webserver_config() / apache2_invoke disconf and the
rest of the cleanup, but that means duplicating it, etc.

It would be really nice if dbconfig-common could be patched to
tear down a database using the method shown in the above SO link:

1) REVOKE CONNECT ON DATABASE dbname FROM PUBLIC, username;
2) SELECT
    pg_terminate_backend(procpid)
   FROM
    pg_stat_activity
   WHERE
    -- don't kill my own connection!
    procpid <> pg_backend_pid()
    -- don't kill the connections to other databases
    AND datname = 'database_name'
   ; -- for psql 8.4 to 9.1
     -- in psql 9.2 the column procpid was renamed to pid
3) DROP DATABASE dbname;

Might be useful to have the psql maintainers say something to
this as well; perhaps there’s an easier way?

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.14-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/lksh

Versions of packages dbconfig-common depends on:
ii  debconf [debconf-2.0]  1.5.53
ii  ucf                    3.0030

dbconfig-common recommends no packages.

Versions of packages dbconfig-common suggests:
ii  postgresql-client-9.3 [postgresql-client]  9.3.4-2

-- debconf information:
  dbconfig-common/db/basepath:
* dbconfig-common/remember-admin-pass: false
* dbconfig-common/remote-questions-default: false
  dbconfig-common/db/dbname:
  dbconfig-common/purge: false
  dbconfig-common/mysql/admin-user: root
  dbconfig-common/internal/skip-preseed: false
  dbconfig-common/pgsql/authmethod-admin: ident
  dbconfig-common/internal/reconfiguring: false
  dbconfig-common/install-error: abort
  dbconfig-common/dbconfig-upgrade: true
  dbconfig-common/upgrade-error: abort
  dbconfig-common/missing-db-package-error: abort
  dbconfig-common/passwords-do-not-match:
  dbconfig-common/remote/port:
  dbconfig-common/db/app-user:
  dbconfig-common/mysql/method: unix socket
  dbconfig-common/upgrade-backup: true
  dbconfig-common/database-type:
  dbconfig-common/remove-error: abort
  dbconfig-common/remote/host:
  dbconfig-common/pgsql/changeconf: false
  dbconfig-common/pgsql/no-empty-passwords:
  dbconfig-common/pgsql/admin-user: postgres
  dbconfig-common/dbconfig-remove: true
  dbconfig-common/pgsql/method: unix socket
  dbconfig-common/dbconfig-reinstall: false
  dbconfig-common/pgsql/manualconf:
  dbconfig-common/pgsql/no-user-choose-other-method:
  dbconfig-common/dbconfig-install: true
  dbconfig-common/pgsql/authmethod-user:
  dbconfig-common/pgsql/revertconf: false
  dbconfig-common/remote/newhost:

--- End Message ---
--- Begin Message ---
Source: dbconfig-common
Source-Version: 2.0.4

We believe that the bug you reported is fixed in the latest version of
dbconfig-common, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Paul Gevers <[email protected]> (supplier of updated dbconfig-common package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 14 Mar 2016 20:19:13 +0100
Source: dbconfig-common
Binary: dbconfig-common dbconfig-mysql dbconfig-pgsql dbconfig-sqlite 
dbconfig-sqlite3 dbconfig-no-thanks
Architecture: source
Version: 2.0.4
Distribution: unstable
Urgency: medium
Maintainer: Paul Gevers <[email protected]>
Changed-By: Paul Gevers <[email protected]>
Description:
 dbconfig-common - framework that helps packages to manage databases
 dbconfig-mysql - dbconfig-common MySQL/MariaDB support
 dbconfig-no-thanks - dbconfig-common bypass
 dbconfig-pgsql - dbconfig-common PostgreSQL support
 dbconfig-sqlite - dbconfig-common SQLite support
 dbconfig-sqlite3 - dbconfig-common SQLite3 support
Closes: 463100 755908 816068 817889
Changes:
 dbconfig-common (2.0.4) unstable; urgency=medium
 .
   * Update Japanese translation, thanks to Takuma Yamada (Closes: #816068)
   * Make sure that after one loop in the error handling we are for sure
     going to raise the error above the priority level.
   * Ask the administrator if backups should be made on upgrade (Closes:
     #463100)
   * Terminate PostgreSQL connections before dropping db (Closes: #755908)
   * Fix typo in MySQL logic introduced in 2.0.3 (Closes: #817889)
Checksums-Sha1:
 bfcf6ea165eac6b439e304f5a229ad2db47f03cd 1699 dbconfig-common_2.0.4.dsc
 87017a8b21c014c68a15564cc0f403bcb14856d9 211556 dbconfig-common_2.0.4.tar.xz
Checksums-Sha256:
 31f7998fee41122df86c8734ef34405c8e7a3f951f32ff818741e0809bf05fd9 1699 
dbconfig-common_2.0.4.dsc
 e7f33755a746d6acb91f5663a898a03924baf9931f02306af49049314299c60b 211556 
dbconfig-common_2.0.4.tar.xz
Files:
 4058e2c5746f5a65303d0e791bc7e8fe 1699 admin optional dbconfig-common_2.0.4.dsc
 b7aa6bd577ccf3e4d4951c68c5249ce0 211556 admin optional 
dbconfig-common_2.0.4.tar.xz

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBCAAGBQJW5xIMAAoJEJxcmesFvXUKztMH/2XpZGRN1/f2f+e10VuI8C5j
14212fnl/9ypJCN7H/dCNWZ9/6TcZSP/UdAIkQ2iXd+PJjzRui8ZsMGvJMCm6hev
6z42O/1gAykkrJ91JI9+yfIiZ5SJ9czK+Xpz9Mq2wOS7SoBsKkVuAv/9w2v57Hcz
xIgGXOWzqrnSw3Rc4U0vjHuKAAGQ6mxFlVuuD2f2BgpDoao7gdTQ1b+E6YWrQpFR
SIuPXQAb1Y/Cf2NEUpu47jWGb7o3kOY68zW3wVawTKE1A20RIEacRQktHLAVz123
clqVXCShjgPwwCJWFgkajHHw1267d1LJ2m4j+givK4mMrLO3F95shS9g9/P3/PI=
=29UK
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to