Skip to content

Commit 00c8d9e

Browse files
committed
test pathman_config_params' trigger
1 parent 15df517 commit 00c8d9e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/concurrent_partitioning_test.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,33 @@ def test_replication(self):
105105
node.psql('postgres', 'explain (costs off) select * from abc'),
106106
replica.psql('postgres', 'explain (costs off) select * from abc')
107107
)
108+
self.assertEqual(
109+
node.psql('postgres', 'select * from abc'),
110+
replica.psql('postgres', 'select * from abc')
111+
)
112+
self.assertEqual(
113+
node.execute('postgres', 'select count(*) from abc')[0][0],
114+
300000
115+
)
116+
117+
# check that direct UPDATE in pathman_config_params invalidates
118+
# cache
119+
node.psql(
120+
'postgres',
121+
'update pathman_config_params set enable_parent = false')
122+
self.catchup_replica(node, replica)
123+
self.assertEqual(
124+
node.psql('postgres', 'explain (costs off) select * from abc'),
125+
replica.psql('postgres', 'explain (costs off) select * from abc')
126+
)
127+
self.assertEqual(
128+
node.psql('postgres', 'select * from abc'),
129+
replica.psql('postgres', 'select * from abc')
130+
)
131+
self.assertEqual(
132+
node.execute('postgres', 'select count(*) from abc')[0][0],
133+
0
134+
)
108135

109136
if __name__ == "__main__":
110137
unittest.main()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy