PostgreSQL Bugs

Collected from the PG bugs email list.

Bug ID15350
PG Version10.5
OSFedora 28
Opened2018-08-24 14:45:52+00
Reported byKieran McCusker
StatusNew

Body of first available message related to this bug follows.

The following bug has been logged on the website:

Bug reference:      15350
Logged by:          Kieran McCusker
Email address:      (redacted)
PostgreSQL version: 10.5
Operating system:   Fedora 28
Description:        

Hi

We're using 10.5 with parallel queries enabled and the config options
#max_worker_processes = 8
#max_parallel_workers_per_gather = 2
#max_parallel_workers = 8

I'm seeing invalid cache ID: 11 errors in the log. It's only happening
occasionally (15 times today on a not very busy system). I've been following
the thread about making windowing functions et al parallel restricted - Is
this another manifestation of the problem? 

On the first query setting set session max_parallel_workers to 0 more than
doubles the execution time from 208ms to 580ms so that doesn't seem
desirable, and it's not obvious to me why the second would have failed.

I'm probably being dense and if so apologies for wasting your time. I also
don't see how to create a test case sorry.

Many thanks

Kieran

A couple of example queries are :-
-----------------------------------------------------------------------------------------------
with limits as (
                      select min(contact_date), max(contact_date)
                      from q366midl.q366m1
                      where contact_date is not null 
                    )
                    select 
                    to_char(min,'YYYY-MM'),
                    'text' as format,
                    to_char(min,substr('YYYY-MM',1,7)) as code,
--
                    from limits
                    union all
                    select
                    to_char(max,'YYYY-MM'),
                    'text' as format,
                    to_char(max,substr('YYYY-MM',1,7)) as code,
                    to_char(max,'Mon YYYY') as text 
                    from limits
                    order by 1

2018-08-24 13:50:28.325 BST [68794] ERROR:  invalid cache ID: 11
2018-08-24 13:50:28.325 BST [68844] LOG:  worker process: parallel worker
for PID 67216 (PID 68793) exited with exit code 1
2018-08-24 13:50:28.327 BST [68844] LOG:  worker process: parallel worker
for PID 67216 (PID 68794) exited with exit code 1

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
2018-08-23 11:04:23.020 BST [80148] ERROR:  invalid cache ID: 11
2018-08-23 11:04:23.020 BST [80148] CONTEXT:  parallel worker
2018-08-23 11:04:23.020 BST [80148] STATEMENT:  SELECT "survey"."calls".*
FROM "survey"."calls" WHERE ((survey_state is null or survey_state not in
(500,501)) and phone_numbers @> array['07854 xxxxxx']) ORDER BY created_at
desc
2018-08-23 11:04:23.021 BST [81154] ERROR:  invalid cache ID: 11
2018-08-23 11:04:23.023 BST [68844] LOG:  worker process: parallel worker
for PID 80148 (PID 81153) exited with exit code 1
2018-08-23 11:04:23.023 BST [68844] LOG:  worker process: parallel worker
for PID 80148 (PID 81154) exited with exit code 1

Messages

DateAuthorSubject
2018-08-24 14:45:52+00=?utf-8?q?PG_Bug_reporting_form?=BUG #15350: Getting invalid cache ID: 11 Errors
2018-08-24 15:15:53+00Tom LaneRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-08-27 21:12:14+00Thomas MunroRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-08-28 02:40:17+00Tom LaneRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-08-28 14:31:13+00Kieran McCuskerRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-08-29 01:38:03+00Thomas MunroRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-08-29 22:45:43+00Thomas MunroRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-09-02 05:04:36+00Amit KapilaRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-09-02 17:05:42+00Andres FreundRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-09-13 01:42:00+00Thomas MunroRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-09-13 01:51:19+00Tom LaneRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-09-13 04:22:31+00Thomas MunroRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-09-13 14:22:54+00Andrew GierthRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-09-19 06:10:02+00Thomas MunroRe: BUG #15350: Getting invalid cache ID: 11 Errors
2018-09-20 02:25:36+00Thomas MunroRe: BUG #15350: Getting invalid cache ID: 11 Errors