Fake async rep target

From: james <james(at)mansionfamily(dot)plus(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Fake async rep target
Date: 2012-05-29 19:46:14
Message-ID: 4FC52786.2050207@mansionfamily.plus.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

How easy would it be to implement a fake async rep target?

Perhaps even as something that a server could allow a connection to
request? (ie a suitably permissioned connection could convert itself to
receive n async replication stream, rather than being statically
configured?)

I know that it sounds a bit bonkers, but a while back I worked on a
system where we configured a rep target (using OpenServer) we could
observe changes to tables and enqueue secondary processing. Rather
painful in that case because of the way that repserver is configured,
and I'm not sure it was worth the pain when configuring test and dev
environments.

However, in principle, it seems that this is quite an elegant standing
for a whole raft of trigger functions - and probably a lot cheaper to
execute. The key, I think, is to be able to allow dynamic attachment of
such a 'change feed' by an account that has god-like read access.

Is the existing async rep code amenable to this sort of abuse?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-05-29 20:10:41 Re: pg_upgrade libraries check
Previous Message Tom Lane 2012-05-29 19:42:30 Re: GiST buffering build, bug in levelStep calculation