Module | RR::ReplicationExtenders::PostgreSQLReplication |
In: |
lib/rubyrep/replication_extenders/postgresql_replication.rb
|
Provides PostgreSQL specific functionality for database replication
Adds a big (8 byte value), auto-incrementing primary key column to the specified table.
Restores the original sequence settings. (Actually it sets the sequence increment to 1. If before, it had a different value, then the restoration will not be correct.)
Creates or replaces the replication trigger function. See create_replication_trigger for a descriptions of the params hash.
Creates a trigger to log all changes for the given table. params is a hash with all necessary information:
Removes a trigger and related trigger procedure.
Returns true if the named trigger exists for the named table.
Returns the schema prefix (including dot) that will be used by the triggers to write into the rubyrep infrastructure tables. To avoid setting the wrong prefix, it will only return a schema prefix if the current search path
Returns all unadjusted sequences of the given table. Parameters:
Return value: a hash with
Ensures that the sequences of the named table (normally the primary key column) are generated with the correct increment and offset.
hash as returned by #sequence_values for the left database
hash as returned by #sequence_values for the right database
the "gap" that is created during sequence update to avoid concurrency problems
numbers.