A question about upgrading on Debian/Ubuntu

Поиск
Список
Период
Сортировка
Искать

A question about upgrading on Debian/Ubuntu

От:
stan <stanb@panix.com>
Дата:
I upgraded successfully on our test machine from V11 to V12 the other day.
Now it is time to upgrade the production machine. One f the lessons
learned in doing this is to do "make install" on all the extensions used
in the existing DB before doing the pg_dropcluster. 

On the production machine I am confused by the state of the V12 server:

If I do sudo apt-get install postgresql-12 I get a message about this
package being marked to be "manually installed: pg_lsclusters reports on a
version 11 instance:

stan@smokey:~/src/pgemailaddr-master$ pg_lsclusters
Ver Cluster Port Status Owner    Data directory              Log file
11  main    5432 online postgres /var/lib/postgresql/11/main
/var/log/postgresql/postgresql-11-main.log

And when I do a "make install" on one of the extensions, it installs in
the V11 location.

What do I need to do to get the V12 server package correctly installed?

Thanks, in advance.
-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
						-- Benjamin Franklin


Re: A question about upgrading on Debian/Ubuntu

От:
Adrian Klaver <adrian.klaver@aklaver.com>
Дата:
On 12/10/19 3:21 AM, stan wrote:
> I upgraded successfully on our test machine from V11 to V12 the other day.

The below indicates that this is not the case.

> Now it is time to upgrade the production machine. One f the lessons
> learned in doing this is to do "make install" on all the extensions used
> in the existing DB before doing the pg_dropcluster.

If you are installing from packages then a good deal of the extensions 
should be in postgresql-contrib and you do not have to do make install.

Do you have packages that come from outside contrib?:

https://www.postgresql.org/docs/12/contrib.html

> 
> On the production machine I am confused by the state of the V12 server:
> 
> If I do sudo apt-get install postgresql-12 I get a message about this
> package being marked to be "manually installed: pg_lsclusters reports on a
> version 11 instance:

Do have?:

/etc/postgresql/12/

> 
> stan@smokey:~/src/pgemailaddr-master$ pg_lsclusters
> Ver Cluster Port Status Owner    Data directory              Log file
> 11  main    5432 online postgres /var/lib/postgresql/11/main
> /var/log/postgresql/postgresql-11-main.log
> 
> And when I do a "make install" on one of the extensions, it installs in
> the V11 location.

Lets first see what you have for a 12 install before tackling that.

> 
> What do I need to do to get the V12 server package correctly installed?
> 
> Thanks, in advance.
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com


Re: A question about upgrading on Debian/Ubuntu

От:
stan <stanb@panix.com>
Дата:

On Tue, Dec 10, 2019 at 07:46:02AM -0800, Adrian Klaver wrote:
> On 12/10/19 3:21 AM, stan wrote:
> > I upgraded successfully on our test machine from V11 to V12 the other day.
> 
> The below indicates that this is not the case.
> 
> > Now it is time to upgrade the production machine. One f the lessons
> > learned in doing this is to do "make install" on all the extensions used
> > in the existing DB before doing the pg_dropcluster.
> 
> If you are installing from packages then a good deal of the extensions
> should be in postgresql-contrib and you do not have to do make install.

It is installed:

dpkg -l 
ii  postgresql-contrib      
> 
> Do you have packages that come from outside contrib?:
> 
> https://www.postgresql.org/docs/12/contrib.html

Yes, pgemailaddr is one.
> 
> > 
> > On the production machine I am confused by the state of the V12 server:
> > 
> > If I do sudo apt-get install postgresql-12 I get a message about this
> > package being marked to be "manually installed: pg_lsclusters reports on a
> > version 11 instance:
> 
> Do have?:
> 
> /etc/postgresql/12/

