Thread: pgsql: Remove GUC USERLIMIT variable category, making the affected

pgsql: Remove GUC USERLIMIT variable category, making the affected

From
tgl@svr1.postgresql.org (Tom Lane)
Date:
Log Message:
-----------
Remove GUC USERLIMIT variable category, making the affected variables
plain SUSET instead.  Also delay processing of options received in
client connection request until after we know if the user is a superuser,
so that SUSET values can be set that way by legitimate superusers.
Per recent discussion.

Modified Files:
--------------
    pgsql/doc/src/sgml:
        runtime.sgml (r1.291 -> r1.292)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/runtime.sgml.diff?r1=1.291&r2=1.292)
    pgsql/src/backend/bootstrap:
        bootstrap.c (r1.195 -> r1.196)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/bootstrap/bootstrap.c.diff?r1=1.195&r2=1.196)
    pgsql/src/backend/postmaster:
        postmaster.c (r1.437 -> r1.438)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c.diff?r1=1.437&r2=1.438)
    pgsql/src/backend/tcop:
        postgres.c (r1.436 -> r1.437)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c.diff?r1=1.436&r2=1.437)
    pgsql/src/backend/utils/init:
        postinit.c (r1.137 -> r1.138)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/postinit.c.diff?r1=1.137&r2=1.138)
    pgsql/src/backend/utils/misc:
        guc.c (r1.248 -> r1.249)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c.diff?r1=1.248&r2=1.249)
    pgsql/src/include:
        miscadmin.h (r1.172 -> r1.173)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/miscadmin.h.diff?r1=1.172&r2=1.173)
    pgsql/src/include/tcop:
        tcopprot.h (r1.71 -> r1.72)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/tcop/tcopprot.h.diff?r1=1.71&r2=1.72)
    pgsql/src/include/utils:
        guc.h (r1.55 -> r1.56)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/guc.h.diff?r1=1.55&r2=1.56)

Re: pgsql: Remove GUC USERLIMIT variable category, making the affected

From
Sean Chittenden
Date:
> Also delay processing of options received in
> client connection request until after we know if the user is a
> superuser,
> so that SUSET values can be set that way by legitimate superusers.

Does this mean that postgresql.conf:log_connection=off, ALTER USER usr
SET log_connection=on will only result in a log entry after we've
processed useconfig?  More importantly,
postgresql.conf:log_connection=on, ALTER USER usr SET
log_connection=off will not log a connection attempt?

--
Sean Chittenden


Re: pgsql: Remove GUC USERLIMIT variable category, making the affected

From
Tom Lane
Date:
Sean Chittenden <sean@chittenden.org> writes:
>> Also delay processing of options received in
>> client connection request until after we know if the user is a
>> superuser,
>> so that SUSET values can be set that way by legitimate superusers.

> Does this mean that postgresql.conf:log_connection=off, ALTER USER usr
> SET log_connection=on will only result in a log entry after we've
> processed useconfig?

It won't result in a log entry at all, and never has, because
log_connection executes long before we look at the options.

            regards, tom lane