Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-29 Thread Jim Nasby
On May 27, 2007, at 1:19 PM, Robert Treat wrote: On Friday 25 May 2007 12:39, Jaime Casanova wrote: On 5/25/07, Tom Lane [EMAIL PROTECTED] wrote: Bernd Helmle [EMAIL PROTECTED] writes: No, because the RemovePgTempFiles() call in PostmasterMain() will remove all tmp files at startup. I

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-29 Thread Jaime Casanova
On 5/27/07, Robert Treat [EMAIL PROTECTED] wrote: On Friday 25 May 2007 12:39, Jaime Casanova wrote: On 5/25/07, Tom Lane [EMAIL PROTECTED] wrote: Bernd Helmle [EMAIL PROTECTED] writes: --On Freitag, Mai 25, 2007 10:49:29 + Jaime Casanova [EMAIL PROTECTED] wrote: No, because

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-29 Thread Robert Treat
On Tuesday 29 May 2007 20:06, Jaime Casanova wrote: On 5/27/07, Robert Treat [EMAIL PROTECTED] wrote: On Friday 25 May 2007 12:39, Jaime Casanova wrote: On 5/25/07, Tom Lane [EMAIL PROTECTED] wrote: Bernd Helmle [EMAIL PROTECTED] writes: --On Freitag, Mai 25, 2007 10:49:29 +

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-27 Thread Robert Treat
On Friday 25 May 2007 12:39, Jaime Casanova wrote: On 5/25/07, Tom Lane [EMAIL PROTECTED] wrote: Bernd Helmle [EMAIL PROTECTED] writes: --On Freitag, Mai 25, 2007 10:49:29 + Jaime Casanova [EMAIL PROTECTED] wrote: No, because the RemovePgTempFiles() call in PostmasterMain() will

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-26 Thread Jaime Casanova
On 5/25/07, Bernd Helmle [EMAIL PROTECTED] wrote: --On Freitag, Mai 25, 2007 00:02:06 + Jaime Casanova [EMAIL PROTECTED] wrote: sounds good. can we see the new patch? Attached tablespace.c.diff shows my current changes to use an OID lookup list. on second thought, what happens if

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Jaime Casanova
On 5/25/07, Tom Lane [EMAIL PROTECTED] wrote: Jaime Casanova [EMAIL PROTECTED] writes: On 5/24/07, Alvaro Herrera [EMAIL PROTECTED] wrote: What happens if you create a cursor that stores something (sort intermediate results?) in a temp tablespace, FETCH some from it, then someone else drops

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Bernd Helmle
--On Freitag, Mai 25, 2007 10:49:29 + Jaime Casanova [EMAIL PROTECTED] wrote: No, because the RemovePgTempFiles() call in PostmasterMain() will remove all tmp files at startup. Hmm isn't RemovePgTempFiles() called on postmaster startup only? What will happen if a temp tablespace is out

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Tom Lane
Bernd Helmle [EMAIL PROTECTED] writes: --On Freitag, Mai 25, 2007 10:49:29 + Jaime Casanova [EMAIL PROTECTED] wrote: No, because the RemovePgTempFiles() call in PostmasterMain() will remove all tmp files at startup. Hmm isn't RemovePgTempFiles() called on postmaster startup only? What

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Bernd Helmle
--On Freitag, Mai 25, 2007 00:02:06 + Jaime Casanova [EMAIL PROTECTED] wrote: the original patch is from Albert Cervera =) Ah, missed that, thanks ;) sounds good. can we see the new patch? Attached tablespace.c.diff shows my current changes to use an OID lookup list. the

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Jaime Casanova
On 5/25/07, Tom Lane [EMAIL PROTECTED] wrote: Bernd Helmle [EMAIL PROTECTED] writes: --On Freitag, Mai 25, 2007 10:49:29 + Jaime Casanova [EMAIL PROTECTED] wrote: No, because the RemovePgTempFiles() call in PostmasterMain() will remove all tmp files at startup. I believe we do not call

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-25 Thread Jaime Casanova
On 5/25/07, Bernd Helmle [EMAIL PROTECTED] wrote: --On Freitag, Mai 25, 2007 00:02:06 + Jaime Casanova [EMAIL PROTECTED] wrote: sounds good. can we see the new patch? Attached tablespace.c.diff shows my current changes to use an OID lookup list. + if (source =

[HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-24 Thread Bernd Helmle
While looking at Jaime's last temp_tablespaces GUC patch, i've got some concerns about it's current implementation: 1) The code claims that OIDs of temp tablespaces couldn't be cached, therefore it is parsing and re-reading the GUCs in GetTempTablespace() with SplitIdentifierNames() over and

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-24 Thread Alvaro Herrera
Bernd Helmle escribió: It's possible that someone could drop a temporary tablespace between subsequent usage of GetTempTablespace() when they are empty. This leads to strange NOTICEs like NOTICE: could not create temporary file pg_tblspc/16387/pgsql_tmp/pgsql_tmp19942.0 during query

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-24 Thread Jaime Casanova
On 5/24/07, Bernd Helmle [EMAIL PROTECTED] wrote: While looking at Jaime's last temp_tablespaces GUC patch, i've got some concerns about it's current implementation: the original patch is from Albert Cervera =) 1) The code claims that OIDs of temp tablespaces couldn't be cached, therefore

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-24 Thread Jaime Casanova
On 5/24/07, Alvaro Herrera [EMAIL PROTECTED] wrote: Bernd Helmle escribió: It's possible that someone could drop a temporary tablespace between subsequent usage of GetTempTablespace() when they are empty. This leads to strange NOTICEs like NOTICE: could not create temporary file

Re: [HACKERS] Reviewing temp_tablespaces GUC patch

2007-05-24 Thread Tom Lane
Jaime Casanova [EMAIL PROTECTED] writes: On 5/24/07, Alvaro Herrera [EMAIL PROTECTED] wrote: What happens if you create a cursor that stores something (sort intermediate results?) in a temp tablespace, FETCH some from it, then someone else drops the tablespace and FETCH some more? you can't