BUG #18600: Getting wait_type_event as IPC:BTreePage for count queries - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #18600: Getting wait_type_event as IPC:BTreePage for count queries
Date
Msg-id 18600-46308971aec3466c@postgresql.org
Whole thread Raw
Responses Re: BUG #18600: Getting wait_type_event as IPC:BTreePage for count queries
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      18600
Logged by:          Aditya Singh
Email address:      aditya.singh@lji.io
PostgreSQL version: 13.11
Operating system:   macOS
Description:

Table1: 
Structure: 
CREATE TABLE "femsa"."activities_bit" (
    "id" int4 NOT NULL DEFAULT
nextval('femsa.activities_bit_copy_id_seq'::regclass),
    "created_ts" timestamptz,
    "member_id" varchar(40),
    "bit_reference" varchar(32),
    "header" jsonb,
    "payment_details" jsonb,
    PRIMARY_KEY("id")
}

Table 2:
Structure:
CREATE TABLE "femsa"."activities_bit" (
    "id" int8 NOT NULL DEFAULT
nextval('femsa.activities_bit_copy_id_seq'::regclass),
    "created_ts" timestamptz,
    "member_id" varchar(40),
    "bit_reference" varchar(32),
    "header" jsonb,
    "payment_details" jsonb,
    PRIMARY_KEY("id")
}

The only difference between the two is the data type of the id sequence
(int, bigint).

SELECT COUNT(*) FROM {table_name} WHERE id >  0;
When I try to run the above query, I get the result for Table 1, but the
query on Table 2 goes into wait_type_event IPC:BtreePage. 

Why this IPC:BtreePage is coming for Table2 when both tables have similar
structure, data and Indexes?


pgsql-bugs by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: BUG #18598: AddressSanitizer detects use after free inside json_unique_hash_match()
Next
From: Junwang Zhao
Date:
Subject: Re: BUG #18598: AddressSanitizer detects use after free inside json_unique_hash_match()