@@ -1355,14 +1355,17 @@ ReorderBufferCommit(ReorderBuffer *rb, TransactionId xid,
13551355change -> data .tp .oldtuple == NULL )
13561356continue ;
13571357else if (reloid == InvalidOid )
1358- elog (ERROR ,"could not lookup relation %s" ,
1359- relpathperm (change -> data .tp .relnode ,MAIN_FORKNUM ));
1358+ elog (ERROR ,"could not map filenode \"%s\" to relation OID" ,
1359+ relpathperm (change -> data .tp .relnode ,
1360+ MAIN_FORKNUM ));
13601361
13611362relation = RelationIdGetRelation (reloid );
13621363
13631364if (relation == NULL )
1364- elog (ERROR ,"could open relation descriptor %s" ,
1365- relpathperm (change -> data .tp .relnode ,MAIN_FORKNUM ));
1365+ elog (ERROR ,"could not open relation with OID %u (for filenode \"%s\")" ,
1366+ reloid ,
1367+ relpathperm (change -> data .tp .relnode ,
1368+ MAIN_FORKNUM ));
13661369
13671370if (RelationIsLogicallyLogged (relation ))
13681371{
@@ -1475,7 +1478,7 @@ ReorderBufferCommit(ReorderBuffer *rb, TransactionId xid,
14751478
14761479/* this is just a sanity check against bad output plugin behaviour */
14771480if (GetCurrentTransactionIdIfAny ()!= InvalidTransactionId )
1478- elog (ERROR ,"output plugin usedxid %u" ,
1481+ elog (ERROR ,"output plugin usedXID %u" ,
14791482GetCurrentTransactionId ());
14801483
14811484/* make sure there's no cache pollution */
@@ -1903,7 +1906,7 @@ ReorderBufferSerializeTXN(ReorderBuffer *rb, ReorderBufferTXN *txn)
19031906Size spilled = 0 ;
19041907char path [MAXPGPATH ];
19051908
1906- elog (DEBUG2 ,"spill %u changes intx %u to disk" ,
1909+ elog (DEBUG2 ,"spill %u changes inXID %u to disk" ,
19071910 (uint32 )txn -> nentries_mem ,txn -> xid );
19081911
19091912/* do the same to all child TXs */
@@ -2086,7 +2089,7 @@ ReorderBufferSerializeChange(ReorderBuffer *rb, ReorderBufferTXN *txn,
20862089CloseTransientFile (fd );
20872090ereport (ERROR ,
20882091(errcode_for_file_access (),
2089- errmsg ("could not write toxid %u's data file: %m" ,
2092+ errmsg ("could not write to data file for XID %u : %m" ,
20902093txn -> xid )));
20912094}
20922095
@@ -2189,7 +2192,7 @@ ReorderBufferRestoreChanges(ReorderBuffer *rb, ReorderBufferTXN *txn,
21892192else if (readBytes != sizeof (ReorderBufferDiskChange ))
21902193ereport (ERROR ,
21912194(errcode_for_file_access (),
2192- errmsg ("incomplete read from reorderbuffer spill file: read %d instead of %u" ,
2195+ errmsg ("incomplete read from reorderbuffer spill file: read %d instead of %u bytes " ,
21932196readBytes ,
21942197(uint32 )sizeof (ReorderBufferDiskChange ))));
21952198
@@ -2209,7 +2212,7 @@ ReorderBufferRestoreChanges(ReorderBuffer *rb, ReorderBufferTXN *txn,
22092212else if (readBytes != ondisk -> size - sizeof (ReorderBufferDiskChange ))
22102213ereport (ERROR ,
22112214(errcode_for_file_access (),
2212- errmsg ("could not read from reorderbuffer spill file: read %d instead of %u" ,
2215+ errmsg ("could not read from reorderbuffer spill file: read %d instead of %u bytes " ,
22132216readBytes ,
22142217(uint32 ) (ondisk -> size - sizeof (ReorderBufferDiskChange )))));
22152218
@@ -2815,7 +2818,7 @@ ApplyLogicalMappingFile(HTAB *tuplecid_data, Oid relid, const char *fname)
28152818else if (readBytes != sizeof (LogicalRewriteMappingData ))
28162819ereport (ERROR ,
28172820(errcode_for_file_access (),
2818- errmsg ("could not read file \"%s\", read %d instead of %d" ,
2821+ errmsg ("could not readfrom file \"%s\": read %d instead of %d bytes " ,
28192822path ,readBytes ,
28202823(int32 )sizeof (LogicalRewriteMappingData ))));
28212824
@@ -2928,7 +2931,7 @@ UpdateLogicalMappings(HTAB *tuplecid_data, Oid relid, Snapshot snapshot)
29282931if (sscanf (mapping_de -> d_name ,LOGICAL_REWRITE_FORMAT ,
29292932& f_dboid ,& f_relid ,& f_hi ,& f_lo ,
29302933& f_mapped_xid ,& f_create_xid )!= 6 )
2931- elog (ERROR ,"could not parsefname %s " ,mapping_de -> d_name );
2934+ elog (ERROR ,"could not parsefilename \"%s\" " ,mapping_de -> d_name );
29322935
29332936f_lsn = ((uint64 )f_hi ) <<32 |f_lo ;
29342937
@@ -2971,7 +2974,7 @@ UpdateLogicalMappings(HTAB *tuplecid_data, Oid relid, Snapshot snapshot)
29712974for (off = 0 ;off < list_length (files );off ++ )
29722975{
29732976RewriteMappingFile * f = files_a [off ];
2974- elog (DEBUG1 ,"applying mapping:%s in %u" ,f -> fname ,
2977+ elog (DEBUG1 ,"applying mapping:\"%s\" in %u" ,f -> fname ,
29752978snapshot -> subxip [0 ]);
29762979ApplyLogicalMappingFile (tuplecid_data ,relid ,f -> fname );
29772980pfree (f );