|Product:||Syniti Data Replication, DBMoto|
|Summary:||How to improve performance by using the BulkInsert setting for replications to PostgreSQL|
If replicating with PostgresSQL, use the .NET provider recommended by PostgreSQL. Syniti DR/DBMoto supports use of the Bulk Insert feature to increase performance when replicating to PostgreSQL databases. To use the Bulk Insert feature:
- If using any .NET provider version other than 188.8.131.52, specify the "newVersion" in the DBReplicator.exe.config file (located in the Syniti DR/DBMoto install folder) as follows:
<assemblyIdentity name="Npgsql" publicKeyToken="5d8b90d52f46fda7" culture="neutral"
<bindingRedirect oldVersion="184.108.40.206" newVersion="220.127.116.11"></bindingRedirect>
- Install the driver DLL using the Microsoft Global Assembly Cache Tool (GAC). If the provider is not registered, you will receive the following error when attempting to use the provider:
Error creating the command for writing to the target (Replication: 'EMP1' - Target table: 'public.test1')
System.IO.FileNotFoundException: Could not load file or assembly 'Npgsql, Version=18.104.22.168, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7' or one of its dependencies. The system cannot find the file specified.
File name: 'Npgsql, Version=22.214.171.124, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7'
The commands for installing the PostgreSQL DLLs are as follows when running from the location where the GAC is installed:
gacutil.exe -i C:\Npgsql-2.2.3-net40\Npgsql.dll
gacutil.exe -i C:\Npgsql-2.2.3-net40\Mono.Security.dll
- In the Replication Properties dialog, after setting up source and target connections, set the Refresh Options BulkInsert and Block Size.