Re: [PATCHES] Re: [HACKERS] [COMMITTERS] pgsql: Add GUC temp_tablespaces to provide a default location for
I think we will have to wait for 8.4 for this. --- Jaime Casanova wrote: On 4/2/07, Bruce Momjian [EMAIL PROTECTED] wrote: This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold mmm... sorry, i have been busy... how many time we have? i can send something for friday... -- 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 -- Bruce Momjian [EMAIL PROTECTED] http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [PATCHES] Re: [HACKERS] [COMMITTERS] pgsql: Add GUC temp_tablespaces to provide a default location for
Jaime Casanova wrote: On 4/2/07, Bruce Momjian [EMAIL PROTECTED] wrote: This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold mmm... sorry, i have been busy... how many time we have? i can send something for friday... Yes. Friday is fine, or even Monday. -- Bruce Momjian [EMAIL PROTECTED] http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] Re: [HACKERS] [COMMITTERS] pgsql: Add GUC temp_tablespaces to provide a default location for
On 4/2/07, Bruce Momjian [EMAIL PROTECTED] wrote: This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold mmm... sorry, i have been busy... how many time we have? i can send something for friday... -- 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 ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [PATCHES] Re: [HACKERS] [COMMITTERS] pgsql: Add GUC temp_tablespaces to provide a default location for
This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Bruce Momjian wrote: OK, patch reverted. Authors, would you please resubmit with fixes? Thanks. --- Tom Lane wrote: [EMAIL PROTECTED] (Bruce Momjian) writes: Add GUC temp_tablespaces to provide a default location for temporary objects. Jaime Casanova I hadn't looked at this patch before, but now that I have, it is rather broken. In the first place, it makes no provision for RemovePgTempFiles() to clean up leftover temp files that are in non-default places. In the second place, it's a serious violation of what little modularity and layering we have for fd.c to be calling into commands/tablespace.c. This is not merely cosmetic but has real consequences: one being that it's now unsafe to call OpenTemporaryFile outside a transaction. Please revert until the submitter can come up with a better-designed patch. regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org -- Bruce Momjian [EMAIL PROTECTED] http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 6: explain analyze is your friend -- Bruce Momjian [EMAIL PROTECTED] http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---(end of broadcast)--- TIP 6: explain analyze is your friend
[PATCHES] Re: [HACKERS] [COMMITTERS] pgsql: Add GUC temp_tablespaces to provide a default location for
OK, patch reverted. Authors, would you please resubmit with fixes? Thanks. --- Tom Lane wrote: [EMAIL PROTECTED] (Bruce Momjian) writes: Add GUC temp_tablespaces to provide a default location for temporary objects. Jaime Casanova I hadn't looked at this patch before, but now that I have, it is rather broken. In the first place, it makes no provision for RemovePgTempFiles() to clean up leftover temp files that are in non-default places. In the second place, it's a serious violation of what little modularity and layering we have for fd.c to be calling into commands/tablespace.c. This is not merely cosmetic but has real consequences: one being that it's now unsafe to call OpenTemporaryFile outside a transaction. Please revert until the submitter can come up with a better-designed patch. regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org -- Bruce Momjian [EMAIL PROTECTED] http://momjian.us EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + Index: doc/src/sgml/config.sgml === RCS file: /cvsroot/pgsql/doc/src/sgml/config.sgml,v retrieving revision 1.104 retrieving revision 1.105 diff -c -r1.104 -r1.105 *** doc/src/sgml/config.sgml 20 Jan 2007 21:30:26 - 1.104 --- doc/src/sgml/config.sgml 25 Jan 2007 04:35:10 - 1.105 *** *** 3398,3403 --- 3398,3432 /listitem /varlistentry + varlistentry id=guc-temp-tablespaces xreflabel=temp_tablespaces + termvarnametemp_tablespaces/varname (typestring/type)/term + indexterm +primaryvarnametemp_tablespaces/ configuration parameter/primary + /indexterm + indextermprimarytablespace/secondarytemp// + listitem +para + This variable specifies tablespaces in which to create temp + objects (temp tables and indexes on temp tables) when a + commandCREATE/ command does not explicitly specify a tablespace + and temp files when necessary (eg. for sorting operations). +/para + +para + The value is either a list of names of tablespaces, or an empty + string to specify using the default tablespace of the current database. + If the value does not match the name of any existing tablespace, + productnamePostgreSQL/ will automatically use the default + tablespace of the current database. +/para + +para + For more information on tablespaces, + see xref linkend=manage-ag-tablespaces. +/para + /listitem + /varlistentry + varlistentry id=guc-check-function-bodies xreflabel=check_function_bodies termvarnamecheck_function_bodies/varname (typeboolean/type)/term indexterm Index: src/backend/commands/indexcmds.c === RCS file: /cvsroot/pgsql/src/backend/commands/indexcmds.c,v retrieving revision 1.153 retrieving revision 1.154 diff -c -r1.153 -r1.154 *** src/backend/commands/indexcmds.c 20 Jan 2007 23:13:01 - 1.153 --- src/backend/commands/indexcmds.c 25 Jan 2007 04:35:10 - 1.154 *** *** 209,215 } else { ! tablespaceId = GetDefaultTablespace(); /* note InvalidOid is OK in this case */ } --- 209,221 } else { ! /* ! * if the target table is temporary then use a temp_tablespace ! */ ! if (!rel-rd_istemp) ! tablespaceId = GetDefaultTablespace(); ! else ! tablespaceId = GetTempTablespace(); /* note InvalidOid is OK in this case */ } Index: src/backend/commands/tablecmds.c === RCS file: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v retrieving revision 1.211 retrieving revision 1.212 diff -c -r1.211 -r1.212 *** src/backend/commands/tablecmds.c 25 Jan 2007 04:17:45 - 1.211 --- src/backend/commands/tablecmds.c 25 Jan 2007 04:35:10 - 1.212 *** *** 334,339 --- 334,343 errmsg(tablespace \%s\ does not exist, stmt-tablespacename))); } + else if (stmt-relation-istemp) + { + tablespaceId = GetTempTablespace(); + } else { tablespaceId = GetDefaultTablespace(); Index: src/backend/commands/tablespace.c === RCS file: /cvsroot/pgsql/src/backend/commands/tablespace.c,v retrieving revision 1.40 retrieving revision 1.41 diff -c -r1.40 -r1.41 *** src/backend/commands/tablespace.c 5 Jan 2007 22:19:26 - 1.40 --- src/backend/commands/tablespace.c 25 Jan 2007 04:35:10 - 1.41 *** ***