[GENERAL] Do I need archive_mode = on for hot standby?

2012-07-02 Thread Janne H
Hi there. I'm planning on setting up a master database and multiple hot standby slaves using streaming replication. If I use a large(*) value on wal_keep_segments do I really need archive_mode = on then? Any potential problems with this strategy I should be aware about? (*) With large value

[GENERAL] How can I see if my code is "concurrency safe"?

2012-04-25 Thread Janne H
Hi there! Today I realised that my knowledge concerning how postgres handles concurrency is not very good, and its even worse when it comes to using that knowledge in real-life. Let me give you an example. I have this table  create table userpositions ( userID int,  positionID int, unique (us