pgsql: Clean up temporary-memory management during ispell dictionary lo - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Clean up temporary-memory management during ispell dictionary lo
Date
Msg-id E1P3dTB-0001kP-2B@gemulon.postgresql.org
Whole thread Raw
List 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(-)


pgsql-committers by date:

Previous
From: h-saito@pgfoundry.org (Hiroshi Saito)
Date:
Subject: psqlodbc - psqlodbc: this was applied for release preparation.
Next
From: masao_fujii@pgfoundry.org (User Masao_fujii)
Date:
Subject: pgbulkload - pgbulkload: Fixed problem with interactive authentication