[Dbix-class] Review needed for proposed Pg replication enhancement

Peter Rabbitson rabbit+dbic at rabbit.us
Fri Apr 22 10:20:27 GMT 2016


On 04/22/2016 12:13 PM, Dave Howorth wrote:
>
> I know very little about this, so apologies if I am speaking out of
> turn. Is the code safe in the sense it will work if applied to an older
> PG that does not know about replication?

None of this is referenced in any way unless one is using 
::Storage::Replicated in the first place. This question is specifically 
for such users.

>
> The patch itself would be a little larger if it included some tests and
> documentation.
>

The parts are documented, they just live in a different spot: 
https://metacpan.org/pod/DBIx::Class::Storage::DBI#is_replicating. 
Specific storages can override them, which is what this patch does.

As far as testing - it would be nice of course, but it would require an 
actual replicated setup, which is fiddly business. If someone is 
interested to implement this as part of the CI here[1] and here[2] - 
feel free to take a stab at it.

[1] 
https://github.com/dbsrgits/dbix-class/blob/master/maint/travis-ci_scripts/10_before_install.bash#L132-L137
[2] 
https://github.com/dbsrgits/dbix-class/blob/master/t/storage/replicated.t#L214-L233



More information about the DBIx-Class mailing list