Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit72f8efd

Browse files
committed
Back out /pl memory leak patch. Wait for new version.
1 parentff5d4cb commit72f8efd

File tree

4 files changed

+4
-25
lines changed

4 files changed

+4
-25
lines changed

‎src/pl/plpython/feature.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ SELECT global_test_two();
2929
(1 row)
3030

3131
SELECT import_fail();
32-
NOTICE: ('import socket failed -- untrusted dynamic module: _socket',)
32+
WARNING: ('import socket failed -- untrusted dynamic module: _socket',)
3333
import_fail
3434
--------------------
3535
failed as expected

‎src/pl/plpython/plpython.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
3030
*
3131
* IDENTIFICATION
32-
*$Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.23 2002/09/26 05:23:26 momjian Exp $
32+
*$Header: /cvsroot/pgsql/src/pl/plpython/plpython.c,v 1.24 2002/09/26 05:39:03 momjian Exp $
3333
*
3434
*********************************************************************
3535
*/
@@ -408,9 +408,7 @@ plpython_call_handler(PG_FUNCTION_ARGS)
408408
else
409409
PLy_restart_in_progress+=1;
410410
if (proc)
411-
{
412411
Py_DECREF(proc->me);
413-
}
414412
RERAISE_EXC();
415413
}
416414

@@ -1843,14 +1841,7 @@ PLy_plan_dealloc(PyObject * arg)
18431841
*
18441842
* FIXME -- leaks saved plan on object destruction. can this be
18451843
* avoided?
1846-
* I think so. A function prepares and then execp's a statement.
1847-
* When we come to deallocate the 'statement' object we obviously
1848-
* no long need the plan. Even if we did, without the object
1849-
* we're never going to be able to use it again.
1850-
* In the against arguments: SPI_saveplan has stuck this under
1851-
* the top context so there must be a reason for doing that.
18521844
*/
1853-
pfree(ob->plan);
18541845
}
18551846
if (ob->types)
18561847
PLy_free(ob->types);
@@ -2383,8 +2374,6 @@ PLy_spi_execute_fetch_result(SPITupleTable *tuptable, int rows, int status)
23832374
PyList_SetItem(result->rows,i,row);
23842375
}
23852376
PLy_typeinfo_dealloc(&args);
2386-
2387-
SPI_freetuptable(tuptable);
23882377
}
23892378
RESTORE_EXC();
23902379
}

‎src/pl/plpython/plpython_schema.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CREATE TABLE taxonomy (
2020

2121
CREATETABLEentry (
2222
accessiontextnot nullprimary key,
23-
eidserial unique,
23+
eidserial,
2424
txid int2not nullreferences taxonomy(id)
2525
) ;
2626

‎src/pl/tcl/pltcl.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* ENHANCEMENTS, OR MODIFICATIONS.
3232
*
3333
* IDENTIFICATION
34-
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.63 2002/09/26 05:23:26 momjian Exp $
34+
* $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.64 2002/09/26 05:39:03 momjian Exp $
3535
*
3636
**********************************************************************/
3737

@@ -1647,7 +1647,6 @@ pltcl_SPI_exec(ClientData cdata, Tcl_Interp *interp,
16471647
pltcl_set_tuple_values(interp,arrayname,0,tuples[0],tupdesc);
16481648
sprintf(buf,"%d",ntuples);
16491649
Tcl_SetResult(interp,buf,TCL_VOLATILE);
1650-
SPI_freetuptable(SPI_tuptable);
16511650
memcpy(&Warn_restart,&save_restart,sizeof(Warn_restart));
16521651
returnTCL_OK;
16531652
}
@@ -1669,19 +1668,15 @@ pltcl_SPI_exec(ClientData cdata, Tcl_Interp *interp,
16691668
continue;
16701669
if (loop_rc==TCL_RETURN)
16711670
{
1672-
SPI_freetuptable(SPI_tuptable);
16731671
memcpy(&Warn_restart,&save_restart,sizeof(Warn_restart));
16741672
returnTCL_RETURN;
16751673
}
16761674
if (loop_rc==TCL_BREAK)
16771675
break;
1678-
SPI_freetuptable(SPI_tuptable);
16791676
memcpy(&Warn_restart,&save_restart,sizeof(Warn_restart));
16801677
returnTCL_ERROR;
16811678
}
16821679

1683-
SPI_freetuptable(SPI_tuptable);
1684-
16851680
/************************************************************
16861681
* Finally return the number of tuples
16871682
************************************************************/
@@ -2212,7 +2207,6 @@ pltcl_SPI_execp(ClientData cdata, Tcl_Interp *interp,
22122207
{
22132208
if (ntuples>0)
22142209
pltcl_set_tuple_values(interp,arrayname,0,tuples[0],tupdesc);
2215-
SPI_freetuptable(SPI_tuptable);
22162210
memcpy(&Warn_restart,&save_restart,sizeof(Warn_restart));
22172211
sprintf(buf,"%d",ntuples);
22182212
Tcl_SetResult(interp,buf,TCL_VOLATILE);
@@ -2235,19 +2229,15 @@ pltcl_SPI_execp(ClientData cdata, Tcl_Interp *interp,
22352229
continue;
22362230
if (loop_rc==TCL_RETURN)
22372231
{
2238-
SPI_freetuptable(SPI_tuptable);
22392232
memcpy(&Warn_restart,&save_restart,sizeof(Warn_restart));
22402233
returnTCL_RETURN;
22412234
}
22422235
if (loop_rc==TCL_BREAK)
22432236
break;
2244-
SPI_freetuptable(SPI_tuptable);
22452237
memcpy(&Warn_restart,&save_restart,sizeof(Warn_restart));
22462238
returnTCL_ERROR;
22472239
}
22482240

2249-
SPI_freetuptable(SPI_tuptable);
2250-
22512241
/************************************************************
22522242
* Finally return the number of tuples
22532243
************************************************************/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp