Обсуждение: persistent 'psql: FATAL: "listen_addresses" cannot be changed after server start

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

persistent 'psql: FATAL: "listen_addresses" cannot be changed after server start

От
"David Rovner"
Дата:

Hello,

 

I have searched the archives database, with no luck.

 

After some network configuration changes (IP changes and some editing to config files which may have been interrupted buy shutdowns), I cannot get past this error:

 

'psql: FATAL: "listen_addresses" cannot be changed after server start

 

I rename the data directory, and do a new “service postgresql initdb”. Still the error is persistent. Shutdown, no change.

 

As if there is some lingering filelock somewhere???

 

Please help. I am considering re-installing, but would rather not….

 

Thanks,

 

Dave Rovner

Princeton Server Group

 

Re: persistent 'psql: FATAL: "listen_addresses" cannot be changed after server start

От
Steve Crawford
Дата:
David Rovner wrote:

>...
> After some network configuration changes (IP changes and some editing to
> config files which may have been interrupted buy shutdowns), I cannot
> get past this error:

That's a bit vague. What changed externally with your network? What
files were you changing and what were you changing in them? What do you
mean by "may have been interrupted buy shutdowns" - were the changes
made or not? Did you restart the server and was it a full reboot or just
postgresql?


> 'psql: FATAL: "listen_addresses" cannot be changed after server start

Where do you see this error? The statement is true - listen addresses is
a parameter that can only be set when the PostgreSQL server starts.
Trying to change the parameter from, say, psql by running
"set listen_addresses to '*';" will yield this error. Could there be a
script that generates such a command?

Cheers,
Steve


Re: persistent 'psql: FATAL: "listen_addresses" cannot be changed after server start

От
"David Rovner"
Дата:
David Rovner wrote:

>>...
>> After some network configuration changes (IP changes and some editing
to
>> config files which may have been interrupted buy shutdowns), I cannot
>> get past this error:

>That's a bit vague. What changed externally with your network? What
>files were you changing and what were you changing in them? What do you
>mean by "may have been interrupted buy shutdowns" - were the changes
>made or not? Did you restart the server and was it a full reboot or
just
>postgresql?

The IP, the subnet, and nameserver address changed. The admin (not
responsible for postgres) doing the changes has left the company (3 days
ago). I am testing postgres for use in a slony replication scheme. The
postgresql.conf and the pg_hba.conf files were being modified (this may
be irrelevant, I don't know). I have done restarts on postgres, and
complete shutdown. No change. I have renamed the db directory (this is a
test database) in order to force an initdb. And still no change.

>> 'psql: FATAL: "listen_addresses" cannot be changed after server start

>Where do you see this error? The statement is true - listen addresses
is
>a parameter that can only be set when the PostgreSQL server starts.
>Trying to change the parameter from, say, psql by running
>"set listen_addresses to '*';" will yield this error. Could there be a
>script that generates such a command?

I cannot execute any psql commands from root.
I see this error at the command prompt in root executing anything that
starts with "psql". The argument list does not matter. "psql" with no
arguments returns this error as well.

>Cheers,
>Steve

Dave

Re: persistent 'psql: FATAL: "listen_addresses" cannot be changed after server start

От
Tom Lane
Дата:
"David Rovner" <DRovner@princetonservergroup.com> writes:
> I see this error at the command prompt in root executing anything that
> starts with "psql". The argument list does not matter. "psql" with no
> arguments returns this error as well.

PGOPTIONS environment variable, perhaps?  It's hard to imagine why
anyone would try to set listen_addresses that way, but ...

$ PGOPTIONS='--listen_addresses=*' psql
psql: FATAL:  parameter "listen_addresses" cannot be changed after server start
$
            regards, tom lane

Re: persistent 'psql: FATAL: "listen_addresses" cannot be changed after server start

От
"David Rovner"
Дата:
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Wednesday, October 10, 2007 10:02 AM
> To: David Rovner
> Cc: Steve Crawford; pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] persistent 'psql: FATAL: "listen_addresses"
cannot be
> changed after server start
>
> "David Rovner" <DRovner@princetonservergroup.com> writes:
> > I see this error at the command prompt in root executing anything
that
> > starts with "psql". The argument list does not matter. "psql" with
no
> > arguments returns this error as well.
>
> PGOPTIONS environment variable, perhaps?  It's hard to imagine why
> anyone would try to set listen_addresses that way, but ...
>
> $ PGOPTIONS='--listen_addresses=*' psql
> psql: FATAL:  parameter "listen_addresses" cannot be changed after
server
> start
> $
>             regards, tom lane

PGOPTIONS is set to -i

Dave

Re: persistent 'psql: FATAL: "listen_addresses" cannot be changed after server start

От
"David Rovner"
Дата:
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Wednesday, October 10, 2007 10:02 AM
> To: David Rovner
> Cc: Steve Crawford; pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] persistent 'psql: FATAL: "listen_addresses"
cannot be
> changed after server start
>
> "David Rovner" <DRovner@princetonservergroup.com> writes:
> > I see this error at the command prompt in root executing anything
that
> > starts with "psql". The argument list does not matter. "psql" with
no
> > arguments returns this error as well.
>
> PGOPTIONS environment variable, perhaps?  It's hard to imagine why
> anyone would try to set listen_addresses that way, but ...
>
> $ PGOPTIONS='--listen_addresses=*' psql
> psql: FATAL:  parameter "listen_addresses" cannot be changed after
server
> start
> $
>             regards, tom lane

Perhaps if I knew what conditions cause the "psql" call to report the
error no matter what arguments are listed, that might lead to an answer.
Is there a hidden file or entry in a config file that forces this
condition with postgres running?

Dave

Re: persistent 'psql: FATAL: "listen_addresses" cannot be changed after server start

От
Tom Lane
Дата:
"David Rovner" <DRovner@princetonservergroup.com> writes:
> PGOPTIONS is set to -i

Well, that's equivalent to --listen_addresses=*, so that's your problem.

            regards, tom lane

Re: persistent 'psql: FATAL: "listen_addresses" cannot be changed after server start

От
"David Rovner"
Дата:
> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Wednesday, October 10, 2007 10:57 AM
> To: David Rovner
> Cc: Steve Crawford; pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] persistent 'psql: FATAL: "listen_addresses"
cannot be
> changed after server start
>
> "David Rovner" <DRovner@princetonservergroup.com> writes:
> > PGOPTIONS is set to -i
>
> Well, that's equivalent to --listen_addresses=*, so that's your
problem.
>
>             regards, tom lane

Yes. Found it. My .bash_profile had PGOPTIONS set to -i. Some leftover
debug before I started using the "service postgresql start" methods.
There had been a 2 month gap since I've been on the box with that
change.

Thanks for all your help!

Dave