Bug#838953: add choice to do configuration for the user

2016-09-26 Thread 積丹尼 Dan Jacobson
Also taking a look at:
> WARNING: errors ignored on restore: 9
So we can ignore all those errors?
> Analyzing database zaokeng...
> Fixing hardcoded library paths for stored procedures...
So those errors got fixed? Or maybe those aren't those errors...
> Upgrading database template1...
> Analyzing database template1...
> Fixing hardcoded library paths for stored procedures...
> Upgrading database postgres...
> Analyzing database postgres...
> Re-enabling connections to the old cluster...
> Re-enabling connections to the new cluster...
> Copying old configuration files...
> Copying old start.conf...
> Copying old pg_ctl.conf...
> Stopping target cluster...
> Redirecting stop request to systemctl
> Stopping old cluster...
> Redirecting stop request to systemctl
> Disabling automatic startup of old cluster...
> Configuring old cluster to use a different port (5433)...
> Starting target cluster on the original port...
> Redirecting start request to systemctl
> Success. Please check that the upgraded cluster works. If it does,
Success? Despite all those errors?

And the administrator's role is to just upgrade, not run these programs
to see if they work... and what would be a test to see if it works?

> you can remove the old cluster with
> 
>   pg_dropcluster 9.5 main

Despite all those errors?



Bug#838953: add choice to do configuration for the user

2016-09-26 Thread 積丹尼 Dan Jacobson
Also it seems 9.6 is installed for us, so maybe don't tell us to install
it again.



Bug#838953: add choice to do configuration for the user

2016-09-26 Thread 積丹尼 Dan Jacobson
By the way, the whole thing fails anyway

# pg_dropcluster --stop 9.6 main
Redirecting stop request to systemctl
# pg_upgradecluster 9.5 main
Stopping old cluster...
Notice: extra pg_ctl/postgres options given, bypassing systemctl for stop 
operation
Disabling connections to the old cluster during upgrade...
Restarting old cluster with restricted connections...
Redirecting start request to systemctl
Creating new cluster 9.6/main ...
  config /etc/postgresql/9.6/main
  data   /var/lib/postgresql/9.6/main
  locale zh_TW.UTF-8
  socket /var/run/postgresql
  port   5433
Disabling connections to the new cluster during upgrade...
Redirecting start request to systemctl
Roles, databases, schemas, ACLs...
ERROR:  could not open extension control file 
"/usr/share/postgresql/9.6/extension/postgis.control": No such file or directory
ERROR:  extension "postgis" does not exist
ERROR:  type "geometry" does not exist
LINE 3: "wkb_geometry" "geometry"(Geometry,4326),
   ^
ERROR:  relation "kk1" does not exist
ERROR:  relation "kk1" does not exist
ERROR:  type "geometry" does not exist
LINE 3: "wkb_geometry" "geometry"(Geometry,4326),
   ^
ERROR:  relation "燥坑門牌" does not exist
ERROR:  relation "燥坑門牌" does not exist
ERROR:  relation "kk1" does not exist
ERROR:  relation "燥坑門牌" does not exist
ERROR:  relation "kk1" does not exist
ERROR:  relation "燥坑門牌" does not exist
ERROR:  relation "kk1" does not exist
ERROR:  relation "燥坑門牌" does not exist
Fixing hardcoded library paths for stored procedures...
Upgrading database zaokeng...
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 3440; 0 17775 TABLE DATA kk1 
jidanni
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "kk1" 
does not exist
Command was: ALTER TABLE kk1 DISABLE TRIGGER ALL;


pg_restore: [archiver (db)] could not execute query: ERROR:  relation "kk1" 
does not exist
Command was: COPY "kk1" ("ogc_fid", "wkb_geometry", "name", "description", 
"timestamp", "begin", "end", "altitudemode", "tessellate", "ex...
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "kk1" 
does not exist
Command was: ALTER TABLE kk1 ENABLE TRIGGER ALL;


pg_restore: [archiver (db)] Error from TOC entry 3307; 0 16677 TABLE DATA 
spatial_ref_sys postgres
pg_restore: [archiver (db)] could not execute query: ERROR:  relation 
"spatial_ref_sys" does not exist
Command was: ALTER TABLE spatial_ref_sys DISABLE TRIGGER ALL;


pg_restore: [archiver (db)] could not execute query: ERROR:  relation 
"spatial_ref_sys" does not exist
Command was: COPY "spatial_ref_sys"  FROM stdin;

pg_restore: [archiver (db)] could not execute query: ERROR:  relation 
"spatial_ref_sys" does not exist
Command was: ALTER TABLE spatial_ref_sys ENABLE TRIGGER ALL;


pg_restore: [archiver (db)] Error from TOC entry 3438; 0 17763 TABLE DATA 燥坑門牌 
jidanni
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "
燥坑門牌" does not exist
Command was: ALTER TABLE "燥坑門牌" DISABLE TRIGGER ALL;


pg_restore: [archiver (db)] could not execute query: ERROR:  relation "燥坑門牌" 
does not exist
Command was: COPY "燥坑門牌" ("ogc_fid", "wkb_geometry", "name", "description", 
"timestamp", "begin", "end", "altitudemode", "tessell...
pg_restore: [archiver (db)] could not execute query: ERROR:  relation "燥坑門牌" 
does not exist
Command was: ALTER TABLE "燥坑門牌" ENABLE TRIGGER ALL;


WARNING: errors ignored on restore: 9
Analyzing database zaokeng...
Fixing hardcoded library paths for stored procedures...
Upgrading database template1...
Analyzing database template1...
Fixing hardcoded library paths for stored procedures...
Upgrading database postgres...
Analyzing database postgres...
Re-enabling connections to the old cluster...
Re-enabling connections to the new cluster...
Copying old configuration files...
Copying old start.conf...
Copying old pg_ctl.conf...
Stopping target cluster...
Redirecting stop request to systemctl
Stopping old cluster...
Redirecting stop request to systemctl
Disabling automatic startup of old cluster...
Configuring old cluster to use a different port (5433)...
Starting target cluster on the original port...
Redirecting start request to systemctl
Success. Please check that the upgraded cluster works. If it does,
you can remove the old cluster with

  pg_dropcluster 9.5 main

And I don't know what to do now.



Bug#838953: add choice to do configuration for the user

2016-09-26 Thread 積丹尼 Dan Jacobson
Or make a shell script the user can run, that will do all the steps.



Bug#838953: add choice to do configuration for the user

2016-09-26 Thread 積丹尼 Dan Jacobson
Package: postgresql-common
Version: 176
Severity: wishlist

We see:


│ Obsolete major version 9.5
 │
   │
│
   │ The PostgreSQL version 9.5 is obsolete, but the server or client packages 
are still installed. Please install the latest packages  │
   │ (postgresql-9.6 and postgresql-client-9.6) and upgrade the existing  
clusters with pg_upgradecluster (see manpage).│
   │
│
   │ Please be aware that the installation of postgresql-9.6 will automatically 
create a default cluster 9.6/main. If you want to upgrade the   │
   │ 9.5/main cluster, you need to remove the already existing 9.6 cluster 
(pg_dropcluster --stop 9.6 main, see manpage for details).   │
   │
│
   │ The old server and client packages are no longer supported. After the 
existing clusters are upgraded, the postgresql-9.5 and   │
   │ postgresql-client-9.5 packages should be removed.  
│
   │
│
   │ Please see /usr/share/doc/postgresql-common/README.Debian.gz for
   details.


Can't there be a an additional button choice added to do this all for us.