fix postgres grant script

Message ID
State Accepted
Headers show

Commit Message

Simo Sorce Oct. 25, 2012, 3:08 a.m.
On Thu, 2012-10-25 at 09:05 +0800, Jeremy Kerr wrote:
> Hi Simo,
> >> Current script fails with a rollback because one of the recently added
> >> sequences does not exist in the db.
> >
> > Ops sorry,
> > attached correct patch without trailing , that makes psql balk
> Awesome, thank you for the patch. Could you send a Signed-off-by: line too?

Ah sorry, attached.

> > also I noticed that you use nobody for the mail server user and later in
> > the INSTALL doc you hint that you are using postfix.
> > On both Debian and Fedora the postfix user is 'postfix', would you like
> > a patch to change docs and grant script from 'nobody' -> 'postfix' ?
> On the Debian machine running, the mail delivery 
> seems to be done as 'nobody', as per the docs. Do the default grants not 
> work for you?

No I checked the postfix user there then simply created straight away
the 'postfix' user and not the nobody user.
However in the end I decided to use a .procmailrc file to dispatch mail
so I can keep around mail that is not bound to a project.
I think this way all the actions happen as the 'patchwork' user anyway.



From baf11a04b70ebc679301791bed4d092e2df21cd7 Mon Sep 17 00:00:00 2001
From: Simo Sorce <>
Date: Wed, 24 Oct 2012 18:07:00 -0400
Subject: [PATCH] Fix grant script

patchwork_patchchangenotification_id_seq does not exist,
so running this script simply fails with a rollback

Signed-off-by: Simo Sorce <>
 lib/sql/grant-all.postgres.sql | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/sql/grant-all.postgres.sql b/lib/sql/grant-all.postgres.sql
index 72abb57..926d5d3 100644
--- a/lib/sql/grant-all.postgres.sql
+++ b/lib/sql/grant-all.postgres.sql
@@ -46,8 +46,7 @@  GRANT SELECT, UPDATE ON
-	patchwork_userprofile_maintainer_projects_id_seq,
-	patchwork_patchchangenotification_id_seq
+	patchwork_userprofile_maintainer_projects_id_seq
 TO "www-data";
 -- allow the mail user (in this case, 'nobody') to add patches