Yes, I do.
> 
> > 
> > stan@smokey:~/src/pgemailaddr-master$ pg_lsclusters
> > Ver Cluster Port Status Owner    Data directory              Log file
> > 11  main    5432 online postgres /var/lib/postgresql/11/main
> > /var/log/postgresql/postgresql-11-main.log
> > 
> > And when I do a "make install" on one of the extensions, it installs in
> > the V11 location.
> 
> Lets first see what you have for a 12 install before tackling that.
> 
Script started on 2019-12-10 16:09:59+0000
]0;stan@ica-db: ~stan@ica-db:~$ 
]0;stan@ica-db: ~stan@ica-db:~$ dpkg-query -l postgresql*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (StatusErr: uppercase=bad)
||/ Name                                  Version                 Architecture            Description
+++-=====================================-=======================-=======================-================================================================================
ii  postgresql                            12+210.pgdg18.04+1      all                     object-relational SQL database (supported version)
un  postgresql-10                                                             (no description available)
un  postgresql-10-pgagent                                                     (no description available)
ii  postgresql-11                         11.6-1.pgdg18.04+1      amd64                   object-relational SQL database version 11 server
un  postgresql-11-citus                                                       (no description available)
un  postgresql-11-cron                                                        (no description available)
un  postgresql-11-pgagent                                                     (no description available)
un  postgresql-11-pgextwlist                                                  (no description available)
un  postgresql-11-pglogical                                                   (no description available)
un  postgresql-11-plsh                                                        (no description available)
un  postgresql-11-rum                                                         (no description available)
un  postgresql-11-wal2json                                                    (no description available)
ii  postgresql-12                         12.1-1.pgdg18.04+1      amd64                   object-relational SQL database version 12 server
un  postgresql-12-pgagent                                                     (no description available)
un  postgresql-9.1                                                            (no description available)
un  postgresql-9.4                                                            (no description available)
un  postgresql-9.4-pgagent                                                    (no description available)
un  postgresql-9.5                                                            (no description available)
un  postgresql-9.5-pgagent                                                    (no description available)
un  postgresql-9.6                                                            (no description available)
un  postgresql-9.6-pgagent                                                    (no description available)
un  postgresql-client                                                         (no description available)
ii  postgresql-client-11                  11.6-1.pgdg18.04+1      amd64                   front-end programs for PostgreSQL 11
ii  postgresql-client-12                  12.1-1.pgdg18.04+1      amd64                   front-end programs for PostgreSQL 12
ii  postgresql-client-common              210.pgdg18.04+1         all                     manager for multiple PostgreSQL client versions
ii  postgresql-common                     210.pgdg18.04+1         all                     PostgreSQL database-cluster manager
ii  postgresql-contrib                    12+210.pgdg18.04+1      all                     additional facilities for PostgreSQL (supported version)
un  postgresql-contrib-11                                                     (no description available)
un  postgresql-contrib-12                                                     (no description available)
un  postgresql-doc                                                            (no description available)
un  postgresql-doc-11                                                         (no description available)
un  postgresql-doc-12                                                         (no description available)
ii  postgresql-server-dev-11              11.6-1.pgdg18.04+1      amd64                   development files for PostgreSQL 11 server-side programming
un  postgresql-server-dev-all                                                 (no description available)
]0;stan@ica-db: ~stan@ica-db:~$ exit

Script done on 2019-12-10 16:10:19+0000

-- 
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
						-- Benjamin Franklin


Re: A question about upgrading on Debian/Ubuntu

От:
Adrian Klaver <adrian.klaver@aklaver.com>
Дата:
On 12/10/19 8:14 AM, stan wrote:
> 
> On Tue, Dec 10, 2019 at 07:46:02AM -0800, Adrian Klaver wrote:
>> On 12/10/19 3:21 AM, stan wrote:
>>> I upgraded successfully on our test machine from V11 to V12 the other day.
>>
>> The below indicates that this is not the case.
>>
>>> Now it is time to upgrade the production machine. One f the lessons
>>> learned in doing this is to do "make install" on all the extensions used
>>> in the existing DB before doing the pg_dropcluster.
>>
>> If you are installing from packages then a good deal of the extensions
>> should be in postgresql-contrib and you do not have to do make install.
> 
> It is installed:
> 
> dpkg -l
> ii  postgresql-contrib
>>
>> Do you have packages that come from outside contrib?:
>>
>> https://www.postgresql.org/docs/12/contrib.html
> 
> Yes, pgemailaddr is one.


https://github.com/petere/pgemailaddr

Installation

To build and install this module:

make
make install

**--> or selecting a specific PostgreSQL installation:

make PG_CONFIG=/some/where/bin/pg_config
make PG_CONFIG=/some/where/bin/pg_config install



-- 
Adrian Klaver
adrian.klaver@aklaver.com


FAQ