Check for tuplestorestate nullness before dereferencing
Alexander Kuznetsov <kuznetsovam@altlinux.org>
From: Alexander Kuznetsov <kuznetsovam@altlinux.org>
To: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Cc: nickel@altlinux.org, egori@altlinux.org
Date: 2024-10-14T09:25:50Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Create infrastructure for 'MinimalTuple' representation of in-memory
- 3f50ba27cf41 8.2.0 cited
-
Teach nodeSort and nodeMaterial to optimize out unnecessary overhead
- d2c555ee538f 8.2.0 cited
Attachments
- 0001-Check-for-tuplestorestate-nullness-before-dereferenc.patch (text/x-patch) patch 0001
Hello everyone, I'd like to propose adding a check for the nullness of tuplestorestate before dereferencing it in src/backend/executor/nodeModifier.c. The patch is attached. I am proposing this fix based on the assumption that tuplestorestate could be NULL since there is a check for it when calculating eof_tuplestore at line 85. However, since this code hasn't been changed since 2006 and hasn't caused any issues, it is possible that the check for (tuplestorestate == NULL) is redundant when calculating eof_tuplestore. -- Best regards, Alexander Kuznetsov