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

Commit74ef810

Browse files
committed
Fix embarrassing bug in recent smgr refactoring patch: WAL records should
be written for *non*-temp tables only. Report and test case by MarkKirkwood and Simon Riggs.
1 parenta65ed83 commit74ef810

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎src/backend/catalog/storage.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/storage.c,v 1.3 2009/01/01 17:23:37 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/storage.c,v 1.4 2009/01/04 14:59:22 heikki Exp $
1212
*
1313
* NOTES
1414
* Some of this code used to be in storage/smgr/smgr.c, and the
@@ -106,7 +106,7 @@ RelationCreateStorage(RelFileNode rnode, bool istemp)
106106
srel=smgropen(rnode);
107107
smgrcreate(srel,MAIN_FORKNUM, false);
108108

109-
if (istemp)
109+
if (!istemp)
110110
{
111111
/*
112112
* Make an XLOG entry showing the file creation. If we abort, the file
@@ -203,7 +203,7 @@ RelationTruncate(Relation rel, BlockNumber nblocks)
203203
* harmless failure to truncate, that could spell trouble at WAL replay,
204204
* into a certain PANIC.
205205
*/
206-
if (rel->rd_istemp)
206+
if (!rel->rd_istemp)
207207
{
208208
/*
209209
* Make an XLOG entry showing the file truncation.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp