Andy Colson <andy@xxxxxxxxxxxxxxx> writes: > now now we have a membership record (100), but no customer record. I haven't really been following this thread, but: isn't the answer to that to establish a foreign-key constraint? If there's an FK then the database will provide sufficient row locking to prevent you from deleting a row that someone else is in the midst of creating a reference to. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general