Skip to content

Instantly share code, notes, and snippets.

@jaredhirsch
jaredhirsch / gist:5187976
Last active December 15, 2015 02:29
@font-face links for the connect-fonts article
@jberkus
jberkus / xlog_numeric_location.sql
Last active February 20, 2016 20:30
Determine Most Caught-up Standby
-- For documentation on these functions, please see blog post at:
-- http://www.databasesoup.com/2012/10/determining-furthest-ahead-replica.html
-- determines current xlog location as a monotonically increasing numeric.
CREATE OR REPLACE FUNCTION xlog_location_numeric(vcloc text default NULL)
RETURNS numeric
LANGUAGE plpgsql
as $f$
DECLARE cloc text;
floc text[];