Is PREPARE of ecpglib thread safe?

From: "Matsumura, Ryo" <matsumura(dot)ryo(at)jp(dot)fujitsu(dot)com>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Is PREPARE of ecpglib thread safe?
Date: 2019-03-14 07:17:08
Message-ID: 03040DFF97E6E54E88D3BFEE5F5480F737AC390D@G01JPEXMBYT04
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

I'm afraid that PREPARE of ecpglib is not thread safe.
The following global variables are modified without any locking system.
Is it unnecessary worry?

[interfaces/ecpg/ecpglib/prepare.c]
static int nextStmtID = 1;
static stmtCacheEntry *stmtCacheEntries = NULL;
static struct declared_statement *g_declared_list;

Regards
Ryo Matsumura

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2019-03-14 07:27:16 Re: Fix handling of unlogged tables in FOR ALL TABLES publications
Previous Message Amit Langote 2019-03-14 07:13:23 why doesn't DestroyPartitionDirectory hash_destroy?