[DBIx-Class-Devel] [dbsrgits/dbix-class] PostgreSQL hot-standby replication support (#103)
Dagfinn Ilmari Mannsåker
notifications at github.com
Fri Apr 22 11:07:06 GMT 2016
> @@ -237,6 +237,23 @@ sub deployment_statements {
> $self->next::method($schema, $type, $version, $dir, $sqltargs, @rest);
> }
>
> +sub is_replicating {
> + my $repl = 'select pg_last_xlog_receive_location() AS replicating';
Even simpler:
```perl
return scalar shift->_get_dbh->selectrow_array('select pg_last_xlog_receive_location() is not null');`
```
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/dbix-class/pull/103/files/1d94cafa05d78d11b6e89d3fb3ca5288e88729f1#r60723533
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20160422/a66efbab/attachment.htm>
More information about the DBIx-Class-Devel
mailing list