Thread: pg_upgrade + Ubuntu

pg_upgrade + Ubuntu

From
"Joshua D. Drake"
Date:
Hackers,

Simple problem (I think):

9.4 version of pg_upgrade said:
 "/usr/lib/postgresql/9.4/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D 
"/var/lib/postgresql/9.4/main" -o "-p 9400 -b -c synchronous_commit=off 
-c fsync=off -c full_page_writes=off  -c listen_addresses='' -c 
unix_socket_permissions=0700 -c 
unix_socket_directories='/var/lib/postgresql'" start

postgres cannot access the server configuration file 
"/var/lib/postgresql/9.4/main/postgresql.conf": No such file or directory

The issue is Debian/Ubuntu etc... don't have a postgresql.conf in the 
cluster. They keep it separately in /etc/postgresql.

Could we get a flag that allows us to specifically point to where the 
conf filesare?

JD
-- 
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.



Re: pg_upgrade + Ubuntu

From
Mike Blackwell
Date:
Does pg_config show the correct location?  If so, perhaps pg_upgrade could get the .conf location the same way rather than requiring a command line option.

__________________________________________________________________________________
Mike Blackwell | Technical Analyst, Distribution Services/Rollout Management | RR Donnelley
1750 Wallace Ave | St Charles, IL 60174-3401
Office: 630.313.7818
Mike.Blackwell@rrd.com
http://www.rrdonnelley.com



On Fri, Jul 10, 2015 at 12:40 PM, Joshua D. Drake <jd@commandprompt.com> wrote:

Hackers,

Simple problem (I think):

9.4 version of pg_upgrade said:

 "/usr/lib/postgresql/9.4/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "/var/lib/postgresql/9.4/main" -o "-p 9400 -b -c synchronous_commit=off -c fsync=off -c full_page_writes=off  -c listen_addresses='' -c unix_socket_permissions=0700 -c unix_socket_directories='/var/lib/postgresql'" start

postgres cannot access the server configuration file "/var/lib/postgresql/9.4/main/postgresql.conf": No such file or directory

The issue is Debian/Ubuntu etc... don't have a postgresql.conf in the cluster. They keep it separately in /etc/postgresql.

Could we get a flag that allows us to specifically point to where the conf filesare?

JD
--
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Re: pg_upgrade + Ubuntu

From
"Joshua D. Drake"
Date:
On 07/10/2015 11:01 AM, Mike Blackwell wrote:
> Does pg_config show the correct location?  If so, perhaps pg_upgrade
> could get the .conf location the same way rather than requiring a
> command line option.

Good idea but:

postgres@ly19:~$ pg_config
You need to install postgresql-server-dev-X.Y for building a server-side 
extension or libpq-dev for building a client-side application.


Which is worse having to install yet another package or having a command 
line option?

Sincerely,

JD

-- 
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.



Re: pg_upgrade + Ubuntu

From
Alvaro Herrera
Date:
Joshua D. Drake wrote:
> 
> On 07/10/2015 11:01 AM, Mike Blackwell wrote:
> >Does pg_config show the correct location?  If so, perhaps pg_upgrade
> >could get the .conf location the same way rather than requiring a
> >command line option.
> 
> Good idea but:
> 
> postgres@ly19:~$ pg_config
> You need to install postgresql-server-dev-X.Y for building a server-side
> extension or libpq-dev for building a client-side application.
> 
> Which is worse having to install yet another package or having a command
> line option?

It seems to me that this is a Debian packaging issue, not an upstream
issue, isn't it?  If you want to fix the problem in this way, then
surely whatever package contains pg_upgrade should also contain
pg_config.

Why are you not using pg_upgradecluster anyway?  There's a mode to use
pg_upgrade there.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: pg_upgrade + Ubuntu

From
Mike Blackwell
Date:
On Fri, Jul 10, 2015 at 2:10 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Joshua D. Drake wrote:
>
> On 07/10/2015 11:01 AM, Mike Blackwell wrote:
> >Does pg_config show the correct location?  
> Good idea but:
>
> postgres@ly19:~$ pg_config
> You need to install postgresql-server-dev-X.Y for building a server-side
> extension or libpq-dev for building a client-side application.
>
> Which is worse having to install yet another package or having a command
> line option?

It seems to me that this is a Debian packaging issue, not an upstream
issue, isn't it?  If you want to fix the problem in this way, then
surely whatever package contains pg_upgrade should also contain
pg_config.


​Indeed.  An interesting packaging choice.  I'd think it belongs to an admin
category along with pg_upgrade, pg_dump, etc., rather than a development
package.  Surely it could be useful for admin scripts?

__________________________________________________________________________________
Mike Blackwell | Technical Analyst, Distribution Services/Rollout Management | RR Donnelley
1750 Wallace Ave | St Charles, IL 60174-3401
Office: 630.313.7818
Mike.Blackwell@rrd.com
http://www.rrdonnelley.com

Re: pg_upgrade + Ubuntu

From
"Joshua D. Drake"
Date:
On 07/10/2015 12:10 PM, Alvaro Herrera wrote:

> It seems to me that this is a Debian packaging issue, not an upstream
> issue, isn't it?  If you want to fix the problem in this way, then
> surely whatever package contains pg_upgrade should also contain
> pg_config.
>
> Why are you not using pg_upgradecluster anyway?  There's a mode to use
> pg_upgrade there.
>

Ignorance. I still remember pg_upgradecluster from the pg_dumpall days.

JD


-- 
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.



Re: pg_upgrade + Ubuntu

From
Jim Nasby
Date:
On 7/10/15 2:20 PM, Mike Blackwell wrote:
>     > postgres@ly19:~$ pg_config
>     > You need to install postgresql-server-dev-X.Y for building a server-side
>     > extension or libpq-dev for building a client-side application.
>     >
>     > Which is worse having to install yet another package or having a command
>     > line option?
>
>     It seems to me that this is a Debian packaging issue, not an upstream
>     issue, isn't it?  If you want to fix the problem in this way, then
>     surely whatever package contains pg_upgrade should also contain
>     pg_config.
>
>
> ​Indeed.  An interesting packaging choice.  I'd think it belongs to an admin
> category along with pg_upgrade, pg_dump, etc., rather than a development
> package.  Surely it could be useful for admin scripts?

What makes it far worse is that pg_config isn't wrapped like the rest of 
the tools are. So you can only have one "development" package installed 
at once. We've pushed to change this to no effect. :/
-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Data in Trouble? Get it in Treble! http://BlueTreble.com