[pgpool-general: 7051] Re: Upgrade from pgpool 4.0.x to 4.1.x

Bo Peng pengbo at sraoss.co.jp
Thu May 28 11:55:49 JST 2020


Hello,

On Wed, 27 May 2020 18:13:37 +0100
Luís Alves <luisalves00 at gmail.com> wrote:

> Hi,
> 
> I had version 4.0.x working fine and tried to upgrade to version 4.1.2
> Now I cannot run the online recovery and I cannot figure out why.
> Here is my configs:
> 
> pgpool.conf:
> 
>     recovery_user = 'postgres'
>     # Online recovery user
>     recovery_password = ''
>     # Online recovery password
> 
>     recovery_1st_stage_command = 'recovery_1st_stage'
> 
> (like the documentation example)
> [node1]# su - postgres
> [node1]$ vi /var/lib/pgsql/data/recovery_1st_stage
> [node1]$ vi /var/lib/pgsql/data/pgpool_remote_start
> [node1]$ chmod +x
> /var/lib/pgsql/data/{recovery_1st_stage,pgpool_remote_start}
> 
> #I'm using custom folder instead of /var/lib/pgsql/data /11/data
> -bash-4.2$ echo $PGDATA
> /var/lib/pgsql/data
> 
> #file is present and with proper permissions
> -bash-4.2$ ll | grep recovery_1st_stage
> -rwxr-xr-x 1 postgres postgres  2708 May 26 12:54 recovery_1st_stage
> 
> #extension is also there:
> -bash-4.2$ psql template1 -c "CREATE EXTENSION pgpool_recovery"
> ERROR:  extension "pgpool_recovery" already exists

You got an error here.
In Pgpool-II 4.1, pgpool_recovery EXTENSION is updated to 1.3.

If your recovery_1st_stage script uses the latest pgpool_recovery, 
you need to update the pgpool_recovery EXTENSION version to 1.3.

If the result of the command below shows "1.2",

    -bash-4.2$ psql template1 -c "select extversion from pg_extension where extname = 'pgpool_recovery'";
     extversion 
    ------------
     1.2

you need to update the pgpool_recovery EXTENSION version to 1.3.

    -bash-4.2$ psql template1 -c "ALTER EXTENSION pgpool_recovery UPDATE TO '1.3'"

> # .pgpoolkey is on postgres home folder
> -bash-4.2$ pwd
> /var/lib/pgsql
> -bash-4.2$ ll -a | grep .pgpoolkey
> -rw-------   1 postgres postgres       15 May 27 17:13 .pgpoolkey
> 
> # pool_passwd has the correct credentials
> [root at node1 pgpool-II]# cat pool_passwd
> pgpool:AES8G1vPLHVO8dPOJrWMfl5BQ==
> postgres:AES+LJaYEZCYYD3X2eQw8++yQ==
> 
> 
> then executing:
> 
> pcp_recovery_node -w -h 10.3.84.4 -p 9898 -U pgpool -n 1
> 
> gives this output in the log
> 
> 2020-05-27 18:48:12: pid 6478: LOG:  starting recovering node 1
> 2020-05-27 18:48:12: pid 6478: LOG:  executing recovery
> 2020-05-27 18:48:12: pid 6478: DETAIL:  starting recovery command: "SELECT
> pgpool_recovery('recovery_1st_stage', 'node-02', '/var/lib/pgsql/data',
> '5432', 1, '5432')"
> 2020-05-27 18:48:12: pid 6478: LOG:  executing recovery
> 2020-05-27 18:48:12: pid 6478: DETAIL:  disabling statement_timeout
> 2020-05-27 18:48:12: pid 6478: ERROR:  executing recovery, execution of
> command failed at "1st stage"
> 2020-05-27 18:48:12: pid 6478: DETAIL:  command:"recovery_1st_stage"
> 2020-05-27 18:48:12: pid 5980: LOG:  PCP process with pid: 6478 exit with
> SUCCESS.
> 2020-05-27 18:48:12: pid 5980: LOG:  PCP process with pid: 6478 exits with
> status 0
> 
> Look like recovery_1st_stage is not executed as on previous version I could
> see content of recovery_1st_stage file in the log.
> 
> What I'm missing here? What else can I check?
> 
> Best regards,
> Luís Alves


-- 
Bo Peng <pengbo at sraoss.co.jp>
SRA OSS, Inc. Japan


More information about the pgpool-general mailing list