pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feeddatabase role for backups?
3+ messages / 3 participants
[nested] [flat]
* database role for backups?
@ 2013-05-07 02:38 kjonca@o2.pl
2013-05-07 03:30 ` Re: database role for backups? Ian Lawrence Barwick <barwick@gmail.com>
2013-05-07 05:13 ` Re: database role for backups? Alvaro Herrera <alvherre@2ndquadrant.com>
0 siblings, 2 replies; 3+ messages in thread
From: kjonca@o2.pl @ 2013-05-07 02:38 UTC (permalink / raw)
To: pgsql-admin
I tried to create make backup my postrgresql cluster with amanda.
And I had to create database superuser.
I tried to create no-superuser role with only "replication" privillege,
but after run backup I got:
--8<---------------cut here---------------start------------->8---
2013-05-06 13:33:02 CEST ERROR: must be superuser to switch transaction log files
2013-05-06 13:33:02 CEST STATEMENT: SELECT file_name from pg_xlogfile_name_offset(pg_switch_xlog())
--8<---------------cut here---------------end--------------->8---
So my question is:
Can I establish postgresql role which is _not_ superuser and can execute
above statement?
KJ
PS. does news.postgresql.org work? I got 'unknown host'
--
http://blogdebart.pl/2012/06/24/hiena/
Pauca sed matura.
[Few but excellent.]
-- Gauss
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: database role for backups?
2013-05-07 02:38 database role for backups? kjonca@o2.pl
@ 2013-05-07 03:30 ` Ian Lawrence Barwick <barwick@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Ian Lawrence Barwick @ 2013-05-07 03:30 UTC (permalink / raw)
To: Kamil Jońca <kjonca@o2.pl>; +Cc: pgsql-admin
2013/5/7 Kamil Jońca <kjonca@o2.pl>:
>
> I tried to create make backup my postrgresql cluster with amanda.
> And I had to create database superuser.
>
> I tried to create no-superuser role with only "replication" privillege,
> but after run backup I got:
>
> --8<---------------cut here---------------start------------->8---
> 2013-05-06 13:33:02 CEST ERROR: must be superuser to switch transaction log files
> 2013-05-06 13:33:02 CEST STATEMENT: SELECT file_name from pg_xlogfile_name_offset(pg_switch_xlog())
> --8<---------------cut here---------------end--------------->8---
>
> So my question is:
> Can I establish postgresql role which is _not_ superuser and can execute
> above statement?
No, pg_switch_xlog() can only be executed by a superuser (see:
http://www.postgresql.org/docs/current/static/functions-admin.html )
The "createuser" example shown in the Amanda docs specifies the "-s" flag
for creating an Amanda backup user, which means the user will need to be
a superuser:
http://wiki.zmanda.com/index.php/How_To:Use_Amanda_to_Back_Up_PostgreSQL
I don't think the "replication" privilege is needed.
Regards
Ian Barwick
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: database role for backups?
2013-05-07 02:38 database role for backups? kjonca@o2.pl
@ 2013-05-07 05:13 ` Alvaro Herrera <alvherre@2ndquadrant.com>
1 sibling, 0 replies; 3+ messages in thread
From: Alvaro Herrera @ 2013-05-07 05:13 UTC (permalink / raw)
To: Kamil Jońca <kjonca@o2.pl>; +Cc: pgsql-admin
Kamil Jońca wrote:
> PS. does news.postgresql.org work? I got 'unknown host'
Not anymore.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2013-05-07 05:13 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-05-07 02:38 database role for backups? kjonca@o2.pl
2013-05-07 03:30 ` Ian Lawrence Barwick <barwick@gmail.com>
2013-05-07 05:13 ` Alvaro Herrera <alvherre@2ndquadrant.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox