Re: How to use pg_waldump?

2020-05-01 Thread Alvaro Herrera
On 2020-May-01, André Hänsel wrote: > Paul Förster wrote: > > > maybe try with another WAL file or files? > > > > Works for me... > > Ok, I tried it with all the files in the pg_wal directory and it > worked with one: the first one (lexicographically/hex). The other files have not yet been wri

Re: Checking for Presence of Required Libraries Fails during PostgreSQL Upgrade

2020-05-01 Thread Adrian Klaver
On 5/1/20 3:39 PM, TalGloz wrote: Adrian Klaver-4 wrote Why not compile them against 11? Then follow step 5) here: https://www.postgresql.org/docs/12/pgupgrade.html Step 5 doesn’t actually say how to compile them during the upgrade process it just gives a warning about not to use "CREATE EXT

Re: Checking for Presence of Required Libraries Fails during PostgreSQL Upgrade

2020-05-01 Thread TalGloz
Adrian Klaver-4 wrote > Why not compile them against 11? > > Then follow step 5) here: > > https://www.postgresql.org/docs/12/pgupgrade.html Step 5 doesn’t actually say how to compile them during the upgrade process it just gives a warning about not to use "CREATE EXTENSION my_lib" because this

Re: Checking for Presence of Required Libraries Fails during PostgreSQL Upgrade

2020-05-01 Thread Bruce Momjian
On Fri, May 1, 2020 at 03:03:36PM -0700, TalGloz wrote: > I'm trying to upgrade my PostgreSQL form 10.2 to 11.7 (and eventually to > 12.x), when I run: FYI, you can go from PG 10 to 12 directly, without doing PG 11. --- >

Re: Checking for Presence of Required Libraries Fails during PostgreSQL Upgrade

2020-05-01 Thread Adrian Klaver
On 5/1/20 3:03 PM, TalGloz wrote: I'm trying to upgrade my PostgreSQL form 10.2 to 11.7 (and eventually to 12.x), when I run: /usr/pgsql-11/bin/pg_upgrade --old-bindir=/usr/pgsql-10/bin/ --new-bindir=/usr/pgsql-11/bin/ --old-datadir=/var/lib/pgsql/10/data --new-datadir=/var/lib/pgsql/11/data -

Checking for Presence of Required Libraries Fails during PostgreSQL Upgrade

2020-05-01 Thread TalGloz
I'm trying to upgrade my PostgreSQL form 10.2 to 11.7 (and eventually to 12.x), when I run: /usr/pgsql-11/bin/pg_upgrade --old-bindir=/usr/pgsql-10/bin/ --new-bindir=/usr/pgsql-11/bin/ --old-datadir=/var/lib/pgsql/10/data --new-datadir=/var/lib/pgsql/11/data --check I get: Checking for presence

Re: Pgbackrest restore options

2020-05-01 Thread David Steele
On 4/17/20 2:38 AM, Konireddy Rajashekar wrote: Doubt regarding the backrest restore options, is there any way to ensure the backups are good as expected, instead of restoring the whole cluster or database is there any other possibility to ensure it by restoring a single file?  or any other s

Re: How to use pg_waldump?

2020-05-01 Thread Paul Förster
Hi André, > On 01. May, 2020, at 16:03, André Hänsel wrote: > > 11.7-2.pgdg18 is this Ubuntu? A pre-packaged version? I use openSUSE as a dedicated server and, as said, compiled on that machine. Did you try an 11.7 compiled from source on that machine? I always recommend this. :-) Cheers, P

RE: How to use pg_waldump?

2020-05-01 Thread André Hänsel
Paul Förster wrote: > strange. Bug? I don't know. > > What is your PostgreSQL version? Mine is 12.2 compiled from source on the > machine it runs on. 11.7-2.pgdg18

Re: How to use pg_waldump?

