This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <libpq-fe.h> | |
#include <sys/time.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <string.h> | |
// channel to LISTEN on | |
const char *listenChannel = "foo"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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[]; |
NewerOlder