Re: [PATCH] Make various variables read-only (const)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oskari Saarenmaa <os(at)ohmu(dot)fi>
Cc: pgsql-hackers(at)postgresql(dot)org, Wim Lewis <wiml(at)omnigroup(dot)com>
Subject: Re: [PATCH] Make various variables read-only (const)
Date: 2014-01-18 21:09:34
Message-ID: 11756.1390079374@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oskari Saarenmaa <os(at)ohmu(dot)fi> writes:
> This allows the variables to be moved from .data to .rodata section which
> means that more data can be shared by processes and makes sure that nothing
> can accidentally overwrite the read-only definitions. On a x86-64 Linux
> system this moves roughly 9 kilobytes of previously writable data to the
> read-only data segment in the backend and 4 kilobytes in libpq.

Committed, with the changes mentioned upthread and some other minor
editorialization. I also adopted Wim Lewis' suggestion to not export
pg_encname_tbl[] at all anymore, since it's hard to see what the point
is of doing anything besides pg_char_to_encoding() with it.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2014-01-18 22:01:54 Re: CREATE TABLESPACE WITH
Previous Message Marko Tiikkaja 2014-01-18 21:05:05 Re: new json funcs