Re: [HACKERS] units in postgresql.conf comments
On Wed, May 29, 2013 at 09:59:10PM -0400, Peter Eisentraut wrote: I think these sort of entries don't make much sense: #wal_sender_timeout = 60s # in milliseconds; 0 disables I think we should remove units from the comments when it's clear from the name or the default value that time units are accepted. So, is anyone doing this? Should it be a TODO item? -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] units in postgresql.conf comments
Bruce Momjian br...@momjian.us writes: On Wed, May 29, 2013 at 09:59:10PM -0400, Peter Eisentraut wrote: I think these sort of entries don't make much sense: #wal_sender_timeout = 60s # in milliseconds; 0 disables I think we should remove units from the comments when it's clear from the name or the default value that time units are accepted. So, is anyone doing this? Should it be a TODO item? I think Peter's wrong here, for two reasons: * The comment tells you what undecorated wal_sender_timeout = 60 will do. * The comment tells you what the precision of the setting is. For instance, archive_timeout is in seconds; you can try setting it to 10ms if you like, but that won't do much for you. We could imagine making these points moot, by disallowing inputs that lack units and converting all time GUCs into some common scale (requiring wider-than-int storage) ... but that seems sufficiently non backward compatible that I don't see it happening. It's not clear that it'd be a usability improvement anyway. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] units in postgresql.conf comments
On 01/11/2014 11:06 AM, Bruce Momjian wrote: On Wed, May 29, 2013 at 09:59:10PM -0400, Peter Eisentraut wrote: I think these sort of entries don't make much sense: #wal_sender_timeout = 60s # in milliseconds; 0 disables I think we should remove units from the comments when it's clear from the name or the default value that time units are accepted. So, is anyone doing this? Should it be a TODO item? I don't agree, actually, unless we take the next step and actually clean all the documentation garbage out of the file and leave it in the main docs and pg_settings where it belongs. -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] units in postgresql.conf comments
On 30.05.2013 06:43, Bruce Momjian wrote: On Wed, May 29, 2013 at 09:59:10PM -0400, Peter Eisentraut wrote: I think these sort of entries don't make much sense: #wal_sender_timeout = 60s # in milliseconds; 0 disables I think we should remove units from the comments when it's clear from the name or the default value that time units are accepted. We are documenting what happens when there are no units. Are people are going to change '60s' to '50' and assume that is '50s'? Hopefully not. I do like the clutter avoidance of removing the units from the comments. We could make it mandatory to specify the unit in the value. Ie. throw an error on wal_sender_timeout = 50: ERROR: unit required for option wal_sender_timeout HINT: Valid units for this parameter are ms, s, min, h, and d. Then you wouldn't need a comment to explain what the unit of a naked value is. The only problem I see with that is backwards-compatibility. Old postgresql.conf files containing naked values would no longer work. But all you'd need to do is to add in the units, which would work on older versions too, and would be good for readability anyway. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] units in postgresql.conf comments
On 05/30/2013 12:01 AM, Heikki Linnakangas wrote: We could make it mandatory to specify the unit in the value. Ie. throw an error on wal_sender_timeout = 50: ERROR: unit required for option wal_sender_timeout HINT: Valid units for this parameter are ms, s, min, h, and d. Then you wouldn't need a comment to explain what the unit of a naked value is. The only problem I see with that is backwards-compatibility. Old postgresql.conf files containing naked values would no longer work. But all you'd need to do is to add in the units, which would work on older versions too, and would be good for readability anyway. I like this idea with one addition. We should have a default unit for each. For wal_sender_timeout seconds makes sense, but for checkpoint_timeout minutes makes sense (for example). JD - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] units in postgresql.conf comments
On Thu, May 30, 2013 at 3:52 AM, Joshua D. Drake j...@commandprompt.com wrote: On 05/30/2013 12:01 AM, Heikki Linnakangas wrote: We could make it mandatory to specify the unit in the value. Ie. throw an error on wal_sender_timeout = 50: ERROR: unit required for option wal_sender_timeout HINT: Valid units for this parameter are ms, s, min, h, and d. Then you wouldn't need a comment to explain what the unit of a naked value is. The only problem I see with that is backwards-compatibility. Old postgresql.conf files containing naked values would no longer work. But all you'd need to do is to add in the units, which would work on older versions too, and would be good for readability anyway. In general, I like this. Requiring full specification is never wrong. Except possibly for thje backwards compatible thing. I like this idea with one addition. We should have a default unit for each. For wal_sender_timeout seconds makes sense, but for checkpoint_timeout minutes makes sense (for example). This sounds like a good way to make things even more confusing. Right now the confusion is only in the comments - this would make it confusing in the actual values. Requiring a unit seems like a much better idea. That way, there is no way for confusion. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] units in postgresql.conf comments
On 05/30/2013 12:55 AM, Magnus Hagander wrote: I like this idea with one addition. We should have a default unit for each. For wal_sender_timeout seconds makes sense, but for checkpoint_timeout minutes makes sense (for example). This sounds like a good way to make things even more confusing. Right now the confusion is only in the comments - this would make it confusing in the actual values. Requiring a unit seems like a much better idea. That way, there is no way for confusion. I can buy into that. JD -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] units in postgresql.conf comments
On 30.05.2013 10:52, Joshua D. Drake wrote: On 05/30/2013 12:01 AM, Heikki Linnakangas wrote: We could make it mandatory to specify the unit in the value. Ie. throw an error on wal_sender_timeout = 50: ERROR: unit required for option wal_sender_timeout HINT: Valid units for this parameter are ms, s, min, h, and d. Then you wouldn't need a comment to explain what the unit of a naked value is. The only problem I see with that is backwards-compatibility. Old postgresql.conf files containing naked values would no longer work. But all you'd need to do is to add in the units, which would work on older versions too, and would be good for readability anyway. I like this idea with one addition. We should have a default unit for each. For wal_sender_timeout seconds makes sense, but for checkpoint_timeout minutes makes sense (for example). Uh, if specifying the unit is mandatory, what exactly would the default unit mean? - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] units in postgresql.conf comments
On 05/30/2013 01:14 AM, Heikki Linnakangas wrote: On 30.05.2013 10:52, Joshua D. Drake wrote: On 05/30/2013 12:01 AM, Heikki Linnakangas wrote: We could make it mandatory to specify the unit in the value. Ie. throw an error on wal_sender_timeout = 50: ERROR: unit required for option wal_sender_timeout HINT: Valid units for this parameter are ms, s, min, h, and d. Then you wouldn't need a comment to explain what the unit of a naked value is. The only problem I see with that is backwards-compatibility. Old postgresql.conf files containing naked values would no longer work. But all you'd need to do is to add in the units, which would work on older versions too, and would be good for readability anyway. I like this idea with one addition. We should have a default unit for each. For wal_sender_timeout seconds makes sense, but for checkpoint_timeout minutes makes sense (for example). Uh, if specifying the unit is mandatory, what exactly would the default unit mean? Yeah, see my other email. I missed that part. It is late for me. Sorry for the noise. JD - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
[HACKERS] units in postgresql.conf comments
I think these sort of entries don't make much sense: #wal_sender_timeout = 60s # in milliseconds; 0 disables I think we should remove units from the comments when it's clear from the name or the default value that time units are accepted. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] units in postgresql.conf comments
On Wed, May 29, 2013 at 09:59:10PM -0400, Peter Eisentraut wrote: I think these sort of entries don't make much sense: #wal_sender_timeout = 60s # in milliseconds; 0 disables I think we should remove units from the comments when it's clear from the name or the default value that time units are accepted. We are documenting what happens when there are no units. Are people are going to change '60s' to '50' and assume that is '50s'? Hopefully not. I do like the clutter avoidance of removing the units from the comments. -- Bruce Momjian br...@momjian.ushttp://momjian.us EnterpriseDB http://enterprisedb.com + It's impossible for everything to be true. + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Units in postgresql.conf -- How to report?
Peter Eisentraut wrote: So assuming we allowed units in postgresql.conf, how would you report them with SHOW? 1. The way they were set (hard) 2. Without units (not user-friendly) 3. Always in base units (seconds or bytes) 4. The largest unit that gives an integer (4) seems the most reasonable to me in terms of interface and implementation. 4. would be the best option for human readers, but it would be a pain for a script that parses command output. Maybe 3. would be a good compromise. Yours, Laurenz Albe ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] Units in postgresql.conf -- How to report?
On Tue, Jul 25, 2006 at 08:48:34AM +0200, Albe Laurenz wrote: Peter Eisentraut wrote: So assuming we allowed units in postgresql.conf, how would you report them with SHOW? 1. The way they were set (hard) 2. Without units (not user-friendly) 3. Always in base units (seconds or bytes) 4. The largest unit that gives an integer (4) seems the most reasonable to me in terms of interface and implementation. 5. Using whatever units were used in postgresql.conf 4. would be the best option for human readers, but it would be a pain for a script that parses command output. For scripts I think the best bet would be to go with 3 on current_setting(). -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] Units in postgresql.conf -- How to report?
Jim C. Nasby wrote: On Tue, Jul 25, 2006 at 08:48:34AM +0200, Albe Laurenz wrote: Peter Eisentraut wrote: So assuming we allowed units in postgresql.conf, how would you report them with SHOW? 1. The way they were set (hard) 2. Without units (not user-friendly) 3. Always in base units (seconds or bytes) 4. The largest unit that gives an integer (4) seems the most reasonable to me in terms of interface and implementation. 5. Using whatever units were used in postgresql.conf That is (1). -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
[HACKERS] Units in postgresql.conf -- How to report?
So assuming we allowed units in postgresql.conf, how would you report them with SHOW? 1. The way they were set (hard) 2. Without units (not user-friendly) 3. Always in base units (seconds or bytes) 4. The largest unit that gives an integer (4) seems the most reasonable to me in terms of interface and implementation. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [HACKERS] Units in postgresql.conf -- How to report?
On Mon, Jul 24, 2006 at 11:13:53PM +0200, Peter Eisentraut wrote: So assuming we allowed units in postgresql.conf, how would you report them with SHOW? 1. The way they were set (hard) 2. Without units (not user-friendly) 3. Always in base units (seconds or bytes) 4. The largest unit that gives an integer (4) seems the most reasonable to me in terms of interface and implementation. I'm for (4), as it's also what people are used to from things like GNU's -h option. Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] Units in postgresql.conf
Time units is easy: 1h = 60min = 3600s = 360ms We don't need anything larger than seconds at the moment. Except for log_rotation_age perhaps? -- Korry
Re: [HACKERS] Units in postgresql.conf
Gavin, Peter, I would imagine that Peter intends to handle backward compatibility by processing values without explicit units in the units assumed pre 8.2. Aha, I misunderstood. -- Josh Berkus PostgreSQL @ Sun San Francisco ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [HACKERS] Units in postgresql.conf
On Thursday 20 July 2006 18:16, Ron Mayer wrote: Peter Eisentraut wrote: I think it would be useful to allow units to be added to these settings, for example... shared_buffers = 512MB which is a bit cumbersome to calculate right now (you'd need = 65536). I haven't thought yet how to parse or implement this, but would people find this useful? Would this extend to things like random_page_cost and similar? If the random_page_cost were specifiable in seconds or ms it might be easier to someday write a program to measure such values on particular hardware platforms. (though I guess for that to work, the config file would also need to add the reference cost (is it a non-random page access) as well...) I'd think no, since random page cost doesn't actually map to any real world value. Unless of course we wanted to add MV for magic value, but then people would want to use that for everything ;-D -- Robert Treat Build A Brighter LAMP :: Linux Apache {middleware} PostgreSQL ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[HACKERS] Units in postgresql.conf
One frequent source of confusion are the different units that the parameters in postgresql.conf use. shared_buffers is in 8 kB, work_mem is in 1 kB; bgwriter_delay is in milliseconds, checkpoint_warning is in seconds. Obviously, we can't change that without inconveniencing a lot of users. I think it would be useful to allow units to be added to these settings, for example shared_buffers = 1000kB checkpoint_warning = 30s This would also allow shared_buffers = 512MB which is a bit cumbersome to calculate right now (you'd need = 65536). I haven't thought yet how to parse or implement this, but would people find this useful? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [HACKERS] Units in postgresql.conf
On 7/20/06, Peter Eisentraut [EMAIL PROTECTED] wrote: I think it would be useful to allow units to be added to these settings, for example shared_buffers = 1000kB checkpoint_warning = 30s This would also allow shared_buffers = 512MB which is a bit cumbersome to calculate right now (you'd need = 65536). I haven't thought yet how to parse or implement this, but would people find this useful? I agree, a lot of newbies have issues with the configuration file. I have a tiny bit of code (about 20 lines I think) that will handle K, M, and G suffixes for memory. It would be equally easy to add S for seconds, In my code, if no suffix existed, I'd just revert to the default behavior. This is probably what we'd want to do in PostgreSQL as well. The only issue in PostgreSQL is knowing what the unit conversion and scaling factor is for each parameter (8K, 1K, milliseconds, etc); though, this wouldn't be hard to add at all. -- Jonah H. Harris, Software Architect | phone: 732.331.1300 EnterpriseDB Corporation| fax: 732.331.1301 33 Wood Ave S, 2nd Floor| [EMAIL PROTECTED] Iselin, New Jersey 08830| http://www.enterprisedb.com/ ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] Units in postgresql.conf
On Thu, 20 Jul 2006, Peter Eisentraut wrote: One frequent source of confusion are the different units that the parameters in postgresql.conf use. shared_buffers is in 8 kB, work_mem is in 1 kB; bgwriter_delay is in milliseconds, checkpoint_warning is in seconds. Obviously, we can't change that without inconveniencing a lot of users. I think it would be useful to allow units to be added to these settings, for example shared_buffers = 1000kB checkpoint_warning = 30s This would also allow shared_buffers = 512MB which is a bit cumbersome to calculate right now (you'd need = 65536). I haven't thought yet how to parse or implement this, but would people find this useful? Please! Yes! Gavin ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [HACKERS] Units in postgresql.conf
On 7/20/06, Peter Eisentraut [EMAIL PROTECTED] wrote: One frequent source of confusion are the different units that the parameters in postgresql.conf use. shared_buffers is in 8 kB, work_mem is in 1 kB; bgwriter_delay is in milliseconds, checkpoint_warning is in seconds. Obviously, we can't change that without inconveniencing a lot of users. I think it would be useful to allow units to be added to these settings, for example shared_buffers = 1000kB checkpoint_warning = 30s This would also allow shared_buffers = 512MB which is a bit cumbersome to calculate right now (you'd need = 65536). I haven't thought yet how to parse or implement this, but would people find this useful? +1. In addition, that would make conffile self-documenting. -- marko ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] Units in postgresql.conf
Peter Eisentraut wrote: One frequent source of confusion are the different units that the parameters in postgresql.conf use. shared_buffers is in 8 kB, work_mem is in 1 kB; bgwriter_delay is in milliseconds, checkpoint_warning is in seconds. Obviously, we can't change that without inconveniencing a lot of users. I think it would be useful to allow units to be added to these settings, for example snip I haven't thought yet how to parse or implement this, but would people find this useful? +1 I'd find this useful myself, and I think it would eliminate many mistakes by newer admins. Joe ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] Units in postgresql.conf
On Thursday 20 July 2006 05:04, Jonah H. Harris wrote: On 7/20/06, Peter Eisentraut [EMAIL PROTECTED] wrote: I think it would be useful to allow units to be added to these settings, for example shared_buffers = 1000kB checkpoint_warning = 30s This would also allow shared_buffers = 512MB which is a bit cumbersome to calculate right now (you'd need = 65536). I haven't thought yet how to parse or implement this, but would people find this useful? I agree, a lot of newbies have issues with the configuration file. I have a tiny bit of code (about 20 lines I think) that will handle K, M, and G suffixes for memory. It would be equally easy to add S for seconds, In my code, if no suffix existed, I'd just revert to the default behavior. This is probably what we'd want to do in PostgreSQL as well. The only issue in PostgreSQL is knowing what the unit conversion and scaling factor is for each parameter (8K, 1K, milliseconds, etc); though, this wouldn't be hard to add at all. Yummy, Yummy, I'd say this would be a big boost in ability to tune for a lot of people. -- Darcy Buskermolen Wavefire Technologies Corp. http://www.wavefire.com ph: 250.717.0200 fx: 250.763.1759 ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] Units in postgresql.conf
Peter, One frequent source of confusion are the different units that the parameters in postgresql.conf use. shared_buffers is in 8 kB, work_mem is in 1 kB; bgwriter_delay is in milliseconds, checkpoint_warning is in seconds. Obviously, we can't change that without inconveniencing a lot of users. I think it would be useful to allow units to be added to these settings, for example shared_buffers = 1000kB checkpoint_warning = 30s This would also allow shared_buffers = 512MB which is a bit cumbersome to calculate right now (you'd need = 65536). I haven't thought yet how to parse or implement this, but would people find this useful? Well, it's on my TODO list for 8.2 to write a simple postgresql.conf conversion utility in Perl. If you wanted to make a change like that, it would make finishing that mandatory. Just as well, right now half the vacuum settings are in a different section than another half. --Josh ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [HACKERS] Units in postgresql.conf
Zdenek Kotala wrote: Time units is easy: 1h = 60min = 3600s = 360ms We don't need anything larger than seconds at the moment. What kind of unit prefix will we use for memory? PostgreSQL has always used 1 kB = 1024 B. 1) will be unit required? No. What will be default unit for value without unit? What we have now. I suggest mandatory unit avoid the problem with unclear default value. Not going to happen. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [HACKERS] Units in postgresql.conf
Josh Berkus wrote: Well, it's on my TODO list for 8.2 to write a simple postgresql.conf conversion utility in Perl. If you wanted to make a change like that, it would make finishing that mandatory. I don't understand how that is related. Or what a conversion utility would be for that matter. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [HACKERS] Units in postgresql.conf
Josh Berkus wrote: Well, the main issue with changing the units of the PostgreSQL.conf file from a user perspective is that the numbers from you 8.0/8.1 conf file would no longer work. No one is intending to do any such change. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] Units in postgresql.conf
Peter, I don't understand how that is related. Or what a conversion utility would be for that matter. Well, the main issue with changing the units of the PostgreSQL.conf file from a user perspective is that the numbers from you 8.0/8.1 conf file would no longer work. A little conversion utilitily to turn your 8.0 file into an 8.2 file would help solve that. -- --Josh Josh Berkus PostgreSQL @ Sun San Francisco ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] Units in postgresql.conf
On Thu, Jul 20, 2006 at 01:49:36PM +0200, Peter Eisentraut wrote: One frequent source of confusion are the different units that the parameters in postgresql.conf use. shared_buffers is in 8 kB, work_mem is in 1 kB; bgwriter_delay is in milliseconds, checkpoint_warning is in seconds. Obviously, we can't change that without inconveniencing a lot of users. I think it would be useful to allow units to be added to these settings, for example shared_buffers = 1000kB checkpoint_warning = 30s This would also allow shared_buffers = 512MB which is a bit cumbersome to calculate right now (you'd need = 65536). I haven't thought yet how to parse or implement this, but would people find this useful? Absolutely! :) Cheers, D -- David Fetter [EMAIL PROTECTED] http://fetter.org/ phone: +1 415 235 3778AIM: dfetter666 Skype: davidfetter Remember to vote! ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] Units in postgresql.conf
Peter Eisentraut wrote: One frequent source of confusion are the different units that the parameters in postgresql.conf use. shared_buffers is in 8 kB, work_mem is in 1 kB; bgwriter_delay is in milliseconds, checkpoint_warning is in seconds. Obviously, we can't change that without inconveniencing a lot of users. I think it would be useful to allow units to be added to these settings, for example shared_buffers = 1000kB checkpoint_warning = 30s This would also allow shared_buffers = 512MB which is a bit cumbersome to calculate right now (you'd need = 65536). I haven't thought yet how to parse or implement this, but would people find this useful? It is good idea. I going to implement this. There is some proposal: Time units is easy: 1h = 60min = 3600s = 360ms Memory units: What kind of unit prefix will we use for memory? 1kB=1000B and 1kiBi=1024B or 1kB=1024kB. See http://en.wikipedia.org/wiki/Binary_prefix for detail. I suggest use IEC standard convention. By my opinion it is much better. And there are some other questions: 1) will be unit required? What will be default unit for value without unit? I suggest mandatory unit avoid the problem with unclear default value. 2) Each internal representation of setting use different unit. Shell I convert this representation to milliseconds and bytes? I think it is not good idea. It should generate some overflow. I suggest to recompute value and round it to integer. Zdenek ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [HACKERS] Units in postgresql.conf
Peter Eisentraut wrote: Zdenek Kotala wrote: Time units is easy: 1h = 60min = 3600s = 360ms We don't need anything larger than seconds at the moment. What kind of unit prefix will we use for memory? PostgreSQL has always used 1 kB = 1024 B. 1) will be unit required? No. What will be default unit for value without unit? What we have now. I suggest mandatory unit avoid the problem with unclear default value. Not going to happen. Ok. Conclusion is for time s=second, ms=millisecond and for memory B, kB, MB, GB. Unit is not mandatory and if it will missing the behavior stays same - backward compatibility (no extra conversion utility). Last question is if page unit should be useful too. For example: #shared_buffers = 1000 # min 16 or max_connections*2, 8KB each It means 8000kB. But if somebody compiles postgres with different page size, than the size will be different. However, somebody should use for example 8MB and number of buffers will be 8MB/page_size. Zdenek PS: I have some GUC patches in the patches queue. Could anybody test/commit them? I would like continue on the latest version of guc subsystem. Thanks ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] Units in postgresql.conf
Peter Eisentraut wrote: I think it would be useful to allow units to be added to these settings, for example... shared_buffers = 512MB which is a bit cumbersome to calculate right now (you'd need = 65536). I haven't thought yet how to parse or implement this, but would people find this useful? Would this extend to things like random_page_cost and similar? If the random_page_cost were specifiable in seconds or ms it might be easier to someday write a program to measure such values on particular hardware platforms. (though I guess for that to work, the config file would also need to add the reference cost (is it a non-random page access) as well...) ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] Units in postgresql.conf
On Thu, 20 Jul 2006, Josh Berkus wrote: Peter, I don't understand how that is related. Or what a conversion utility would be for that matter. Well, the main issue with changing the units of the PostgreSQL.conf file from a user perspective is that the numbers from you 8.0/8.1 conf file would no longer work. A little conversion utilitily to turn your 8.0 file into an 8.2 file would help solve that. Josh, I would imagine that Peter intends to handle backward compatibility by processing values without explicit units in the units assumed pre 8.2. Thanks, Gavin ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org