*** a/src/backend/commands/variable.c --- b/src/backend/commands/variable.c *************** *** 564,570 **** assign_transaction_read_only(bool newval, bool doit, GucSource source) return false; } /* Top level transaction can't change this after first snapshot. */ ! else if (FirstSnapshotSet && !IsSubTransaction()) { ereport(GUC_complaint_elevel(source), (errcode(ERRCODE_ACTIVE_SQL_TRANSACTION), --- 564,570 ---- return false; } /* Top level transaction can't change this after first snapshot. */ ! if (FirstSnapshotSet && !IsSubTransaction()) { ereport(GUC_complaint_elevel(source), (errcode(ERRCODE_ACTIVE_SQL_TRANSACTION), *************** *** 572,578 **** assign_transaction_read_only(bool newval, bool doit, GucSource source) return false; } /* Can't go to r/w mode while recovery is still active */ ! else if (newval == false && XactReadOnly && RecoveryInProgress()) { ereport(GUC_complaint_elevel(source), (errcode(ERRCODE_INVALID_PARAMETER_VALUE), --- 572,578 ---- return false; } /* Can't go to r/w mode while recovery is still active */ ! if (newval == false && XactReadOnly && RecoveryInProgress()) { ereport(GUC_complaint_elevel(source), (errcode(ERRCODE_INVALID_PARAMETER_VALUE), *************** *** 602,609 **** assign_XactIsoLevel(const char *value, bool doit, GucSource source) errmsg("SET TRANSACTION ISOLATION LEVEL must be called before any query"))); return NULL; } ! else if (IsSubTransaction() ! && strcmp(value, XactIsoLevel_string) != 0) { ereport(GUC_complaint_elevel(source), (errcode(ERRCODE_ACTIVE_SQL_TRANSACTION), --- 602,609 ---- errmsg("SET TRANSACTION ISOLATION LEVEL must be called before any query"))); return NULL; } ! /* We ignore a subtransaction setting it to the existing value. */ ! if (IsSubTransaction() && strcmp(value, XactIsoLevel_string) != 0) { ereport(GUC_complaint_elevel(source), (errcode(ERRCODE_ACTIVE_SQL_TRANSACTION),