Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 027cb11

Browse files
committed
Temporary disable triggeres prohibbitting writes to shard replica
1 parent d30ca58 commit 027cb11

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

shard.sql

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -664,9 +664,8 @@ CREATE FUNCTION readonly_table_on(relation regclass)
664664
RETURNS void AS $$
665665
BEGIN
666666
-- Create go away trigger to prevent any modifications
667-
PERFORM shardman.readonly_table_off(relation);
668-
PERFORM shardman.create_modification_triggers(relation, 'shardman_readonly',
669-
'shardman.go_away()');
667+
-- PERFORM shardman.readonly_table_off(relation);
668+
-- PERFORM shardman.create_modification_triggers(relation, 'shardman_readonly', 'shardman.go_away()');
670669
END
671670
$$ LANGUAGE plpgsql STRICT;
672671
CREATE FUNCTION go_away() RETURNS TRIGGER AS $$
@@ -689,9 +688,8 @@ CREATE FUNCTION readonly_replica_on(relation regclass)
689688
BEGIN
690689
RAISE DEBUG '[SHMN] table % made read-only for all but apply workers',
691690
relation;
692-
PERFORM shardman.readonly_replica_off(relation);
693-
PERFORM shardman.create_modification_triggers(
694-
relation, 'shardman_readonly_replica', 'shardman.ror_go_away()');
691+
-- PERFORM shardman.readonly_replica_off(relation);
692+
-- PERFORM shardman.create_modification_triggers(relation, 'shardman_readonly_replica', 'shardman.ror_go_away()');
695693
END $$ LANGUAGE plpgsql STRICT;
696694
-- This function is impudent because it is used as both stmt and row trigger.
697695
-- The idea is that we must never reach RETURN NEW after stmt row trigger,

0 commit comments

Comments
 (0)