Actualizando registros desde SQL Server 2012 a Postgres 9.2 via Linked Server

Al ejecutar una consulta dentro de una transacción distribuida como la siguiente se presenta un error 8522, esto se debe a que en la configuración de postgres falta activar las transacciones preparadas.

La consulta a probar:

SET XACT_ABORT ON

BEGIN DISTRIBUTED TRANSACTION

update [LinkedServer].[Base].[esquema].tabla
set
fecha_delete = '20131021',
version = version + 1
where id = 1

COMMIT

El mensaje de error obtenido:

Msg 8522, Level 18, State 1, Line 1
Microsoft Distributed Transaction Coordinator (MS DTC) 
ha detenido esta transacción.

Extracto de la nota que me llevo a revisar la configuración de postgres:

Finally!!!! the problem was with:

2.6.3 Enabling prepared transactions in PostgreSQL

Some later versions of PostgreSQL have prepared transactions disabled by default.
To enable the prepared transactions, edit postgresql.conf file as described below.
Open the postgresql.conf file in editor and find line with <b>max_prepared_transactions</b> parameter (if missing, new line can be added). Uncomment the line by removing ‘#’ symbol in front and set the parameter equal to maximum allowed number of connections or more, e.g.

max_prepared_transactions = 100;
# zero disables the feature

Restart PostgreSQL Server.
( services postgresql-9.2 restart )

tnks a lot ^^

Fuente pgoledb.com
Manual de postgres con info adicional: postgresql.org