pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Postmaster log perms and line suffix
4+ messages / 4 participants
[nested] [flat]

* Postmaster log perms and line suffix
@ 2006-04-26 16:39 Jerry Sievers <jerry@jerrysievers.com>
  2006-04-26 20:37 ` Re: Postmaster log perms and line suffix Chris Hoover <revoohc@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Jerry Sievers @ 2006-04-26 16:39 UTC (permalink / raw)
  To: pgsql-admin

Pgadmins, 2 loosly related questions

1. We have need to let developers view the postmaster logs on some of
   our environments and wish NOT to give them access to the postgres
   Unix acct if possible.  It looks though as if log file perms are
   determined by the global umask set in postmaster.c and is not
   changeable without either changing the umask or adding some chmod
   lines to syslogger.c.

Q: Am I missing an easier way to do this?  I realize the risks
involved here.

2. We have a fairly elaborate and very useful log file parser/analyzer
   running that gathers and reports on long-running-queries, error
   messages and other logged data.  Splitting the log files into
   records is a bit tricky however due to multi-line log records.

Q: Has anyone else wished for a config parm as "log_line_suffix" or
similar that would let us place an arbitrary record seperator string
trailing each log file entry?  Prefix can be used for this but seems a
 bit non-intuitive.

 Comments appreciated.

 Thx

-- 
-------------------------------------------------------------------------------
Jerry Sievers   305 854-3001 (home)     WWW ECommerce Consultant
                305 321-1144 (mobile	http://www.JerrySievers.com/



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Postmaster log perms and line suffix
  2006-04-26 16:39 Postmaster log perms and line suffix Jerry Sievers <jerry@jerrysievers.com>
@ 2006-04-26 20:37 ` Chris Hoover <revoohc@gmail.com>
  2006-05-01 12:55   ` Re: Postmaster log perms and line suffix Koen Martens <pgsql@metro.cx>
  0 siblings, 1 reply; 4+ messages in thread

From: Chris Hoover @ 2006-04-26 20:37 UTC (permalink / raw)
  To: Jerry Sievers <jerry@jerrysievers.com>; +Cc: pgsql-admin

On 26 Apr 2006 12:39:26 -0400, Jerry Sievers <jerry@jerrysievers.com> wrote:
>
> Pgadmins, 2 loosly related questions
>
> 1. We have need to let developers view the postmaster logs on some of
>    our environments and wish NOT to give them access to the postgres
>    Unix acct if possible.  It looks though as if log file perms are
>    determined by the global umask set in postmaster.c and is not
>    changeable without either changing the umask or adding some chmod
>    lines to syslogger.c.
>
> Q: Am I missing an easier way to do this?  I realize the risks
> involved here.


I did this in my non-production systems by having the log files in a
different partition from the database.  I symlinked pg_log to the log
partition so that the database would see the log files in the expected
place.  I then have the permissions on the log partition set so the
developers can get in with read only access.  I also use a cron job to set
the permissions on the log files each night so they are readable by the
developers.  This has been working very well for us.

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Postmaster log perms and line suffix
  2006-04-26 16:39 Postmaster log perms and line suffix Jerry Sievers <jerry@jerrysievers.com>
  2006-04-26 20:37 ` Re: Postmaster log perms and line suffix Chris Hoover <revoohc@gmail.com>
@ 2006-05-01 12:55   ` Koen Martens <pgsql@metro.cx>
  2006-05-01 19:58     ` Re: Postmaster log perms and line suffix jon <jonzou@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Koen Martens @ 2006-05-01 12:55 UTC (permalink / raw)
  To: Chris Hoover <revoohc@gmail.com>; +Cc: Jerry Sievers <jerry@jerrysievers.com>; pgsql-admin

Chris Hoover wrote:
> On 26 Apr 2006 12:39:26 -0400, *Jerry Sievers* <jerry@jerrysievers.com
> <mailto:jerry@jerrysievers.com>> wrote:
> 
>     Pgadmins, 2 loosly related questions
> 
>     1. We have need to let developers view the postmaster logs on some of
>        our environments and wish NOT to give them access to the postgres
>        Unix acct if possible.  It looks though as if log file perms are

I would probably use syslog logging for this..

Best,

Koen

-- 
K.F.J. Martens, Sonologic, http://www.sonologic.nl/
Networking, hosting, embedded systems, unix, artificial intelligence.
Public PGP key: http://www.metro.cx/pubkey-gmc.asc
Wondering about the funny attachment your mail program
can't read? Visit http://www.openpgp.org/



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Postmaster log perms and line suffix
  2006-04-26 16:39 Postmaster log perms and line suffix Jerry Sievers <jerry@jerrysievers.com>
  2006-04-26 20:37 ` Re: Postmaster log perms and line suffix Chris Hoover <revoohc@gmail.com>
  2006-05-01 12:55   ` Re: Postmaster log perms and line suffix Koen Martens <pgsql@metro.cx>
@ 2006-05-01 19:58     ` jon <jonzou@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: jon @ 2006-05-01 19:58 UTC (permalink / raw)
  To: Koen Martens <pgsql@metro.cx>; +Cc: Chris Hoover <revoohc@gmail.com>; Jerry Sievers <jerry@jerrysievers.com>; pgsql-admin

my 2 cents
1 setup logcheck to send message to a public email box
2 use apache to access log file themself

On 5/1/06, Koen Martens <pgsql@metro.cx> wrote:
>
> Chris Hoover wrote:
> > On 26 Apr 2006 12:39:26 -0400, *Jerry Sievers* <jerry@jerrysievers.com
> > <mailto:jerry@jerrysievers.com>> wrote:
> >
> >     Pgadmins, 2 loosly related questions
> >
> >     1. We have need to let developers view the postmaster logs on some
> of
> >        our environments and wish NOT to give them access to the postgres
> >        Unix acct if possible.  It looks though as if log file perms are
>
> I would probably use syslog logging for this..
>
> Best,
>
> Koen
>
> --
> K.F.J. Martens, Sonologic, http://www.sonologic.nl/
> Networking, hosting, embedded systems, unix, artificial intelligence.
> Public PGP key: http://www.metro.cx/pubkey-gmc.asc
> Wondering about the funny attachment your mail program
> can't read? Visit http://www.openpgp.org/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq
>

^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2006-05-01 19:58 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-04-26 16:39 Postmaster log perms and line suffix Jerry Sievers <jerry@jerrysievers.com>
2006-04-26 20:37 ` Chris Hoover <revoohc@gmail.com>
2006-05-01 12:55   ` Koen Martens <pgsql@metro.cx>
2006-05-01 19:58     ` jon <jonzou@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox