Thread: unix_socket_directory
I'm running pg 7.4.6 on fedora core 2. I'm trying to set unix_socket_directory for some clustering I'm trying to accomplish, but get an error when I try to set it in postgresql.conf: FATAL: syntax error in file "postgresql.conf" line 36, near token "/" It goes away if I comment out the line, and it doesn't look like it's made wrong to me. Here's an excerpt from the postgresql.conf file # - Connection Settings - tcpip_socket = true max_connections = 100 # note: increasing max_connections costs about 500 bytes of shared # memory per connection slot, in addition to costs from shared_buffers # and max_locks_per_transaction. unix_socket_directory = /home/pgmaster/tmp #superuser_reserved_connections = 2 port = 5432 The directory I'm trying to use is world writable. Am I missing something simple here?
Scott Marlowe <smarlowe@g2switchworks.com> writes: > unix_socket_directory = /home/pgmaster/tmp Not sure, but I think you need quotes: unix_socket_directory = '/home/pgmaster/tmp' regards, tom lane
Scott Marlowe wrote: > unix_socket_directory = /home/pgmaster/tmp > The directory I'm trying to use is world writable. Am I missing > something simple here? Yes, single quotes around the parameter value. -- Peter Eisentraut http://developer.postgresql.org/~petere/
Scott Marlowe <smarlowe@g2switchworks.com> writes: >> Not sure, but I think you need quotes: >> unix_socket_directory = '/home/pgmaster/tmp' > Wow, that was way too simple. > So, is there a reason some things in the postgresql.conf file need ' > marks around them and other things, like client_min_messages don't? I think the rule is anything but a number or identifier needs quotes, but I'm too lazy to go check. regards, tom lane
On Fri, 2004-12-17 at 16:05, Tom Lane wrote: > Scott Marlowe <smarlowe@g2switchworks.com> writes: > > unix_socket_directory = /home/pgmaster/tmp > > Not sure, but I think you need quotes: > unix_socket_directory = '/home/pgmaster/tmp' Wow, that was way too simple. So, is there a reason some things in the postgresql.conf file need ' marks around them and other things, like client_min_messages don't? Just wondering, no skin off my back really...
On Fri, 2004-12-17 at 16:18, Tom Lane wrote: > Scott Marlowe <smarlowe@g2switchworks.com> writes: > >> Not sure, but I think you need quotes: > >> unix_socket_directory = '/home/pgmaster/tmp' > > > Wow, that was way too simple. > > > So, is there a reason some things in the postgresql.conf file need ' > > marks around them and other things, like client_min_messages don't? > > I think the rule is anything but a number or identifier needs quotes, > but I'm too lazy to go check. That's what I figured, and I too, am too lazy to go look.
Scott Marlowe wrote: > On Fri, 2004-12-17 at 16:18, Tom Lane wrote: > > Scott Marlowe <smarlowe@g2switchworks.com> writes: > > >> Not sure, but I think you need quotes: > > >> unix_socket_directory = '/home/pgmaster/tmp' > > > > > Wow, that was way too simple. > > > > > So, is there a reason some things in the postgresql.conf file need ' > > > marks around them and other things, like client_min_messages don't? > > > > I think the rule is anything but a number or identifier needs quotes, > > but I'm too lazy to go check. > > That's what I figured, and I too, am too lazy to go look. Some GUC parameters are integers, boolean, or floats, that don't need quotes, and some are strings that do. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073
On Fri, 2004-12-17 at 22:10, Bruce Momjian wrote: > Scott Marlowe wrote: > > On Fri, 2004-12-17 at 16:18, Tom Lane wrote: > > > Scott Marlowe <smarlowe@g2switchworks.com> writes: > > > >> Not sure, but I think you need quotes: > > > >> unix_socket_directory = '/home/pgmaster/tmp' > > > > > > > Wow, that was way too simple. > > > > > > > So, is there a reason some things in the postgresql.conf file need ' > > > > marks around them and other things, like client_min_messages don't? > > > > > > I think the rule is anything but a number or identifier needs quotes, > > > but I'm too lazy to go check. > > > > That's what I figured, and I too, am too lazy to go look. > > Some GUC parameters are integers, boolean, or floats, that don't need > quotes, and some are strings that do. What confused me was the constants that don't need quotes (like client_min_messages) and can be set to many different string constants. But they're all still constants, not vars.
Scott Marlowe <smarlowe@g2switchworks.com> writes: >> Some GUC parameters are integers, boolean, or floats, that don't need >> quotes, and some are strings that do. > What confused me was the constants that don't need quotes (like > client_min_messages) and can be set to many different string constants. > But they're all still constants, not vars. More to the point, the values that are allowed for them look like identifiers. I believe it was the slashes in your unix_socket_directory value that force the need for quotes. regards, tom lane