Re: uptime function to postmaster

Lists: pgsql-patches
From: Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br>
To: pgsql-patches(at)postgresql(dot)org
Subject: uptime function to postmaster
Date: 2004-12-19 20:52:57
Message-ID: 20041219205257.51911.qmail@web52601.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Hi,

This patch just implement a function that returns the uptime of the
postmaster. The docs are included too.
Another TODO item could be implement a function that returns the
startup time. If nobody objects I can do it.
Finally, I do not forbid non-superusers to execute it, but we can do
this if you prefer.
Comments?

Please review it and apply it.

PS> Hold it for 8.1.

=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br




_______________________________________________________
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis

Attachment Content-Type Size
uptime2.diff application/octet-stream 6.4 KB

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: uptime function to postmaster
Date: 2004-12-19 21:23:48
Message-ID: 16696.1103491428@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br> writes:
> This patch just implement a function that returns the uptime of the
> postmaster.

Doesn't work in EXEC_BACKEND case.

regards, tom lane


From: Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: uptime function to postmaster
Date: 2004-12-20 02:11:54
Message-ID: 20041220021154.19494.qmail@web52602.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Hi Tom,

> > This patch just implement a function that returns the uptime of the
> > postmaster.
>
> Doesn't work in EXEC_BACKEND case.
>
Sorry. I'll fix this.

=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br




_______________________________________________________
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis


From: Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: uptime function to postmaster
Date: 2004-12-22 03:57:34
Message-ID: 20041222035734.54953.qmail@web52603.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Hi,


> > > This patch just implement a function that returns the uptime of
> the
> > > postmaster.
> >
> > Doesn't work in EXEC_BACKEND case.
> >
> Sorry. I'll fix this.
>
Patch updated. I improved the function output too.

Comments?

=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br

__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/

Attachment Content-Type Size
uptime3.diff application/octet-stream 7.5 KB

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: uptime function to postmaster
Date: 2004-12-22 05:00:38
Message-ID: 20041222050038.GA3720@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

On Wed, Dec 22, 2004 at 12:57:34AM -0300, Euler Taveira de Oliveira wrote:

Hi,

> Patch updated. I improved the function output too.

Is it really a good idea to have a new file for only one function?
We regularly see complaints about not wanting to do basic source code
cleanup because not wanting to disrupt CVS history ...

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"El hombre nunca sabe de lo que es capaz hasta que lo intenta" (C. Dickens)


From: Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: uptime function to postmaster
Date: 2004-12-22 05:05:09
Message-ID: 20041222050509.60294.qmail@web52601.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches

Hi Alvaro,

>
> > Patch updated. I improved the function output too.
>
> Is it really a good idea to have a new file for only one function?
> We regularly see complaints about not wanting to do basic source code
> cleanup because not wanting to disrupt CVS history ...
>
I couldn't see a good place to put it. Any suggestion?

=====
Euler Taveira de Oliveira
euler[at]yahoo_com_br




_______________________________________________________
Yahoo! Acesso Grátis - Instale o discador do Yahoo! agora. http://br.acesso.yahoo.com/ - Internet rápida e grátis


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Euler Taveira de Oliveira <eulerto(at)yahoo(dot)com(dot)br>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: uptime function to postmaster
Date: 2005-01-04 00:42:55
Message-ID: 200501040042.j040gtK07784@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-patches


This has been saved for the 8.1 release:

http:/momjian.postgresql.org/cgi-bin/pgpatches2

---------------------------------------------------------------------------

Euler Taveira de Oliveira wrote:
> Hi,
>
>
> > > > This patch just implement a function that returns the uptime of
> > the
> > > > postmaster.
> > >
> > > Doesn't work in EXEC_BACKEND case.
> > >
> > Sorry. I'll fix this.
> >
> Patch updated. I improved the function output too.
>
> Comments?
>
>
> =====
> Euler Taveira de Oliveira
> euler[at]yahoo_com_br
>
> __________________________________________________
> Converse com seus amigos em tempo real com o Yahoo! Messenger
> http://br.download.yahoo.com/messenger/

Content-Description: uptime3.diff

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073