Dave Page wrote:
> Dave Page wrote:
>>> When trying to commit/rollback a prepared transaction in a database
>>> other than 'postgres', using the "server status" dialog, I always get
>>> this error message:
>>>
>>> ERROR: prepared transaction belongs to another database
>>> HINT: Connect to the database where the transaction was prepared to
>>> finish it.
>>>
>>> Apparently the "server status" always operates with the 'postgres'
>>> database...
>>
>> Will investigate and fix.
>
> Seems this is only an issue with 8.3 Fix committed to SVN.
Really? <checks 8.2 source code>. No, that change was backpatched all
the way to 8.1 branch, which is the first release with 2PC. The check is
in src/backend/access/transam/twophase.c:
> /*
> * Note: it probably would be possible to allow committing from another
> * database; but at the moment NOTIFY is known not to work and there
> * may be some other issues as well. Hence disallow until someone
> * gets motivated to make it work.
> */
> if (MyDatabaseId != gxact->proc.databaseId)
> ereport(ERROR,
> (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
> errmsg("prepared transaction belongs to another database"),
> errhint("Connect to the database where the transaction was prepared to finish it.")));
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com