Обсуждение: Issue with postgresql-9.4 init.d script

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

Issue with postgresql-9.4 init.d script

От
Hima Mahi
Дата:
Hi,

Earlier in 9.2 version, init.d script was exporting and using PGPORT for db server start. In 9.4 that option has been removed. It creates issue in case if some other PGPORT variable is set to some value. Then it uses thats value and fails to start.

Regards,
Himanchali.

Re: Issue with postgresql-9.4 init.d script

От
Jeff Frost
Дата:

On Aug 20, 2015, at 4:06 AM, Hima Mahi <himamahi09@gmail.com> wrote:

Earlier in 9.2 version, init.d script was exporting and using PGPORT for db server start. In 9.4 that option has been removed. It creates issue in case if some other PGPORT variable is set to some value. Then it uses thats value and fails to start.

I think our opinion with that change was that people should be setting the port in the postgresql.conf file.

Re: Issue with postgresql-9.4 init.d script

От
Hima Mahi
Дата:
Hi,

Please avoid my last mail. The port was commented in postgresql.conf, that's why it was not picking from there. On uncommenting it , its overriding PGPORT and working fine.

On Thu, Aug 20, 2015 at 8:08 PM, Hima Mahi <himamahi09@gmail.com> wrote:
The issue is if some other application has set PGPORT in environment variable, it reads that. It doesn't check the port mentioned in postgresql.conf. 
For example in my case, We have PostgresPlus advanced server setup on some port and this variable is set. Now , postgresql 9.4 is reading that variable and not the port mentioned in postgresql.conf. Thus , server start fails.

On Thu, Aug 20, 2015 at 8:04 PM, Jeff Frost <jeff@pgexperts.com> wrote:

On Aug 20, 2015, at 4:06 AM, Hima Mahi <himamahi09@gmail.com> wrote:

Earlier in 9.2 version, init.d script was exporting and using PGPORT for db server start. In 9.4 that option has been removed. It creates issue in case if some other PGPORT variable is set to some value. Then it uses thats value and fails to start.

I think our opinion with that change was that people should be setting the port in the postgresql.conf file.



Re: Issue with postgresql-9.4 init.d script

От
Hima Mahi
Дата:
The issue is if some other application has set PGPORT in environment variable, it reads that. It doesn't check the port mentioned in postgresql.conf. 
For example in my case, We have PostgresPlus advanced server setup on some port and this variable is set. Now , postgresql 9.4 is reading that variable and not the port mentioned in postgresql.conf. Thus , server start fails.

On Thu, Aug 20, 2015 at 8:04 PM, Jeff Frost <jeff@pgexperts.com> wrote:

On Aug 20, 2015, at 4:06 AM, Hima Mahi <himamahi09@gmail.com> wrote:

Earlier in 9.2 version, init.d script was exporting and using PGPORT for db server start. In 9.4 that option has been removed. It creates issue in case if some other PGPORT variable is set to some value. Then it uses thats value and fails to start.

I think our opinion with that change was that people should be setting the port in the postgresql.conf file.


Re: Issue with postgresql-9.4 init.d script

От
Devrim GÜNDÜZ
Дата:
Hi,

On Thu, 2015-08-20 at 20:08 +0530, Hima Mahi wrote:
> The issue is if some other application has set PGPORT in environment
> variable, it reads that. It doesn't check the port mentioned in
> postgresql.conf.
> For example in my case, We have PostgresPlus advanced server setup on
> some port and this variable is set. Now , postgresql 9.4 is reading
> that variable and not the port mentioned in postgresql.conf. Thus ,
> server start fails.

That is EDB's preference over packaging. We removed that intentionally,
because people had to change in two places at some point.

So just change the port in postgresql.conf -- that is all.

Regards,

--
Devrim GÜNDÜZ
Principal Systems Engineer @ EnterpriseDB: http://www.enterprisedb.com
PostgreSQL Danışmanı/Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR