pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16932: Database Crash with : ERROR: cache lookup failed for type 0
3+ messages / 3 participants
[nested] [flat]
* BUG #16932: Database Crash with : ERROR: cache lookup failed for type 0
@ 2021-03-18 08:46 PG Bug reporting form <noreply@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: PG Bug reporting form @ 2021-03-18 08:46 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: github@vlqubed.com
The following bug has been logged on the website:
Bug reference: 16932
Logged by: Vlad
Email address: github@vlqubed.com
PostgreSQL version: 10.11
Operating system: Windows
Description:
The database is running on Azure (postgres as a service)
select version(): PostgreSQL 10.11, compiled by Visual C++ build 1800,
64-bit
We have also seen this error on an 11.6 version of the database.
We have a nightly process which builds a set of tables with static data for
reporting purposes.
Randomly, we see this error in the logs:
2021-03-18 07:52:32 UTC-6052fa73.12638-ERROR: cache lookup failed for type
0
...
then database crashes, then new log file:
...
2021-03-18 07:55:58 UTC-60530700.18-LOG: could not bind socket for
statistics collector: A socket operation was attempted to an unreachable
host.
2021-03-18 07:55:58 UTC-60530700.18-LOG: trying another address for the
statistics collector
2021-03-18 07:55:59 UTC-6053078f.24-LOG: database system was interrupted;
last known up at 2021-03-18 07:47:04 UTC
2021-03-18 07:56:00 UTC-6053078f.24-LOG: database system was not properly
shut down; automatic recovery in progress
Our process is as follows ( pseudo code simplified ):
begin trans;
call a procedure that drops and re-creates a table.
commit;
begin trans
loop 1000 rows
insert into table above....
end loop;
commit;
when the error occurs, it always occurs on inserting the first row into the
new table;
Re-running the above usually succeeds the second try.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #16932: Database Crash with : ERROR: cache lookup failed for type 0
@ 2021-03-18 14:12 Tom Lane <tgl@sss.pgh.pa.us>
parent: PG Bug reporting form <noreply@postgresql.org>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2021-03-18 14:12 UTC (permalink / raw)
To: github@vlqubed.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> Randomly, we see this error in the logs:
> 2021-03-18 07:52:32 UTC-6052fa73.12638-ERROR: cache lookup failed for type
> 0
> Our process is as follows ( pseudo code simplified ):
> begin trans;
> call a procedure that drops and re-creates a table.
> commit;
> begin trans
> loop 1000 rows
> insert into table above....
> end loop;
> commit;
Hm. Can you provide a self-contained test case?
It'd also be worth your time to update to latest 10.x, in case this is
an already-fixed bug. A quick trawl of the commit logs didn't turn up
an obvious match, but I might have missed a relevant fix.
https://wiki.postgresql.org/wiki/Guide_to_reporting_problems
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: BUG #16932: Database Crash with : ERROR: cache lookup failed for type 0
@ 2021-03-20 09:19 Vlad G <github@vlqubed.com>
0 siblings, 0 replies; 3+ messages in thread
From: Vlad G @ 2021-03-20 09:19 UTC (permalink / raw)
To: tgl@sss.pgh.pa.us; pgsql-bugs@lists.postgresql.org; noreply@postgresql.org
Thanks Tom,
Unfortunately, upgrading is not in the cards, since both 10.11 and 11.6
environments are what azure currently have as their versions for their
postgres as a service.
I have installed both 10.11 and 11.6 to try and duplicate on a local docker
image, but it did not succeed.
I can't really duplicate this issue using tests. It only happens in
production environments unfortunately. I believe it has something to do
with connection pooling and asynchronous operations, but I cannot prove it.
I believe something happens where we are writing to the freshly created
table, could be related to how azure manages the storage behind the
scenes? I am not sure how the storage devices are architected behind the
scenes. ( the benefits of platform as a service...).
Is there some threading issue where the newly created table is not ready or
out of sync with the internal object cache of postgres when the storage is
slower / network attached?
Thanks,
Vlad
On Thu, Mar 18, 2021 at 3:12 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> PG Bug reporting form <noreply@postgresql.org> writes:
> > Randomly, we see this error in the logs:
> > 2021-03-18 07:52:32 UTC-6052fa73.12638-ERROR: cache lookup failed for
> type
> > 0
>
> > Our process is as follows ( pseudo code simplified ):
> > begin trans;
> > call a procedure that drops and re-creates a table.
> > commit;
>
> > begin trans
> > loop 1000 rows
> > insert into table above....
> > end loop;
> > commit;
>
> Hm. Can you provide a self-contained test case?
>
> It'd also be worth your time to update to latest 10.x, in case this is
> an already-fixed bug. A quick trawl of the commit logs didn't turn up
> an obvious match, but I might have missed a relevant fix.
>
> https://wiki.postgresql.org/wiki/Guide_to_reporting_problems
>
> regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-03-20 09:19 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 08:46 BUG #16932: Database Crash with : ERROR: cache lookup failed for type 0 PG Bug reporting form <noreply@postgresql.org>
2021-03-18 14:12 ` Re: BUG #16932: Database Crash with : ERROR: cache lookup failed for type 0 Tom Lane <tgl@sss.pgh.pa.us>
2021-03-20 09:19 Re: BUG #16932: Database Crash with : ERROR: cache lookup failed for type 0 Vlad G <github@vlqubed.com>
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