-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RecordVersionSynchroniseSlave doesn't work with blobs and PostgreSQL #147
Comments
Could you investigate a little and find out what actually happens? |
Batch prepared correct, but something happened in BatchSend, i suppose, because i've got error when step-by-step debug "TSqlDBPostgresStatement.ExecutePrepared: Invalid array type ftBlob on bound parameter #3" (it is one of my blob fields) "in mormot.db.sql.postgres.pas line 656" |
Please try with this last commit. |
It works now, but only if there is no deleted rows. If i have any deleted row - table doesn't synchronise at all. |
I am not able to reproduce this behavior. |
I create some orms on master Then synchronise from master (sqlite) to slave (postgresql) (calling RecordVersionSynchroniseSlave from slave). If i only create TOrm on master (do not delete) - synchronise works ok |
In step-by-step debug i've got error Maybe it's because in prepared for sending batch i see in JSON that DELETE goes before all other lines? But this record cannot be deleted, it doesn't exist on slave server yet. |
fails on TRestOrmServerBatchSend.AutomaticCommit after sequence POST-POST-POST-POST-DELETE-POST if ID for delete doesn't exists. Can't find out reason yet. No error message except "TSqlDBPostgresConnectionProperties.SharedTransaction( )" upd: If i comment whole part for encDelete in TRestOrmServerBatchSend.ExecuteValue it fails too with the same exception |
Sorry for the late reaction. What does "if ID for delete does not exist" mean in your case? |
I mean that record was deleted only on master db, it doesn't exist on slave db (sync was made after modifications on master db as i wrote before) |
RecordVersionSynchroniseSlave doesn't synchronize tables with blob fields if SLAVE db is PostgreSQL (tested with mormot.db.sql.postgres).
It affect only with synchronisation. If i use PostgreSQL on master server, saving blobs works ok. Synchronisation works ok too if slave db is sqlite.
The text was updated successfully, but these errors were encountered: