We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parentcd292bd commit2edd41bCopy full SHA for 2edd41b
contrib/mmts/pglogical_apply.c
@@ -662,7 +662,7 @@ process_remote_commit(StringInfo in)
662
casePGLOGICAL_PREPARE:
663
{
664
Assert(IsTransactionState()&&TransactionIdIsValid(MtmGetCurrentTransactionId()));
665
-gid=pq_getmsgstring(in);
+gid=pstrdup(pq_getmsgstring(in));/* in case of spilling large transaction to the file, message body will be deallocated, so copy it */
666
if (MtmExchangeGlobalTransactionStatus(gid,TRANSACTION_STATUS_IN_PROGRESS)==TRANSACTION_STATUS_ABORTED) {
667
MTM_LOG1("Avoid prepare of previously aborted global transaction %s",gid);
668
AbortCurrentTransaction();