77 * Portions Copyright (c) 1994, Regents of the University of California
88 *
99 * IDENTIFICATION
10- * $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.24 2006/10/04 00:29:49 momjian Exp $
10+ * $PostgreSQL: pgsql/src/backend/access/transam/twophase.c,v 1.25 2006/10/06 17:13:58 petere Exp $
1111 *
1212 * NOTES
1313 * Each global transaction is associated with a global transaction
@@ -866,7 +866,7 @@ EndPrepare(GlobalTransaction gxact)
866866 if (fd < 0 )
867867 ereport (ERROR ,
868868 (errcode_for_file_access (),
869- errmsg ("could not create twophase state file \"%s\": %m" ,
869+ errmsg ("could not create two-phase state file \"%s\": %m" ,
870870 path )));
871871
872872 /* Write data to file, and calculate CRC as we pass over it */
@@ -880,7 +880,7 @@ EndPrepare(GlobalTransaction gxact)
880880 close (fd );
881881 ereport (ERROR ,
882882 (errcode_for_file_access (),
883- errmsg ("could not write twophase state file: %m" )));
883+ errmsg ("could not write two-phase state file: %m" )));
884884 }
885885 }
886886
@@ -897,7 +897,7 @@ EndPrepare(GlobalTransaction gxact)
897897 close (fd );
898898 ereport (ERROR ,
899899 (errcode_for_file_access (),
900- errmsg ("could not write twophase state file: %m" )));
900+ errmsg ("could not write two-phase state file: %m" )));
901901 }
902902
903903 /* Back up to prepare for rewriting the CRC */
@@ -906,7 +906,7 @@ EndPrepare(GlobalTransaction gxact)
906906 close (fd );
907907 ereport (ERROR ,
908908 (errcode_for_file_access (),
909- errmsg ("could not seek in twophase state file: %m" )));
909+ errmsg ("could not seek in two-phase state file: %m" )));
910910 }
911911
912912 /*
@@ -946,13 +946,13 @@ EndPrepare(GlobalTransaction gxact)
946946 close (fd );
947947 ereport (ERROR ,
948948 (errcode_for_file_access (),
949- errmsg ("could not write twophase state file: %m" )));
949+ errmsg ("could not write two-phase state file: %m" )));
950950 }
951951
952952 if (close (fd ) != 0 )
953953 ereport (ERROR ,
954954 (errcode_for_file_access (),
955- errmsg ("could not close twophase state file: %m" )));
955+ errmsg ("could not close two-phase state file: %m" )));
956956
957957 /*
958958 * Mark the prepared transaction as valid. As soon as xact.c marks MyProc
@@ -1022,7 +1022,7 @@ ReadTwoPhaseFile(TransactionId xid)
10221022 {
10231023 ereport (WARNING ,
10241024 (errcode_for_file_access (),
1025- errmsg ("could not open twophase state file \"%s\": %m" ,
1025+ errmsg ("could not open two-phase state file \"%s\": %m" ,
10261026 path )));
10271027 return NULL ;
10281028 }
@@ -1036,7 +1036,7 @@ ReadTwoPhaseFile(TransactionId xid)
10361036 close (fd );
10371037 ereport (WARNING ,
10381038 (errcode_for_file_access (),
1039- errmsg ("could not stat twophase state file \"%s\": %m" ,
1039+ errmsg ("could not stat two-phase state file \"%s\": %m" ,
10401040 path )));
10411041 return NULL ;
10421042 }
@@ -1067,7 +1067,7 @@ ReadTwoPhaseFile(TransactionId xid)
10671067 close (fd );
10681068 ereport (WARNING ,
10691069 (errcode_for_file_access (),
1070- errmsg ("could not read twophase state file \"%s\": %m" ,
1070+ errmsg ("could not read two-phase state file \"%s\": %m" ,
10711071 path )));
10721072 pfree (buf );
10731073 return NULL ;
@@ -1128,7 +1128,7 @@ FinishPreparedTransaction(const char *gid, bool isCommit)
11281128 if (buf == NULL )
11291129 ereport (ERROR ,
11301130 (errcode (ERRCODE_DATA_CORRUPTED ),
1131- errmsg ("twophase state file for transaction %u is corrupt" ,
1131+ errmsg ("two-phase state file for transaction %u is corrupt" ,
11321132 xid )));
11331133
11341134 /*
@@ -1250,7 +1250,7 @@ RemoveTwoPhaseFile(TransactionId xid, bool giveWarning)
12501250 if (errno != ENOENT || giveWarning )
12511251 ereport (WARNING ,
12521252 (errcode_for_file_access (),
1253- errmsg ("could not remove twophase state file \"%s\": %m" ,
1253+ errmsg ("could not remove two-phase state file \"%s\": %m" ,
12541254 path )));
12551255}
12561256
@@ -1279,7 +1279,7 @@ RecreateTwoPhaseFile(TransactionId xid, void *content, int len)
12791279 if (fd < 0 )
12801280 ereport (ERROR ,
12811281 (errcode_for_file_access (),
1282- errmsg ("could not recreate twophase state file \"%s\": %m" ,
1282+ errmsg ("could not recreate two-phase state file \"%s\": %m" ,
12831283 path )));
12841284
12851285 /* Write content and CRC */
@@ -1288,14 +1288,14 @@ RecreateTwoPhaseFile(TransactionId xid, void *content, int len)
12881288 close (fd );
12891289 ereport (ERROR ,
12901290 (errcode_for_file_access (),
1291- errmsg ("could not write twophase state file: %m" )));
1291+ errmsg ("could not write two-phase state file: %m" )));
12921292 }
12931293 if (write (fd , & statefile_crc , sizeof (pg_crc32 )) != sizeof (pg_crc32 ))
12941294 {
12951295 close (fd );
12961296 ereport (ERROR ,
12971297 (errcode_for_file_access (),
1298- errmsg ("could not write twophase state file: %m" )));
1298+ errmsg ("could not write two-phase state file: %m" )));
12991299 }
13001300
13011301 /*
@@ -1307,13 +1307,13 @@ RecreateTwoPhaseFile(TransactionId xid, void *content, int len)
13071307 close (fd );
13081308 ereport (ERROR ,
13091309 (errcode_for_file_access (),
1310- errmsg ("could not fsync twophase state file: %m" )));
1310+ errmsg ("could not fsync two-phase state file: %m" )));
13111311 }
13121312
13131313 if (close (fd ) != 0 )
13141314 ereport (ERROR ,
13151315 (errcode_for_file_access (),
1316- errmsg ("could not close twophase state file: %m" )));
1316+ errmsg ("could not close two-phase state file: %m" )));
13171317}
13181318
13191319/*
@@ -1390,7 +1390,7 @@ CheckPointTwoPhase(XLogRecPtr redo_horizon)
13901390 }
13911391 ereport (ERROR ,
13921392 (errcode_for_file_access (),
1393- errmsg ("could not open twophase state file \"%s\": %m" ,
1393+ errmsg ("could not open two-phase state file \"%s\": %m" ,
13941394 path )));
13951395 }
13961396
@@ -1399,14 +1399,14 @@ CheckPointTwoPhase(XLogRecPtr redo_horizon)
13991399 close (fd );
14001400 ereport (ERROR ,
14011401 (errcode_for_file_access (),
1402- errmsg ("could not fsync twophase state file \"%s\": %m" ,
1402+ errmsg ("could not fsync two-phase state file \"%s\": %m" ,
14031403 path )));
14041404 }
14051405
14061406 if (close (fd ) != 0 )
14071407 ereport (ERROR ,
14081408 (errcode_for_file_access (),
1409- errmsg ("could not close twophase state file \"%s\": %m" ,
1409+ errmsg ("could not close two-phase state file \"%s\": %m" ,
14101410 path )));
14111411 }
14121412
@@ -1462,7 +1462,7 @@ PrescanPreparedTransactions(void)
14621462 if (TransactionIdFollowsOrEquals (xid , origNextXid ))
14631463 {
14641464 ereport (WARNING ,
1465- (errmsg ("removing future twophase state file \"%s\"" ,
1465+ (errmsg ("removing future two-phase state file \"%s\"" ,
14661466 clde -> d_name )));
14671467 RemoveTwoPhaseFile (xid , true);
14681468 continue ;
@@ -1478,7 +1478,7 @@ PrescanPreparedTransactions(void)
14781478 if (buf == NULL )
14791479 {
14801480 ereport (WARNING ,
1481- (errmsg ("removing corrupt twophase state file \"%s\"" ,
1481+ (errmsg ("removing corrupt two-phase state file \"%s\"" ,
14821482 clde -> d_name )));
14831483 RemoveTwoPhaseFile (xid , true);
14841484 continue ;
@@ -1489,7 +1489,7 @@ PrescanPreparedTransactions(void)
14891489 if (!TransactionIdEquals (hdr -> xid , xid ))
14901490 {
14911491 ereport (WARNING ,
1492- (errmsg ("removing corrupt twophase state file \"%s\"" ,
1492+ (errmsg ("removing corrupt two-phase state file \"%s\"" ,
14931493 clde -> d_name )));
14941494 RemoveTwoPhaseFile (xid , true);
14951495 pfree (buf );
@@ -1566,7 +1566,7 @@ RecoverPreparedTransactions(void)
15661566 if (TransactionIdDidCommit (xid ) || TransactionIdDidAbort (xid ))
15671567 {
15681568 ereport (WARNING ,
1569- (errmsg ("removing stale twophase state file \"%s\"" ,
1569+ (errmsg ("removing stale two-phase state file \"%s\"" ,
15701570 clde -> d_name )));
15711571 RemoveTwoPhaseFile (xid , true);
15721572 continue ;
@@ -1577,7 +1577,7 @@ RecoverPreparedTransactions(void)
15771577 if (buf == NULL )
15781578 {
15791579 ereport (WARNING ,
1580- (errmsg ("removing corrupt twophase state file \"%s\"" ,
1580+ (errmsg ("removing corrupt two-phase state file \"%s\"" ,
15811581 clde -> d_name )));
15821582 RemoveTwoPhaseFile (xid , true);
15831583 continue ;
0 commit comments