Thread: Lost instrumentation functions
Hi, After an upgrade of PostgreSQL 8.1.0 to 8.1.2 I lost the instrumentation functions. Recompiling and reinstalling does not restore the functionality. I have looked in the log files of PostgreSQL and PgAdmin for clues but I cannot find anything. What can I do to: 1. Better diagnose problems with non-loading/working PostgreSQL libraries? 2. Get the instrumentation functions working again? -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 e-mail: J.Kraaijeveld@Askesis.nl web: www.askesis.nl
> -----Original Message----- > From: pgadmin-support-owner@postgresql.org > [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of > Joost Kraaijeveld > Sent: 22 January 2006 08:20 > To: PgAdmin-support > Subject: [pgadmin-support] Lost instrumentation functions > > Hi, > > After an upgrade of PostgreSQL 8.1.0 to 8.1.2 I lost the > instrumentation > functions. Weird. > Recompiling and reinstalling does not restore the > functionality. I have > looked in the log files of PostgreSQL and PgAdmin for clues > but I cannot > find anything. > > What can I do to: > 1. Better diagnose problems with non-loading/working PostgreSQL > libraries? Darned if I know. I've had a heck of a job diagnosing this sort of problem in the past :-(. > 2. Get the instrumentation functions working again? Do the function definitions actually exist in your master database? If so, do they work? Try 'select * from pg_logdir_ls()' to test. If so, then it would appear that pgAdmin just isn't detecting them for some reason. Regards, Dave.
Hi Dave, On Sun, 2006-01-22 at 08:51 +0000, Dave Page wrote: > Do the function definitions actually exist in your master database? If Yep, they do. > so, do they work? Try 'select * from pg_logdir_ls()' to test. If so, This returns: ERROR: a column definition list is required for functions returning "record" The other function that is installed by admin81.sql and that is callable without arguments ("select * from pg_catalog.pg_logfile_rotate()") returns "0" -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 e-mail: J.Kraaijeveld@Askesis.nl web: www.askesis.nl
> -----Original Message----- > From: Joost Kraaijeveld [mailto:J.Kraaijeveld@Askesis.nl] > Sent: 22 January 2006 09:23 > To: Dave Page > Cc: PgAdmin-support > Subject: RE: [pgadmin-support] Lost instrumentation functions > > Hi Dave, > > On Sun, 2006-01-22 at 08:51 +0000, Dave Page wrote: > > > Do the function definitions actually exist in your master > database? If > Yep, they do. > > > so, do they work? Try 'select * from pg_logdir_ls()' to test. If so, > > This returns: > ERROR: a column definition list is required for functions returning > "record" Sorry- try without the brackets - that's a view that uses the function to retrieve 3 columns. Regards Dave
On Sun, 2006-01-22 at 09:34 +0000, Dave Page wrote: > Sorry- try without the brackets - that's a view that uses the function > to retrieve 3 columns. Mmmm. "select * from pg_logdir_ls;" returns: ERROR: relation "pg_logdir_ls" does not exist But the function exists (I can see all the functions from admin81.sql with pgadmin in the tree), so it is likely that it is not the correct syntax. As far as I know one must call a function with brackets e.g. "select * from now();". -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 e-mail: J.Kraaijeveld@Askesis.nl web: www.askesis.nl
> -----Original Message----- > From: Joost Kraaijeveld [mailto:J.Kraaijeveld@Askesis.nl] > Sent: 22 January 2006 10:00 > To: Dave Page > Cc: PgAdmin-support > Subject: RE: [pgadmin-support] Lost instrumentation functions > > On Sun, 2006-01-22 at 09:34 +0000, Dave Page wrote: > > > Sorry- try without the brackets - that's a view that uses > the function > > to retrieve 3 columns. > Mmmm. "select * from pg_logdir_ls;" returns: > ERROR: relation "pg_logdir_ls" does not exist > > But the function exists (I can see all the functions from admin81.sql > with pgadmin in the tree), so it is likely that it is not the correct > syntax. As far as I know one must call a function with brackets e.g. > "select * from now();". Yes, but there should be a view with the same name - see the bottom of the SQL script: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/trunk/pgadmin3/xtra/admin81/a dmin81.sql.in?rev=4475&view=markup That should call the function with the correct syntax and prove whether or not it's working. Regards, Dave
Dave Page wrote: > > > >>-----Original Message----- >>From: Joost Kraaijeveld [mailto:J.Kraaijeveld@Askesis.nl] >>Sent: 22 January 2006 10:00 >>To: Dave Page >>Cc: PgAdmin-support >>Subject: RE: [pgadmin-support] Lost instrumentation functions >> >>On Sun, 2006-01-22 at 09:34 +0000, Dave Page wrote: >> >> >>>Sorry- try without the brackets - that's a view that uses >> >>the function >> >>>to retrieve 3 columns. >> >>Mmmm. "select * from pg_logdir_ls;" returns: >>ERROR: relation "pg_logdir_ls" does not exist >> >>But the function exists (I can see all the functions from admin81.sql >>with pgadmin in the tree), so it is likely that it is not the correct >>syntax. As far as I know one must call a function with brackets e.g. >>"select * from now();". > > > Yes, but there should be a view with the same name - see the bottom of > the SQL script: > > http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/trunk/pgadmin3/xtra/admin81/a > dmin81.sql.in?rev=4475&view=markup > > That should call the function with the correct syntax and prove whether > or not it's working. That view is for pgadmin 1.2 compatibility only, not needed for 1.4. SELECT pg_logdir_ls() should work. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 22 January 2006 11:41 > To: Dave Page > Cc: Joost Kraaijeveld; PgAdmin-support > Subject: Re: [pgadmin-support] Lost instrumentation functions > > That view is for pgadmin 1.2 compatibility only, not needed for 1.4. > > SELECT pg_logdir_ls() should work. Yes, but the view should still be there as it's in the script. If not, something fishy is afoot. /F
Dave Page wrote: > > > >>-----Original Message----- >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] >>Sent: 22 January 2006 11:41 >>To: Dave Page >>Cc: Joost Kraaijeveld; PgAdmin-support >>Subject: Re: [pgadmin-support] Lost instrumentation functions >> >>That view is for pgadmin 1.2 compatibility only, not needed for 1.4. >> >>SELECT pg_logdir_ls() should work. > > > Yes, but the view should still be there as it's in the script. If not, > something fishy is afoot. It's commented out... Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 22 January 2006 11:56 > To: Dave Page > Cc: Joost Kraaijeveld; PgAdmin-support > Subject: Re: [pgadmin-support] Lost instrumentation functions > > Dave Page wrote: > > > > > > > >>-----Original Message----- > >>From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > >>Sent: 22 January 2006 11:41 > >>To: Dave Page > >>Cc: Joost Kraaijeveld; PgAdmin-support > >>Subject: Re: [pgadmin-support] Lost instrumentation functions > >> > >>That view is for pgadmin 1.2 compatibility only, not needed for 1.4. > >> > >>SELECT pg_logdir_ls() should work. > > > > > > Yes, but the view should still be there as it's in the > script. If not, > > something fishy is afoot. > > It's commented out... Blergh. :-) /D
Hi Dave, If I run this query select * from pg_logdir_ls() as (filetime timestamp, filename text) I get the following response: ERROR: /var/lib/postgresql/8.1/main/pg_log is not browsable: Not a directory This suggest that the function is available (but not working ;-)) -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 e-mail: J.Kraaijeveld@Askesis.nl web: www.askesis.nl
Joost Kraaijeveld wrote: > Hi Dave, > > If I run this query > > select * from pg_logdir_ls() as (filetime timestamp, filename text) > > I get the following response: > > ERROR: /var/lib/postgresql/8.1/main/pg_log is not browsable: Not a > directory > > This suggest that the function is available (but not working ;-)) I bet /var/lib/postgresql/8.1/main/pg_log is not a directory... Did you enable redirect_stderr? The function is working as expected in this situation. Please note that pgadmin expects its functions to be existent in the _maintenance_ DB, for 8.1 usually postgres. Regards, Andreas
Hi Andreas, On Sun, 2006-01-22 at 18:26 +0100, Andreas Pflug wrote: > Joost Kraaijeveld wrote: > I bet /var/lib/postgresql/8.1/main/pg_log is not a directory... Did you > enable redirect_stderr? The function is working as expected in this > situation. Not, that is not my problem, hence the ;-). The problem is that PgAdmin does not find the instrumentation functions while they are there (I get the Guru hint). -- Groeten, Joost Kraaijeveld Askesis B.V. Molukkenstraat 14 6524NB Nijmegen tel: 024-3888063 / 06-51855277 fax: 024-3608416 e-mail: J.Kraaijeveld@Askesis.nl web: www.askesis.nl