Skip site navigation (1) Skip section navigation (2)

Converting postgresql.conf parameters to kilobytes

From: Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Converting postgresql.conf parameters to kilobytes
Date: 2004-05-30 12:50:22
Message-ID: 200405301820.22873.shridhar@frodo.hserus.net (view raw or flat)
Thread:
Lists: pgsql-hackers
Hi,

I was toying around with idea of converting all the memory related parameters 
in postgresql.conf to kilobytes for simplicity and uniformity.

Attached is a proof of concept patch that converts shared_buffers to kilobytes 
using assign_hook.

It compiled all-right but I experienced a strange behavior. At the time of 
initdb, it demanded 69MB of shared memory. I had to bump up SHMMAX from 32MB 
to 128MB to get initdb through. Certainly I did something wrong somewhere but 
I don't know what and where. This is linux 2.6.4.

The postgresql.conf is properly altered and shows 8000(Though the description 
around is no longer in sync.)

I also don't know where to put the assign_hook. I have put in guc.c for the 
time being. Only other int hook I found was assign_max_stack_depth which is 
in postgres.c

Any comments/pointers?

Regards,
 Shridhar

Attachment: patch.kb
Description: text/x-diff (1.9 KB)

Responses

pgsql-hackers by date

Next:From: Shridhar DaithankarDate: 2004-05-30 13:38:08
Subject: CVS tip compiler error with --enable-thread-safety
Previous:From: Stephan SzaboDate: 2004-05-30 11:07:27
Subject: Re: Nested xacts: looking for testers and review

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group