2020-05-01 Thread Paul Förster
Hi André, > On 01. May, 2020, at 15:46, André Hänsel wrote: > > Ok, I tried it with all the files in the pg_wal directory and it worked with > one: the first one (lexicographically/hex). strange. Bug? I don't know. What is your PostgreSQL version? Mine is 12.2 compiled from source on the mac

RE: How to use pg_waldump?

2020-05-01 Thread André Hänsel
Paul Förster wrote: > maybe try with another WAL file or files? > > Works for me... Ok, I tried it with all the files in the pg_wal directory and it worked with one: the first one (lexicographically/hex).

Re: How to use pg_waldump?

2020-05-01 Thread Paul Förster
Hi André, > On 01. May, 2020, at 14:33, André Hänsel wrote: > > Picking a random WAL file and running the command gives me: > > pg_waldump: FATAL: could not find a valid record after 2F/6C00 maybe try with another WAL file or files? Works for me... postgres@weasel:~$ pg_waldump -p /data

RE: How to use pg_waldump?

2020-05-01 Thread André Hänsel
Paul Förster wrote: > try: > > pg_waldump -p /var/lib/postgresql/11/main/pg_wal [] > > where is the name of the WAL file to start and (optionally) > is the WAL file to stop. It reads and shows all information of the > WAL files in this range. Picking a random WAL file and running the comma

Re: How to use pg_waldump?

2020-05-01 Thread Paul Förster
Hi André, > On 01. May, 2020, at 12:47, André Hänsel wrote: > > I知 using pgBackRest for incremental backups which, as far as I understand, > use the WAL. These backups are relatively large, so I wanted to take a look > at my WAL. I understand pg_waldump is the tool for this. > > However, I stru

How to use pg_waldump?

2020-05-01 Thread André Hänsel
I’m using pgBackRest for incremental backups which, as far as I understand, use the WAL. These backups are relatively large, so I wanted to take a look at my WAL. I understand pg_waldump is the tool for this. However, I struggle with its usage. The --help output suggests all command line paramete

Re: pg_stat_statements : how to catch non successfully finished statements ?

2020-05-01 Thread legrand legrand
Tom Lane-2 wrote > legrand legrand < > legrand_legrand@ > > writes: >> Tom Lane-2 wrote >>> The hard part here is that you have to be really careful what you do in >>> a PG_CATCH block, because the only thing you know for sure about the >>> backend's state is that it's not good. Catalog fetches

Re: How to move a 11.4 cluster to another Linux host, but empty?

2020-05-01 Thread Paul Förster
Hi Matthias, > On 01. May, 2020, at 10:31, Matthias Apitz wrote: > > I don't. The software is below > > /usr/local/sisis-pap/pgsql > > and the cluster is below > > /data/postgres11.4/data. in this case, all you'd have to do is: tar cvf software.tar /usr/local/sisis-pap/pgsql to only copy

Re: How to move a 11.4 cluster to another Linux host, but empty?

2020-05-01 Thread Matthias Apitz
Hi Paul, El día viernes, mayo 01, 2020 a las 10:23:37a. m. +0200, Paul Förster escribió: > > you may have a look at the tar man page. tar in Linux has the > --exclude=PATTERN option. I do know the man page(s) of tar ant the --exclude=PATTERN. > You may specify the PGDATA directory there. Thi

Re: How to move a 11.4 cluster to another Linux host, but empty?

2020-05-01 Thread Paul Förster
Hi Matthias, > On 01. May, 2020, at 10:10, Matthias Apitz wrote: > > > Hello, > > I've a 11.4 cluster on a Linux host with 3 production database, all > below /data/postgresql11.4/ (i.e. the cluster itself is > /data/postgresql11.4/data) fully configured an running fine. I want to > move it "co

How to move a 11.4 cluster to another Linux host, but empty?

2020-05-01 Thread Matthias Apitz
Hello, I've a 11.4 cluster on a Linux host with 3 production database, all below /data/postgresql11.4/ (i.e. the cluster itself is /data/postgresql11.4/data) fully configured an running fine. I want to move it "cold" (i.e. when it is shutdown) by tar to another host, BUT without the database (du