How to troubleshoot: ERROR: cache lookup failed for type?

2024-10-04 Thread Marcin Barczyński
for type 1769235301 Searching for oid=1769235301 in pg_class, pg_type, pg_namespace and pg_proc returned no results. It appears to be data corruption. It's PostgreSQL 13 and unfortunately, data_checksums are turned off. I would appreciate any suggestions for troubleshooting this issue. -- Marcin Barczyński

How to change NUMERIC type under a domain without rewriting a table?

2024-05-08 Thread Marcin Barczyński
thout rewriting any rows. I attempted to modify the definition uint64 in pg_type table: UPDATE pg_type SET typtypmod = 2621444 WHERE typname = 'uint64'; It seems to work. Is it safe? Does it have any unintended consequences? Or maybe there is another way to achieve this? -- Marcin Barczyński

Inconsistent permission enforcement for schemas

2022-08-01 Thread Marcin Barczyński
enied for schema forbidden_schema LINE 1: SELECT *FROM forbidden_schema.demo ^ QUERY: SELECT *FROM forbidden_schema.demo CONTEXT: PL/pgSQL function func() line 5 at SQL statement ``` Best regards, Marcin Barczyński

No partition pruning when initializing query plan with LATERAL JOIN and aggregates

2020-01-13 Thread Marcin Barczyński
I wonder why partition pruning doesn't work with LATERAL JOIN and aggregates. Below is my example tested on PostgreSQL 12.1 (Ubuntu 12.1-1.pgdg18.04+1): CREATE TABLE demo(key BIGINT) PARTITION BY LIST (key); CREATE TABLE demo_key_1 PARTITION OF demo FOR VALUES IN (1); CREATE TABLE demo_key_2 PARTI