pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedmissing chunk number 0 for toast value xxxxx
7+ messages / 6 participants
[nested] [flat]
* missing chunk number 0 for toast value xxxxx
@ 2006-08-05 23:29 Robby Russell <robby@planetargon.com>
0 siblings, 1 reply; 7+ messages in thread
From: Robby Russell @ 2006-08-05 23:29 UTC (permalink / raw)
To: pgsql-general
I'm seeing this weird issue pop up on one a database.
This seems to work...
robbyonrails_typo_dev=# SELECT count(id) FROM contents WHERE title ~*
'postgresql' LIMIT 20;
count
-------
19
(1 row)
...but these two seem to be causing an error now.
robbyonrails_typo_dev=# SELECT count(id) FROM contents WHERE body ~*
'postgresql' LIMIT 20;
ERROR: missing chunk number 0 for toast value 58441
robbyonrails_typo_dev=# SELECT count(id) FROM contents WHERE
body_html ~* 'postgresql' LIMIT 20;
ERROR: missing chunk number 0 for toast value 58440
I tried reindexing the table but it''s not going away. Any pointers?
Robby
--
Robby Russell
Founder & Executive Director
PLANET ARGON, LLC
Ruby on Rails Development, Consulting & Hosting
www.planetargon.com
www.robbyonrails.com
+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: missing chunk number 0 for toast value xxxxx
@ 2006-08-06 00:21 Robby Russell <robby.lists@planetargon.com>
parent: Robby Russell <robby@planetargon.com>
0 siblings, 0 replies; 7+ messages in thread
From: Robby Russell @ 2006-08-06 00:21 UTC (permalink / raw)
To: pgsql-general; +Cc: Robby Russell <robby@planetargon.com>
On Aug 5, 2006, at 4:29 PM, Robby Russell wrote:
> I'm seeing this weird issue pop up on one a database.
>
> This seems to work...
>
> robbyonrails_typo_dev=# SELECT count(id) FROM contents WHERE title
> ~* 'postgresql' LIMIT 20;
> count
> -------
> 19
> (1 row)
>
> ...but these two seem to be causing an error now.
>
> robbyonrails_typo_dev=# SELECT count(id) FROM contents WHERE body
> ~* 'postgresql' LIMIT 20;
> ERROR: missing chunk number 0 for toast value 58441
>
> robbyonrails_typo_dev=# SELECT count(id) FROM contents WHERE
> body_html ~* 'postgresql' LIMIT 20;
> ERROR: missing chunk number 0 for toast value 58440
>
> I tried reindexing the table but it''s not going away. Any pointers?
>
> Robby
Thanks to the kind folks in #postgresql I was able to run a loop
through the database and find the corrupt row in the table and delete
it.
All is well!
Robby
--
Robby Russell
Founder & Executive Director
PLANET ARGON, LLC
Ruby on Rails Development, Consulting & Hosting
www.planetargon.com
www.robbyonrails.com
+1 503 445 2457
+1 877 55 ARGON [toll free]
+1 815 642 4068 [fax]
^ permalink raw reply [nested|flat] 7+ messages in thread
* "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup
@ 2021-04-13 09:38 Ma Xinjian <maxj.fnst@fujitsu.com>
0 siblings, 2 replies; 7+ messages in thread
From: Ma Xinjian @ 2021-04-13 09:38 UTC (permalink / raw)
To: pgsql-general
Hi,
When I use pg_basebackup to backup and restore db(Let's call it A) to a
standalone instance(Let's call it B), "missing chunk number 0 for toast
value xxx in pg_toast_xxx" errors output.
PG version: 10.3
pg_basebackup command:
/usr/pgsql-10/bin/pg_basebackup -h p-rdb-c01 -D /var/lib/pgsql/10/data
-Xs -P -n --waldir=/tmp/pg_wal
I have mounted a disk to /tmp/pg_wal before, then I will mount the disk
to /var/lib/pgsql/10/data/pg_wal, so as to ensure completeness of wal
records during backup.
Since I don't want B to be a standy server, I just want it to be a
standalone server.
I removed recovery.conf, then simply start postgresql-10.service. It turned
out that postgresql-10.service
can be started successfully. But when I use this postgresql(reindex, vacumm
and so on), "missing chunk number 0 for toast value xxx in pg_toast_xxx"
errors output.
When pg_basebackup, it will store wal under pg_wal, can't postgresql work
with wal records locally?
I think primary_conninfo in recovery.conf is just used to get newer wal
records from A. Right?
I have also tested:
If I start postgresql-10.service with recovery.conf firstly, then split it
from postgresql cluster, everything works fine.
Above test seems proved that it is wal records's problem. I am really
confused.
Regards
Ma Xinjian
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup
@ 2021-04-13 12:26 Laurenz Albe <laurenz.albe@cybertec.at>
parent: Ma Xinjian <maxj.fnst@fujitsu.com>
1 sibling, 1 reply; 7+ messages in thread
From: Laurenz Albe @ 2021-04-13 12:26 UTC (permalink / raw)
To: Ma Xinjian <maxj.fnst@fujitsu.com>; pgsql-general
On Tue, 2021-04-13 at 02:38 -0700, Ma Xinjian wrote:
> When I use pg_basebackup to backup and restore db(Let's call it A) to a
> standalone instance(Let's call it B), "missing chunk number 0 for toast
> value xxx in pg_toast_xxx" errors output.
>
> PG version: 10.3
> pg_basebackup command:
> /usr/pgsql-10/bin/pg_basebackup -h p-rdb-c01 -D /var/lib/pgsql/10/data
> -Xs -P -n --waldir=/tmp/pg_wal
> I have mounted a disk to /tmp/pg_wal before, then I will mount the disk
> to /var/lib/pgsql/10/data/pg_wal, so as to ensure completeness of wal
> records during backup.
>
> Since I don't want B to be a standy server, I just want it to be a
> standalone server.
> I removed recovery.conf, then simply start postgresql-10.service. It turned
> out that postgresql-10.service
> can be started successfully. But when I use this postgresql(reindex, vacumm
> and so on), "missing chunk number 0 for toast value xxx in pg_toast_xxx"
> errors output.
>
> When pg_basebackup, it will store wal under pg_wal, can't postgresql work
> with wal records locally?
> I think primary_conninfo in recovery.conf is just used to get newer wal
> records from A. Right?
>
> I have also tested:
> If I start postgresql-10.service with recovery.conf firstly, then split it
> from postgresql cluster, everything works fine.
>
> Above test seems proved that it is wal records's problem. I am really
> confused.
Your mail got me confused...
Why do you write the WAL to /tmp/pg_wal, only to later mount that at the
default location?
I see nothing wrong with what you are doing, but I may have got lost
in your complicated procedure.
You don't happen to remove "backup_label", do you?
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup
@ 2021-04-13 13:36 MaXinjian <machine_ok@163.com>
parent: Laurenz Albe <laurenz.albe@cybertec.at>
0 siblings, 1 reply; 7+ messages in thread
From: MaXinjian @ 2021-04-13 13:36 UTC (permalink / raw)
To: pgsql-general
> Why do you write the WAL to /tmp/pg_wal, only to later mount that at the
> default location?
pg_wal dir has size limitation, if wal files are too large, they will be
overwrited, right?
> I see nothing wrong with what you are doing, but I may have got lost in
> your complicated procedure.
> You don't happen to remove "backup_label", do you?
em, I do remove backup_label...
1. It means recovery.conf is not necessary, backup_label is necessary?
2. Which key in backup_label is necessary?
3. I searched the log, it do has recoveried.
Then, if there is no backup_label, what's the default START WAL LOCATION and
CHECKPOINT LOCATION?
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup
@ 2021-04-13 14:51 Tom Lane <tgl@sss.pgh.pa.us>
parent: Ma Xinjian <maxj.fnst@fujitsu.com>
1 sibling, 0 replies; 7+ messages in thread
From: Tom Lane @ 2021-04-13 14:51 UTC (permalink / raw)
To: Ma Xinjian <maxj.fnst@fujitsu.com>; +Cc: pgsql-general
Ma Xinjian <maxj.fnst@fujitsu.com> writes:
> When I use pg_basebackup to backup and restore db(Let's call it A) to a
> standalone instance(Let's call it B), "missing chunk number 0 for toast
> value xxx in pg_toast_xxx" errors output.
> PG version: 10.3
10.3 is quite a few bug fixes ago. Maybe you'd have better results
with the current release (10.16).
regards, tom lane
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup
@ 2021-04-13 14:52 Laurenz Albe <laurenz.albe@cybertec.at>
parent: MaXinjian <machine_ok@163.com>
0 siblings, 0 replies; 7+ messages in thread
From: Laurenz Albe @ 2021-04-13 14:52 UTC (permalink / raw)
To: MaXinjian <machine_ok@163.com>; pgsql-general
On Tue, 2021-04-13 at 06:36 -0700, MaXinjian wrote:
> > Why do you write the WAL to /tmp/pg_wal, only to later mount that at the
> > default location?
>
> pg_wal dir has size limitation, if wal files are too large, they will be
> overwrited, right?
No, they won't.
You could run out of space on the file system though.
> > I see nothing wrong with what you are doing, but I may have got lost in
> > your complicated procedure.
> > You don't happen to remove "backup_label", do you?
>
> em, I do remove backup_label...
Then that's your problem.
That will corrupt your data, because recovery starts from the wrong
checkpoint.
> 1. It means recovery.conf is not necessary, backup_label is necessary?
Yes, exactly.
> 2. Which key in backup_label is necessary?
The whole file needs to be preserved unchanged, just as it is.
Don't mess with that file.
> 3. I searched the log, it do has recoveried.
> Then, if there is no backup_label, what's the default START WAL LOCATION and
> CHECKPOINT LOCATION?
That's the catch.
"backup_label" is the *only way* to tell a backup from a crashed
PostgreSQL cluster.
If there is no "backup_label", PostgreSQL will get the latest checkpoint
from the control file (global/pg_control), which may well be later than
the checkpoint that started the backup, so you will miss to recover some
transactions.
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2021-04-13 14:52 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-05 23:29 missing chunk number 0 for toast value xxxxx Robby Russell <robby@planetargon.com>
2006-08-06 00:21 ` Robby Russell <robby.lists@planetargon.com>
2021-04-13 09:38 "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup Ma Xinjian <maxj.fnst@fujitsu.com>
2021-04-13 12:26 ` Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup Laurenz Albe <laurenz.albe@cybertec.at>
2021-04-13 13:36 ` Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup MaXinjian <machine_ok@163.com>
2021-04-13 14:52 ` Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup Laurenz Albe <laurenz.albe@cybertec.at>
2021-04-13 14:51 ` Re: "missing chunk number 0 for toast value xxx in pg_toast_xxx" when pg_basebackup Tom Lane <tgl@sss.pgh.pa.us>
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