create a postgresql service template and use it in services