0001-hack-to-make-unaccent-crash-in-parallel-workers-v2.patch
application/octet-stream
Filename: 0001-hack-to-make-unaccent-crash-in-parallel-workers-v2.patch
Type: application/octet-stream
Part: 0
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v2-0001
Subject: hack to make unaccent crash in parallel workers
| File | + | − |
|---|---|---|
| contrib/unaccent/unaccent.c | 8 | 0 |
From a9b6a61623dae2ebb05efa200b048819b5fcfd2c Mon Sep 17 00:00:00 2001
From: Thomas Munro <thomas.munro@enterprisedb.com>
Date: Thu, 13 Sep 2018 15:18:37 +1200
Subject: [PATCH 1/3] hack to make unaccent crash in parallel workers
---
contrib/unaccent/unaccent.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/contrib/unaccent/unaccent.c b/contrib/unaccent/unaccent.c
index dbf2bb9602..130e61c51b 100644
--- a/contrib/unaccent/unaccent.c
+++ b/contrib/unaccent/unaccent.c
@@ -26,6 +26,14 @@
PG_MODULE_MAGIC;
+void _PG_init(void);
+
+void
+_PG_init(void)
+{
+ SearchSysCache1(PROCOID, ObjectIdGetDatum(999999));
+}
+
/*
* An unaccent dictionary uses a trie to find a string to replace. Each node
* of the trie is an array of 256 TrieChar structs; the N-th element of the
--
2.17.0