From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Clean up temporary-memory management during ispell dictionary lo |
Date: | 2010-10-06 23:32:21 |
Message-ID: | E1P3dTB-0001kP-2B@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Clean up temporary-memory management during ispell dictionary loading.
Add explicit initialization and cleanup functions to spell.c, and keep
all working state in the already-existing ISpellDict struct. This lets us
get rid of a static variable along with some extremely shaky assumptions
about usage of child memory contexts.
This commit is just code beautification and has no impact on functionality
or performance, but it opens the way to a less-grotty implementation of
Pavel's memory-saving hack, which will follow shortly.
Branch
------
master
Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=9b910def24e85c1c4ff993eae0fe511271fc8682
Modified Files
--------------
src/backend/tsearch/dict_ispell.c | 5 +-
src/backend/tsearch/spell.c | 86 +++++++++++++++++++-----------------
src/include/tsearch/dicts/spell.h | 22 ++++++---
3 files changed, 62 insertions(+), 51 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | User Masao_fujii | 2010-10-07 08:31:00 | pgbulkload - pgbulkload: Fixed problem with interactive authentication |
Previous Message | Hiroshi Saito | 2010-10-06 15:42:53 | psqlodbc - psqlodbc: this was applied for release preparation. |