pgsql-server/ ontrib/tablefunc/tablefunc.c oc/ ...

Lists: pgsql-committers
From: tgl(at)svr1(dot)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server/ ontrib/tablefunc/tablefunc.c oc/ ...
Date: 2004-02-03 17:34:04
Message-ID: 20040203173404.40839D1C513@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

CVSROOT: /cvsroot
Module name: pgsql-server
Changes by: tgl(at)svr1(dot)postgresql(dot)org 04/02/03 13:34:04

Modified files:
contrib/tablefunc: tablefunc.c
doc/src/sgml : backup.sgml installation.sgml perform.sgml
plpgsql.sgml runtime.sgml
doc/src/sgml/ref: postgres-ref.sgml postmaster.sgml
src/backend/access/nbtree: nbtree.c nbtsort.c
src/backend/commands: vacuumlazy.c
src/backend/executor: execQual.c nodeAgg.c nodeHash.c
nodeIndexscan.c nodeMaterial.c nodeSort.c
src/backend/optimizer/path: costsize.c
src/backend/optimizer/plan: planner.c subselect.c
src/backend/optimizer/util: pathnode.c
src/backend/tcop: postgres.c
src/backend/utils/adt: ri_triggers.c
src/backend/utils/init: globals.c
src/backend/utils/misc: guc.c postgresql.conf.sample
src/backend/utils/mmgr: portalmem.c
src/backend/utils/sort: tuplesort.c tuplestore.c
src/bin/psql : tab-complete.c
src/include/access: nbtree.h
src/include : miscadmin.h
src/include/utils: tuplesort.h
src/pl/plpgsql/src: pl_exec.c

Log message:
Rename SortMem and VacuumMem to work_mem and maintenance_work_mem.
Make btree index creation and initial validation of foreign-key constraints
use maintenance_work_mem rather than work_mem as their memory limit.
Add some code to guc.c to allow these variables to be referenced by their
old names in SHOW and SET commands, for backwards compatibility.


From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: Tom Lane <tgl(at)svr1(dot)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql-server/ ontrib/tablefunc/tablefunc.c oc/ ...
Date: 2004-02-04 02:31:05
Message-ID: 40205969.2030809@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

> Log message:
> Rename SortMem and VacuumMem to work_mem and maintenance_work_mem.
> Make btree index creation and initial validation of foreign-key constraints
> use maintenance_work_mem rather than work_mem as their memory limit.
> Add some code to guc.c to allow these variables to be referenced by their
> old names in SHOW and SET commands, for backwards compatibility.

Does this mean that if you go ALTER USER/SET sort_mem TO xxx, it will
set the variable work_mem=xxx in their pg_shadow row?

Chris


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql-server/ ontrib/tablefunc/tablefunc.c oc/ ...
Date: 2004-02-04 04:15:05
Message-ID: 5568.1075868105@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers

Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> writes:
>> Add some code to guc.c to allow these variables to be referenced by their
>> old names in SHOW and SET commands, for backwards compatibility.

> Does this mean that if you go ALTER USER/SET sort_mem TO xxx, it will
> set the variable work_mem=xxx in their pg_shadow row?

My first answer was "no, the pg_shadow row will still mention sort_mem,
but that will be accepted as meaning work_mem later on when you log in
as that user."

However, looking more closely, AlterUserSet converts option names to
canonical spelling before storing them, which means it Just Works:

regression=# create user foo;
CREATE USER
regression=# alter user foo set sort_mem = 999;
ALTER USER
regression=# select * from pg_shadow where usename = 'foo';
usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig
---------+----------+-------------+----------+-----------+--------+----------+----------------
foo | 100 | f | f | f | | | {work_mem=999}
(1 row)

Dang, sometimes nice things actually fall out of the code ...

regards, tom lane