Troubleshooting
Problem
Trace a query from dbos.log to pg.log when plan ID is not present in the pg.log
Resolving The Problem
The dbos.log contains a unique plan ID for every query. However, this plan ID is not present in the pg.log. This document describes how to trace a query from the dbos.log to the actual text of the query in the pg.log
1. Each completed query in the dbos.log contains three entries.
A successful query will contain the following:
- plan queued
- plan prep
- plan start
- plan done
- plan in GRA (if GRA is enabled)
An aborted query will contain the following:
- plan queued
- plan prep
- plan start
- plan abort
- plan in GRA (if GRA is enabled)
2. These three entries will all have the same value for 'plan ID ='. Pick up the plan ID from the plan done or plan abort entry and find the matching plan queued entry.
3. The plan queued entry will contain a parameter 'cli PID ='. The value for cli PID in the dbos.log is the Postgres process ID. The pg.log also lists the Postgres process ID as the first number in square brackets after the timestamp at the beginning of the line.
4. Find the entry in the pg.log with a matching Postgres process ID and a timestamp that is a few milliseconds (thousandths of a second) prior to the timestamp from the dbos.log's plan queued entry.
This can be found by running:
grep "\<cli PID>\]" pg.log For example, to find all the entries for a cli PID of 12376: grep "\[12376\]" pg.log 5. This is the query in the pg.log that matches the entries for that plan ID in the dbos.log.
[{"Product":{"code":"SSULQD","label":"IBM PureData System"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":null,"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Historical Number
NZ313487
Was this topic helpful?
Document Information
More support for:
IBM PureData System
Software version:
1.0.0
Document number:
461633
Modified date:
17 October 2019
UID
swg21569274