class NixAdm::PostgreSQL::Replication::Node

Public Class Methods

new(host, config_file=nil) click to toggle source
# File src/lib/nixadm/db/postgresql.rb, line 13
def initialize(host, config_file=nil)
  @host = host
  @db   = connectDb(host, config_file)

  if @db.nil?
    raise "Connection failed to #{host}"
  end

  logSystemInit(config_file)
  @logfields[:system] = 'psql'
end

Public Instance Methods

status() click to toggle source
# File src/lib/nixadm/db/postgresql.rb, line 25
def status()
  return @db.exec('select * from pg_stat_replication')
end