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

Commit954e466

Browse files
committed
Fix for removal of temp tables if last transaction was aborted.
1 parentd20abcd commit954e466

File tree

3 files changed

+10
-17
lines changed

3 files changed

+10
-17
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.106 1999/06/04 21:14:46 tgl Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.107 1999/07/02 18:09:27 momjian Exp $
1414
*
1515
* NOTES
1616
*
@@ -1483,8 +1483,8 @@ DoBackend(Port *port)
14831483
* Let's clean up ourselves as the postmaster child
14841484
*/
14851485

1486-
on_exit_reset();/*we don't want the postmaster's
1487-
* proc_exit() handlers */
1486+
/*We don't want the postmaster's proc_exit() handlers */
1487+
on_exit_reset();
14881488

14891489
/* ----------------
14901490
*register signal handlers.

‎src/backend/tcop/postgres.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.118 1999/05/29 10:25:30 vadim Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.119 1999/07/02 18:09:27 momjian Exp $
1111
*
1212
* NOTES
1313
* this is the "main" module of the postgres backend and
@@ -1483,17 +1483,6 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
14831483
puts("\treset_client_encoding() done.");
14841484
#endif
14851485

1486-
/* ----------------
1487-
* if stable main memory is assumed (-S(old) flag is set), it is necessary
1488-
* to flush all dirty shared buffers before exit
1489-
* plai 8/7/90
1490-
* this used to be done further down, causing an additional entry in
1491-
* the shmem exit list for every error :-( ... tgl 10/1/98
1492-
* ----------------
1493-
*/
1494-
if (!TransactionFlushEnabled())
1495-
on_shmem_exit(FlushBufferPool,NULL);
1496-
14971486
on_shmem_exit(remove_all_temp_relations,NULL);
14981487

14991488
/* ----------------
@@ -1536,7 +1525,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
15361525
if (!IsUnderPostmaster)
15371526
{
15381527
puts("\nPOSTGRES backend interactive interface ");
1539-
puts("$Revision: 1.118 $ $Date: 1999/05/29 10:25:30 $\n");
1528+
puts("$Revision: 1.119 $ $Date: 1999/07/02 18:09:27 $\n");
15401529
}
15411530

15421531
/* ----------------

‎src/backend/utils/cache/temprel.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.4 1999/05/25 22:42:16 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/temprel.c,v 1.5 1999/07/02 18:09:28 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -30,6 +30,7 @@
3030
#include"nodes/pg_list.h"
3131
#include"utils/mcxt.h"
3232
#include"utils/temprel.h"
33+
#include"access/xact.h"
3334
#include"access/htup.h"
3435
#include"access/heapam.h"
3536
#include"catalog/heap.h"
@@ -79,6 +80,8 @@ remove_all_temp_relations(void)
7980
List*l,
8081
*next;
8182

83+
StartTransactionCommand();
84+
8285
l=temp_rels;
8386
while (l!=NIL)
8487
{
@@ -102,6 +105,7 @@ remove_all_temp_relations(void)
102105

103106
l=next;
104107
}
108+
CommitTransactionCommand();
105109
}
106110

107111
/* we don't have the relname for indexes, so we just pass the oid */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp