Problems with PGOPTIONS 
Author Message
 Problems with PGOPTIONS

Hi all,

I have a devel server where i want to turn on collector statistics.
I want to enable the collection of STATS_ROW_LEVEL for special backends
by setting the environment-variable export PGOPTIONS='-c STATS_ROW_LEVEL=ON'.
After setting this variable i cant connect to my database.
Everytime the following error occurs:

Connection to database 'mydb' failed.
FATAL 1:  permission denied

After unset PGOPTIONS everything works without any problems.
I have tested the same with an example C-program found under http://www.***.com/
but always got the same error if i want to send additional options.

Did i make some mistakes ?

Thanks in advance for help

as

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate

message can get through to the mailing list cleanly



Sun, 03 Jul 2005 18:58:26 GMT
 Problems with PGOPTIONS

Quote:

> I want to enable the collection of STATS_ROW_LEVEL for special backends
> by setting the environment-variable export PGOPTIONS='-c STATS_ROW_LEVEL=ON'.
> After setting this variable i cant connect to my database.
> Everytime the following error occurs:
> Connection to database 'mydb' failed.
> FATAL 1:  permission denied

You cannot alter stats_row_level unless you're a superuser (and I think
even that exception doesn't work for PGOPTIONS, because it's processed
before the backend has determined whether you are a superuser).  You'd
get the same error if you tried

regression=> set STATS_ROW_LEVEL = on;
ERROR:  'stats_row_level': permission denied

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate

message can get through to the mailing list cleanly



Sun, 03 Jul 2005 23:09:32 GMT
 Problems with PGOPTIONS
On Wed, 15 Jan 2003 10:01:27 -0500

Quote:


> > I want to enable the collection of STATS_ROW_LEVEL for special backends
> > by setting the environment-variable export PGOPTIONS='-c STATS_ROW_LEVEL=ON'.
> > After setting this variable i cant connect to my database.
> > Everytime the following error occurs:

> > Connection to database 'mydb' failed.
> > FATAL 1:  permission denied

> You cannot alter stats_row_level unless you're a superuser (and I think
> even that exception doesn't work for PGOPTIONS, because it's processed
> before the backend has determined whether you are a superuser).  You'd
> get the same error if you tried

> regression=> set STATS_ROW_LEVEL = on;
> ERROR:  'stats_row_level': permission denied

Ok, but is there another way to enable STATS_ROW_LEVEL for a special backend not
connecting as superuser ?

Regards, as

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command



Sun, 03 Jul 2005 23:21:44 GMT
 Problems with PGOPTIONS

Quote:

> Ok, but is there another way to enable STATS_ROW_LEVEL for a special
> backend not connecting as superuser ?

No: the code is deliberately designed to prevent that, on the grounds
that it'd be a security flaw (non-superusers should not be allowed to
hide their activities from the DBA).

There's nothing to stop you from making a private version with
stats_row_level downgraded to an ordinary unprotected SET variable,
though, if that seems more appropriate to your needs.  See its entry in
src/backend/utils/misc/guc.c and change it from SUSET to USERSET
category (from memory; check spelling in src/include/utils/guc.h).

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Mon, 04 Jul 2005 00:34:17 GMT
 Problems with PGOPTIONS
On Wed, 15 Jan 2003 11:19:29 -0500

Quote:


> > Ok, but is there another way to enable STATS_ROW_LEVEL for a special
> > backend not connecting as superuser ?

> No: the code is deliberately designed to prevent that, on the grounds
> that it'd be a security flaw (non-superusers should not be allowed to
> hide their activities from the DBA).

Lets say, that the statistics that i would collect come from several scripts
controlled and programmed by me.
All these scripts are connecting as different users to my db.
Is there a way to chnage these users to superusers and if yes would it be a
security flaw to change these users to superusers ?

Quote:
> There's nothing to stop you from making a private version with
> stats_row_level downgraded to an ordinary unprotected SET variable,
> though, if that seems more appropriate to your needs.  See its entry in
> src/backend/utils/misc/guc.c and change it from SUSET to USERSET
> category (from memory; check spelling in src/include/utils/guc.h).

I will test this.

Thanks for the quick answer.

Regards, as

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



Mon, 04 Jul 2005 18:10:25 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. SQL problem, MSDTC Problem or VB.NET problem?

2. Problems, problems, problems

3. problems problems problems

4. Transitive Closure Problem (aka employee-manager problem)

5. sql problem SA problem urgent

6. problem with excel - problems obtaining data

7. Instalation Problem + Class problem (automation) (VB+Access)

8. Date time problems (or BDE problem????)

9. Backup problem leading to connection problems HELP

10. Problems with decimals and anonther small problem

11. Date and time problems (or BDE problem???)

12. Not just male problems but frustrating SQLMail problems.


 
Powered by phpBB® Forum Software