Обсуждение: postgresql log file not getting update

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

postgresql log file not getting update

От
Anson Abraham
Дата:
My postgresql-9.0-main.log file has suddenly stopped getting updated.  I do
not know why it stopped all of a sudden.  We made a slight modification
where changed in the postgresql.conf param:
From
log_connections = off
log_disconnections = off

To

log_connections = on
log_disconnections = on

I'm on a debian environment w/ version 9.0.7.  It's a single instance w/ no
cluster on here.  It was done w/a simple apt-get install back when, when it
was a fresh server (we'll call this db1)

I have an identical setup for another server (db4), and when I made the
change to the same paramers in conf, it's updating the
postgresql-9.0-main.log file.  I reverted the connections and discon from
on back to off, and did a postgresql reload as well as pg_reload_conf().
 For both servers.  db4 the log file is getting updated db1 nothing.  I
thought the file was locked or some perms may have changed and I deleted
the postgresql-9.0-main.log file. It didn't create a new log file until i
did a postgresql reload. It created the new file, but still nothing getting
written to it.

I know first thing people would say is to restart the instance, but
restarting is not an option for me in this case.

I've changed
ucommented out this param
#log_destination = 'stderr'

to be stderr, and even syslog and did a reload and nothing.


I know i should use log collector, but again, that also requires a restart
as well, unless a reload will work?

The way I reload is /etc/init.d/postgresql reload

The distro for Debian is squeeze.  Again, it works on my other server, this
server it doesn't.  Any one have any ideas, where I don't need to restart
the pg instance?
Thanks in advance.
-Anson

Re: postgresql log file not getting update

От
Anson Abraham
Дата:
*Note when I change
log_destination = 'syslog'

it does log to the syslog file.

When I changed to to log_destination = 'stderr'  still nothing logged.

commenting out doesn't do much either. I initially thought it would be a
perms thing, but when I deleted the file and did a reload, postgres created
the log file.  So not sure what is going on exactly.

Again, any help would be appreciated here to figure this out, where I don't
need to restart the db.
Thanks

On Thu, Feb 28, 2013 at 11:19 AM, Anson Abraham <anson.abraham@gmail.com>wrote:

> My postgresql-9.0-main.log file has suddenly stopped getting updated.  I
> do not know why it stopped all of a sudden.  We made a slight modification
> where changed in the postgresql.conf param:
> From
> log_connections = off
> log_disconnections = off
>
> To
>
> log_connections = on
> log_disconnections = on
>
> I'm on a debian environment w/ version 9.0.7.  It's a single instance w/
> no cluster on here.  It was done w/a simple apt-get install back when, when
> it was a fresh server (we'll call this db1)
>
> I have an identical setup for another server (db4), and when I made the
> change to the same paramers in conf, it's updating the
> postgresql-9.0-main.log file.  I reverted the connections and discon from
> on back to off, and did a postgresql reload as well as pg_reload_conf().
>  For both servers.  db4 the log file is getting updated db1 nothing.  I
> thought the file was locked or some perms may have changed and I deleted
> the postgresql-9.0-main.log file. It didn't create a new log file until i
> did a postgresql reload. It created the new file, but still nothing getting
> written to it.
>
> I know first thing people would say is to restart the instance, but
> restarting is not an option for me in this case.
>
> I've changed
> ucommented out this param
> #log_destination = 'stderr'
>
> to be stderr, and even syslog and did a reload and nothing.
>
>
> I know i should use log collector, but again, that also requires a restart
> as well, unless a reload will work?
>
> The way I reload is /etc/init.d/postgresql reload
>
> The distro for Debian is squeeze.  Again, it works on my other server,
> this server it doesn't.  Any one have any ideas, where I don't need to
> restart the pg instance?
> Thanks in advance.
> -Anson
>

Re: postgresql log file not getting update

От
Chris
Дата:
On Feb 28, 2013, at 19:01, Anson Abraham <anson.abraham@gmail.com> wrote:

> *Note when I change=20
> log_destination =3D 'syslog'
>=20
> it does log to the syslog file.
>=20
> When I changed to to log_destination =3D 'stderr'  still nothing logged.
>=20
> commenting out doesn't do much either. I initially thought it would be a p=
erms thing, but when I deleted the file and did a reload, postgres created t=
he log file.  So not sure what is going on exactly.
>=20
> Again, any help would be appreciated here to figure this out, where I don'=
t need to restart the db.
> Thanks
>=20
> On Thu, Feb 28, 2013 at 11:19 AM, Anson Abraham <anson.abraham@gmail.com> w=
rote:
>> My postgresql-9.0-main.log file has suddenly stopped getting updated.  I d=
o not know why it stopped all of a sudden.  We made a slight modification=20=

>> where changed in the postgresql.conf param:=20
>> From
>> log_connections =3D off
>> log_disconnections =3D off
>>=20
>> To
>>=20
>> log_connections =3D on
>> log_disconnections =3D on
>>=20
>> I'm on a debian environment w/ version 9.0.7.  It's a single instance w/ n=
o cluster on here.  It was done w/a simple apt-get install back when, when i=
t was a fresh server (we'll call this db1)
>>=20
>> I have an identical setup for another server (db4), and when I made the c=
hange to the same paramers in conf, it's updating the postgresql-9.0-main.lo=
g file.  I reverted the connections and discon from on back to off, and did a=
 postgresql reload as well as pg_reload_conf().  For both servers.  db4 the l=
og file is getting updated db1 nothing.  I thought the file was locked or so=
me perms may have changed and I deleted the postgresql-9.0-main.log file. It=
 didn't create a new log file until i did a postgresql reload. It created th=
e new file, but still nothing getting written to it.
>>=20
>> I know first thing people would say is to restart the instance, but resta=
rting is not an option for me in this case.
>>=20
>> I've changed
>> ucommented out this param
>> #log_destination =3D 'stderr'
>>=20
>> to be stderr, and even syslog and did a reload and nothing.
>>=20
>>=20
>> I know i should use log collector, but again, that also requires a restar=
t as well, unless a reload will work?
>>=20
>> The way I reload is /etc/init.d/postgresql reload
>>=20
>> The distro for Debian is squeeze.  Again, it works on my other server, th=
is server it doesn't.  Any one have any ideas, where I don't need to restart=
 the pg instance?

=46rom the bin directory you can do: pg_ctl reload -D (followed by the data d=
ierctory)
>> Thanks in advance.
>> -Anson
>=20

Re: postgresql log file not getting update

От
Anson Abraham
Дата:
how is that different from
/etc/init.d/postgres reload or for that matter select pg_reload_conf() ?

Which I execute both and they don't work either.

On Thu, Feb 28, 2013 at 12:43 PM, Chris <chris@eisonline.co.za> wrote:

>
>
> On Feb 28, 2013, at 19:01, Anson Abraham <anson.abraham@gmail.com> wrote:
>
> *Note when I change
> log_destination = 'syslog'
>
> it does log to the syslog file.
>
> When I changed to to log_destination = 'stderr'  still nothing logged.
>
> commenting out doesn't do much either. I initially thought it would be a
> perms thing, but when I deleted the file and did a reload, postgres created
> the log file.  So not sure what is going on exactly.
>
> Again, any help would be appreciated here to figure this out, where I
> don't need to restart the db.
> Thanks
>
> On Thu, Feb 28, 2013 at 11:19 AM, Anson Abraham <anson.abraham@gmail.com>wrote:
>
>> My postgresql-9.0-main.log file has suddenly stopped getting updated.  I
>> do not know why it stopped all of a sudden.  We made a slight modification
>> where changed in the postgresql.conf param:
>> From
>> log_connections = off
>> log_disconnections = off
>>
>> To
>>
>> log_connections = on
>> log_disconnections = on
>>
>> I'm on a debian environment w/ version 9.0.7.  It's a single instance w/
>> no cluster on here.  It was done w/a simple apt-get install back when, when
>> it was a fresh server (we'll call this db1)
>>
>> I have an identical setup for another server (db4), and when I made the
>> change to the same paramers in conf, it's updating the
>> postgresql-9.0-main.log file.  I reverted the connections and discon from
>> on back to off, and did a postgresql reload as well as pg_reload_conf().
>>  For both servers.  db4 the log file is getting updated db1 nothing.  I
>> thought the file was locked or some perms may have changed and I deleted
>> the postgresql-9.0-main.log file. It didn't create a new log file until i
>> did a postgresql reload. It created the new file, but still nothing getting
>> written to it.
>>
>> I know first thing people would say is to restart the instance, but
>> restarting is not an option for me in this case.
>>
>> I've changed
>> ucommented out this param
>> #log_destination = 'stderr'
>>
>> to be stderr, and even syslog and did a reload and nothing.
>>
>>
>> I know i should use log collector, but again, that also requires a
>> restart as well, unless a reload will work?
>>
>> The way I reload is /etc/init.d/postgresql reload
>>
>> The distro for Debian is squeeze.  Again, it works on my other server,
>> this server it doesn't.  Any one have any ideas, where I don't need to
>> restart the pg instance?
>>
>
> From the bin directory you can do: pg_ctl reload -D (followed by the data
> dierctory)
>
> Thanks in advance.
>> -Anson
>>
>
>

Re: postgresql log file not getting update

От
Adrian Klaver
Дата:
On 02/28/2013 08:19 AM, Anson Abraham wrote:
> My postgresql-9.0-main.log file has suddenly stopped getting updated.  I
> do not know why it stopped all of a sudden.  We made a slight modification
> where changed in the postgresql.conf param:
> From
> log_connections = off
> log_disconnections = off
>
> To
>
> log_connections = on
> log_disconnections = on
>
> I'm on a debian environment w/ version 9.0.7.  It's a single instance w/
> no cluster on here.  It was done w/a simple apt-get install back when,
> when it was a fresh server (we'll call this db1)
>
> I have an identical setup for another server (db4), and when I made the
> change to the same paramers in conf, it's updating the
> postgresql-9.0-main.log file.  I reverted the connections and discon
> from on back to off, and did a postgresql reload as well
> as pg_reload_conf().  For both servers.  db4 the log file is getting
> updated db1 nothing.  I thought the file was locked or some perms may
> have changed and I deleted the postgresql-9.0-main.log file. It didn't
> create a new log file until i did a postgresql reload. It created the
> new file, but still nothing getting written to it.
>
> I know first thing people would say is to restart the instance, but
> restarting is not an option for me in this case.
>
> I've changed
> ucommented out this param
> #log_destination = 'stderr'
>
> to be stderr, and even syslog and did a reload and nothing.
>
>
> I know i should use log collector, but again, that also requires a
> restart as well, unless a reload will work?
>
> The way I reload is /etc/init.d/postgresql reload
>
> The distro for Debian is squeeze.  Again, it works on my other server,
> this server it doesn't.  Any one have any ideas, where I don't need to
> restart the pg instance?
> Thanks in advance.

Just so I can follow, what are you defining as a server?
Or to put it another way, are db1, db4 separate machines?
Are you sure that a another instance of Postgres did not slip in during
an upgrade?

> -Anson


--
Adrian Klaver
adrian.klaver@gmail.com

Re: postgresql log file not getting update

От
Anson Abraham
Дата:
db1 and db4 are 2 separate machines.  no other instances of PG running on
the box, doing a pg_ctl reload did nothing as well.
Also looking @ all proecsses running, only PG instance on the box.

On Thu, Feb 28, 2013 at 2:27 PM, Adrian Klaver <adrian.klaver@gmail.com>wrote:

> On 02/28/2013 08:19 AM, Anson Abraham wrote:
>
>> My postgresql-9.0-main.log file has suddenly stopped getting updated.  I
>> do not know why it stopped all of a sudden.  We made a slight modification
>> where changed in the postgresql.conf param:
>> From
>> log_connections = off
>> log_disconnections = off
>>
>> To
>>
>> log_connections = on
>> log_disconnections = on
>>
>> I'm on a debian environment w/ version 9.0.7.  It's a single instance w/
>> no cluster on here.  It was done w/a simple apt-get install back when,
>> when it was a fresh server (we'll call this db1)
>>
>> I have an identical setup for another server (db4), and when I made the
>> change to the same paramers in conf, it's updating the
>> postgresql-9.0-main.log file.  I reverted the connections and discon
>> from on back to off, and did a postgresql reload as well
>> as pg_reload_conf().  For both servers.  db4 the log file is getting
>> updated db1 nothing.  I thought the file was locked or some perms may
>> have changed and I deleted the postgresql-9.0-main.log file. It didn't
>> create a new log file until i did a postgresql reload. It created the
>> new file, but still nothing getting written to it.
>>
>> I know first thing people would say is to restart the instance, but
>> restarting is not an option for me in this case.
>>
>> I've changed
>> ucommented out this param
>> #log_destination = 'stderr'
>>
>> to be stderr, and even syslog and did a reload and nothing.
>>
>>
>> I know i should use log collector, but again, that also requires a
>> restart as well, unless a reload will work?
>>
>> The way I reload is /etc/init.d/postgresql reload
>>
>> The distro for Debian is squeeze.  Again, it works on my other server,
>> this server it doesn't.  Any one have any ideas, where I don't need to
>> restart the pg instance?
>> Thanks in advance.
>>
>
> Just so I can follow, what are you defining as a server?
> Or to put it another way, are db1, db4 separate machines?
> Are you sure that a another instance of Postgres did not slip in during an
> upgrade?
>
>  -Anson
>>
>
>
> --
> Adrian Klaver
> adrian.klaver@gmail.com
>

Re: postgresql log file not getting update

От
Adrian Klaver
Дата:
On 02/28/2013 11:58 AM, Anson Abraham wrote:
> db1 and db4 are 2 separate machines.  no other instances of PG running
> on the box, doing a pg_ctl reload did nothing as well.
> Also looking @ all proecsses running, only PG instance on the box.
>

I thought this sounded familiar, this is a reprise of the question you
asked back in January? I know you say have only one cluster installed.
Have you looked to see if the pg_cluster command is installed?


--
Adrian Klaver
adrian.klaver@gmail.com

Re: postgresql log file not getting update

От
Anson Abraham
Дата:
oh yeah, i did ask this question.  I had forgotten, and was hadnling other
things.  when you say cluster are you asking if there are multiple
instances on the hardware.

There's only one instance running, and has been for some time.  Our other
physical server which is identical server and postgres but different db's
has no issues.  I've been going in and making exact changes and to that
server(server B), and no issues writing to the postgresql-9.0-main.log file
located in /var/log/postgres/

on Server A which is the issue, doesn't write to it, but when I change
to log_destination
to stderr doesn't work, however syslog does.  By that i assumed then that
it must've been a perms issue, but doesn't look to be the case.  Heck i
even put the file and folder as chmod 777 and still nothing.

On Thu, Feb 28, 2013 at 3:16 PM, Adrian Klaver <adrian.klaver@gmail.com>wrote:

> On 02/28/2013 11:58 AM, Anson Abraham wrote:
>
>> db1 and db4 are 2 separate machines.  no other instances of PG running
>> on the box, doing a pg_ctl reload did nothing as well.
>> Also looking @ all proecsses running, only PG instance on the box.
>>
>>
> I thought this sounded familiar, this is a reprise of the question you
> asked back in January? I know you say have only one cluster installed. Have
> you looked to see if the pg_cluster command is installed?
>
>
> --
> Adrian Klaver
> adrian.klaver@gmail.com
>

Re: postgresql log file not getting update

От
Adrian Klaver
Дата:
On 02/28/2013 12:58 PM, Anson Abraham wrote:
> oh yeah, i did ask this question.  I had forgotten, and was hadnling
> other things.  when you say cluster are you asking if there are multiple
> instances on the hardware.
>

Aah, tells you how long since I used Debian, the command is actually
pg_wrapper. My guess it is installed on your machine. My guess is also
that you will need to use it to reload the log configuration. It is
installed do man pg_wrapper to get usage instructions.



--
Adrian Klaver
adrian.klaver@gmail.com