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
extern crate postgres; | |
use postgres::{Connection,SslMode}; | |
use std::sync::mpsc::{channel,Receiver,TryRecvError}; | |
use std::thread; | |
#[test] | |
fn test_upsert_delete_mvcc_voodoo() { | |
// This tests an upsert+delete technique to replace a set of rows with | |
// another set of rows. The intended use case is to replicate an external |
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
select | |
object, | |
case "lock requested" | |
when 'AccessExclusiveLock' then 'access exclusive' | |
when 'ExclusiveLock' then 'exclusive' | |
when 'ShareRowExclusiveLock' then 'share row exclusive' | |
when 'ShareLock' then 'share' | |
when 'ShareUpdateExclusiveLock' then 'share update exclusive' | |
when 'RowExclusiveLock' then 'row exclusive' | |
when 'RowShareLock' then 'row share' |