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

Commita3e2bc7

Browse files
author
Hiroshi Inoue
committed
to live in a transaction before access to dbduring backend startup.
1 parent3e99158 commita3e2bc7

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 7 additions & 3 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.137 1999/11/16 06:13:35 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.138 1999/12/22 00:07:15 inoue Exp $
1111
*
1212
* NOTES
1313
* this is the "main" module of the postgres backend and
@@ -1474,7 +1474,11 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
14741474

14751475
on_shmem_exit(remove_all_temp_relations,NULL);
14761476

1477-
parser_input=makeStringInfo();/* initialize input buffer */
1477+
{
1478+
MemoryContextoldcontext=MemoryContextSwitchTo(TopMemoryContext);
1479+
parser_input=makeStringInfo();/* initialize input buffer */
1480+
MemoryContextSwitchTo(oldcontext);
1481+
}
14781482

14791483
/*
14801484
* Send this backend's cancellation info to the frontend.
@@ -1495,7 +1499,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
14951499
if (!IsUnderPostmaster)
14961500
{
14971501
puts("\nPOSTGRES backend interactive interface ");
1498-
puts("$Revision: 1.137 $ $Date: 1999/11/16 06:13:35 $\n");
1502+
puts("$Revision: 1.138 $ $Date: 1999/12/22 00:07:15 $\n");
14991503
}
15001504

15011505
/*

‎src/backend/utils/init/postinit.c

Lines changed: 4 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/init/postinit.c,v 1.53 1999/11/21 01:58:21 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.54 1999/12/22 00:07:16 inoue Exp $
1111
*
1212
* NOTES
1313
*InitPostgres() is the function called from PostgresMain
@@ -546,6 +546,9 @@ InitPostgres(char *name)/* database name */
546546
*/
547547
InitCatalogCache();
548548

549+
/* start a new transaction here before access to db */
550+
if (!bootstrap)
551+
StartTransactionCommand();
549552
/*
550553
* Set ourselves to the proper user id and figure out our postgres
551554
* user id. If we ever add security so that we check for valid

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp