[GENERAL] Cannot recover from backup on barman

2017-01-02 Thread Alfredo Palhares
Hello everyone,

I need to recover some partial data from a old backup.

The recover went smoothly up until the time to start the server, I cannot
start the server.

LOG:  invalid primary checkpoint record
LOG:  invalid secondary checkpoint record
PANIC:  could not locate a valid checkpoint record
LOG:  startup process (PID 30975) was terminated by signal 6: Aborted


Well after some research, I was suggested to use the pg_resetxlog tool from
postgres-xc, but people also advise against it.

Can anyone show me how to properly identify the problem with my backup? I
am also worried that my backups are not being properly made.

Regards,
Alfredo Palhares


Fwd: [GENERAL] Cannot recover from backup on barman

2017-01-04 Thread Alfredo Palhares
Sorry this message got out of the list.
-- Forwarded message --
From: Alfredo Palhares 
Date: Wed, Jan 4, 2017 at 11:59 AM
Subject: Re: [GENERAL] Cannot recover from backup on barman
To: Michael Paquier 


Hello Michael,


I don't understand why Postgres-XC is part of this discussion as
> pg_resetxlog is part of PostgreSQL.


Well I did an apt-file search pg_resetxlog and this is what I found:
manpages-zh: /usr/share/man/zh_CN/man1/pg_resetxlog.1.gz
manpages-zh: /usr/share/man/zh_TW/man1/pg_resetxlog.1.gz
postgres-xc: /usr/bin/pg_resetxlog
postgres-xc: /usr/share/locale/cs/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/de/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/es/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/fr/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/it/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/ja/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/ko/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/pl/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/pt_BR/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/ro/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/ru/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/tr/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/zh_CN/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/locale/zh_TW/LC_MESSAGES/pg_resetxlog-9.2.mo
postgres-xc: /usr/share/man/man1/pg_resetxlog.1.gz
postgres-xc-dbg: /usr/lib/debug/usr/bin/pg_resetxlog
postgresql-9.3: /usr/lib/postgresql/9.3/bin/pg_resetxlog
postgresql-9.3: /usr/share/postgresql/9.3/man/man1/pg_resetxlog.1.gz
postgresql-9.3-dbg: /usr/lib/debug/usr/lib/postgresql/9.3/bin/pg_resetxlog

I did use barman recover to recover the directory.

The backup_label file is there, and these are the contents:

START WAL LOCATION: 1BE/7BA0 (file 000101BE007B)
CHECKPOINT LOCATION: 1BE/7B6CB130
BACKUP METHOD: pg_start_backup
BACKUP FROM: master
START TIME: 2016-10-26 08:01:46 UTC
LABEL: Barman backup thingie 20161026T080002

Where should I look for said file to check if its there,

On Tue, Jan 3, 2017 at 12:52 PM, Michael Paquier 
wrote:

> On Tue, Jan 3, 2017 at 12:20 AM, Alfredo Palhares 
> wrote:
> > Well after some research, I was suggested to use the pg_resetxlog tool
> from
> > postgres-xc, but people also advise against it.
>
>
> > Can anyone show me how to properly identify the problem with my backup?
> I am
> > also worried that my backups are not being properly made.
>
> You may want to see that with the maintainers of barman, they are
> likely looking at this list. But here is a guess: the backup_label
> file has been removed.
> --
> Michael
>


[GENERAL] Tips on maintaining several pg_hba files

2017-01-25 Thread Alfredo Palhares
Hello everyone,

I have a PostgreSQL cluster with several ROLES that access the node
according to his state.

On the master node, I only want the roles that need to write and the admins.
On the synchronous node   i would  want only roles with read access that
require the most up to date data, and the admins
On the asynchronous node allow roles with read acess, and users to debug
the system.


So I will probably bee templating the pg_hba.conf file since there are
common roles between the systems.
Do you guys have any suggestions on this? Links?

Does pg_hba support to include files?


Regards,
Alfredo Palhares