pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #15615: pg_upgrade and vacuum_defer_cleanup_age
2+ messages / 2 participants
[nested] [flat]
* BUG #15615: pg_upgrade and vacuum_defer_cleanup_age
@ 2019-01-31 16:19 PG Bug reporting form <noreply@postgresql.org>
2020-07-02 09:33 ` Re: BUG #15615: pg_upgrade and vacuum_defer_cleanup_age Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2019-01-31 16:19 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: eshkinkot@gmail.com
The following bug has been logged on the website:
Bug reference: 15615
Logged by: Sergey Burladyan
Email address: eshkinkot@gmail.com
PostgreSQL version: 9.4.20
Operating system: Slackware, Debian
Description:
Hi!
I use production config for pg_upgrade for new cluster and it has
vacuum_defer_cleanup_age = 900000
With this setting pg_upgrade cannot freeze pg_catalog in new cluster
(it do 'vacuumdb --all --freeze') during performing upgrade and upgrade
fails:
Performing Upgrade
------------------
Analyzing all rows in the new cluster ok
Freezing all rows on the new cluster ok
Deleting files from new pg_clog ok
Copying old pg_clog to new server ok
Setting next transaction ID and epoch for new cluster ok
Deleting files from new pg_multixact/offsets ok
Copying old pg_multixact/offsets to new server ok
Deleting files from new pg_multixact/members ok
Copying old pg_multixact/members to new server ok
Setting next multixact ID and offset for new cluster ok
Resetting WAL archives ok
connection to database failed: FATAL: database "template1" does not exist
could not connect to new postmaster started with the command:
"/home/test/inst/pg9.6/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "new/"
-o "-p 50432 -b -c synchronous_commit=off -c fsync=off -c
full_page_writes=off -c listen_addresses='' -c unix_socket_permissions=0700
-c unix_socket_directories='/home/test/tmp/u'" start
Failure, exiting
I did not find any prohibition in the documentation on using production
config
with pg_upgrade, may be I am wrong and this is already mentioned in
documentation.
Test script:
#!/bin/bash
PGOLD=~/inst/pg9.4/bin
PGNEW=~/inst/pg9.6/bin
${PGOLD}/pg_ctl init -s -D old -o "--lc-messages=C -T pg_catalog.english"
${PGNEW}/pg_ctl init -s -D new -o "--lc-messages=C -T pg_catalog.english"
echo vacuum_defer_cleanup_age=10000 >> new/postgresql.auto.conf
# move txid to 3 000 000 000 in old cluster as in production
${PGOLD}/pg_ctl start -w -D old -o "--port=54321
--unix_socket_directories=/tmp"
${PGOLD}/vacuumdb -h /tmp -p 54321 --all --analyze
${PGOLD}/vacuumdb -h /tmp -p 54321 --all --freeze
${PGOLD}/pg_ctl stop -D old -m smart
#
${PGOLD}/pg_resetxlog -x 3000000000 old
dd if=/dev/zero of=old/pg_clog/0B2D bs=262144 count=1
# # move txid in new cluster bigger than vacuum_defer_cleanup_age may fix
problem
# ${PGNEW}/pg_ctl start -w -D new -o "--port=54321
--unix_socket_directories=/tmp"
# echo "select txid_current();" | ${PGNEW}/pgbench -h /tmp -p 54321 -n -P 5
-t 100000 -f- postgres
# ${PGNEW}/pg_ctl stop -D new -m smart
${PGNEW}/pg_upgrade -k -d old/ -D new/ -b ${PGOLD}/ -B ${PGNEW}/
# rm -r new old pg_upgrade_* analyze_new_cluster.sh delete_old_cluster.sh
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #15615: pg_upgrade and vacuum_defer_cleanup_age
2019-01-31 16:19 BUG #15615: pg_upgrade and vacuum_defer_cleanup_age PG Bug reporting form <noreply@postgresql.org>
@ 2020-07-02 09:33 ` Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 0 replies; 2+ messages in thread
From: Laurenz Albe @ 2020-07-02 09:33 UTC (permalink / raw)
To: eshkinkot@gmail.com; pgsql-bugs@lists.postgresql.org
On Thu, 2019-01-31 at 16:19 +0000, PG Bug reporting form wrote:
> I use production config for pg_upgrade for new cluster and it has
> vacuum_defer_cleanup_age = 900000
>
> With this setting pg_upgrade cannot freeze pg_catalog in new cluster
> (it do 'vacuumdb --all --freeze') during performing upgrade and upgrade
> fails:
>
> Performing Upgrade
> ------------------
> Analyzing all rows in the new cluster ok
> Freezing all rows on the new cluster ok
> Deleting files from new pg_clog ok
> Copying old pg_clog to new server ok
> Setting next transaction ID and epoch for new cluster ok
> Deleting files from new pg_multixact/offsets ok
> Copying old pg_multixact/offsets to new server ok
> Deleting files from new pg_multixact/members ok
> Copying old pg_multixact/members to new server ok
> Setting next multixact ID and offset for new cluster ok
> Resetting WAL archives ok
>
> connection to database failed: FATAL: database "template1" does not exist
>
>
> could not connect to new postmaster started with the command:
> "/home/test/inst/pg9.6/bin/pg_ctl" -w -l "pg_upgrade_server.log" -D "new/"
> -o "-p 50432 -b -c synchronous_commit=off -c fsync=off -c
> full_page_writes=off -c listen_addresses='' -c unix_socket_permissions=0700
> -c unix_socket_directories='/home/test/tmp/u'" start
> Failure, exiting
>
>
> I did not find any prohibition in the documentation on using production
> config
> with pg_upgrade, may be I am wrong and this is already mentioned in
> documentation.
This has been fixed with
https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=3f5863e15664757393c7a1416181fb58deac3...
Yours,
Laurenz Albe
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-07-02 09:33 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-01-31 16:19 BUG #15615: pg_upgrade and vacuum_defer_cleanup_age PG Bug reporting form <noreply@postgresql.org>
2020-07-02 09:33 ` Laurenz Albe <laurenz.albe@cybertec.at>
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