From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Jaime Casanova <systemguards(at)gmail(dot)com> |
Cc: | Albert Cervera Areny <albertca(at)hotpop(dot)com>, pgsql-patches(at)postgresql(dot)org, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Subject: | Re: [PATCHES] Tablespace for temporary |
Date: | 2007-01-20 16:07:04 |
Message-ID: | 200701201607.l0KG74029676@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Patch withdrawn by author; corrected version expected.
---------------------------------------------------------------------------
Jaime Casanova wrote:
> On 1/13/07, Albert Cervera Areny <albertca(at)hotpop(dot)com> wrote:
> > It was already possible to set the guc on postgresql.conf when I posted the
> > patch...
> >
>
> ok... fixed... the problem was that this code only let
> num_temp_tablespaces be greater than zero when we are in an
> interactive command (eg. a SET command) but setting the guc from
> postgresql.conf at startup time is not interactive so
> num_temp_tablespaces is zero and when i try to get the first temp
> tablespace to use (MyProcPid % num_temp_tablespaces) causes a floatin
> exception (division by zero).
>
> + if (source >= PGC_S_INTERACTIVE && IsTransactionState())
> + {
> + /*
> + * Verify that all the names are valid tablspace names
> + * We do not check for USAGE rights should we?
> + */
> + foreach(l, namelist)
> + {
> + char *curname = (char *) lfirst(l);
> +
> + if (get_tablespace_oid(curname) == InvalidOid)
> + ereport((source == PGC_S_TEST) ? NOTICE : ERROR,
> + (errcode(ERRCODE_UNDEFINED_OBJECT),
> + errmsg("tablespace \"%s\" does not exist", curname)));
> +
> + num_temp_tablespaces++;
> + }
> + }
>
>
> new patch added, with that piece of code refactored to let
> num_temp_tablespaces get a value greater than zero always that the guc
> is setted, i also add some docs.
>
> the patch passes all 104 regression tests and all my tests as well...
>
> i think the patch is ready to be applied to HEAD, any committer want
> to review it?
>
> --
> regards,
> Jaime Casanova
>
> "Programming today is a race between software engineers striving to
> build bigger and better idiot-proof programs and the universe trying
> to produce bigger and better idiots.
> So far, the universe is winning."
> Richard Cook
[ Attachment, skipping... ]
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
--
Bruce Momjian bruce(at)momjian(dot)us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2007-01-20 16:30:35 | Re: guid/uuid datatype |
Previous Message | Bruce Momjian | 2007-01-20 14:46:11 | Code cleanup |