Create pgpool functions and insert lock table.