Re: [GENERAL] [Mac OS X Mountain Lion] FATAL: could not create shared memory segment: Cannot allocate memory
Am 08.10.2012 um 02:08 schrieb Yvon Thoraval yvon.thora...@gmail.com: 2012/10/7 Scott Marlowe scott.marl...@gmail.com 'd have posted more, but 1: I know just enough about MacOS to be dangerous and 2: MacOS is known for changing how shared memory works from one minor patch to another so.. 3: Any page on making work will be dependent on the exact MacOS version you are running. Using sysctl to set the shm* values has consistently worked for us in the last years ... In fact i had already installed PostgreSQL on mac os x Lion, recently i upgraded to mac os x mountain lion. And also switching to a brew install of Postgres. I don't why but it is more difficult, on Mountain Lion, than on Lion. And also far more difficult than on (X)Ubuntu 12.04. On Lion and Ubuntu i had only to change postgresql.conf and pg_hba.conf. But here with ML (Mountain Lion) the server is running but not accepting connection : $ psgrep postgres yt 47140 0,0 0,0 2444240520 ?? Ss1:20 0:00.00 postgres: wal writer process yt 47139 0,0 0,0 2444240564 ?? Ss1:20 0:00.05 postgres: writer process yt 47138 0,0 0,0 2444240588 ?? Ss1:20 0:00.00 postgres: checkpointer process yt 47136 0,0 0,1 2444240 3696 s002 S+1:20 0:00.02 postgres -D /usr/local/var/postgres yt 47142 0,0 0,0 2440520400 ?? Ss1:20 0:00.00 postgres: stats collector process yt 47141 0,0 0,0 2444372 1528 ?? Ss1:20 0:00.00 postgres: autovacuum launcher process (my psgrep is an alias of 'ps aux | grep -v grep | grep') $ psql -p 5433 psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket /tmp/.s.PGSQL.5433? the socket is here : /var/pgsql_socket $ ls -al drwxr-xr-x 5 ytwheel 170 8 oct 01:27 . drwxr-xr-x 26 root wheel 884 7 oct 14:00 .. -rw-r--r-- 1 ytwheel 313 8 oct 01:08 .profile srwxrwxrwx 1 ytwheel0 8 oct 01:27 .s.PGSQL.5433 -rw--- 1 ytwheel 64 8 oct 01:27 .s.PGSQL.5433.lock no socket at all in /tmp... Mountain Lion comes with it's own version of PostgreSQL. The included psql command probably searches for unix sockets in a different place than your self compiled version. Is your path correctly set? Ralf smime.p7s Description: S/MIME cryptographic signature
Re: [GENERAL] [Mac OS X Mountain Lion] FATAL: could not create shared memory segment: Cannot allocate memory
2012/10/8 Ralf Schuchardt r...@gmx.de Using sysctl to set the shm* values has consistently worked for us in the last years ... probably i missed that point because my last install of postgres was on ubuntu... Mountain Lion comes with it's own version of PostgreSQL. The included psql command probably searches for unix sockets in a different place than your self compiled version. Is your path correctly set? right, the client only. my path is correctly set, resarting the computer helps. i'm now able to connect using tcp/ip : $ psql -h localhost -p 5433 -U yt -d yt_tests psql (9.2.1) Type help for help. yt_tests=# CREATE EXTENSION unaccent; CREATE EXTENSION yt_tests=# select unaccent('Hôtel'); unaccent -- Hotel (1 row) may be something was wrong with postmaster.pid and the socket ? unclear to me but it seems to work right now. -- Yvon
[GENERAL] [Mac OS X Mountain Lion] FATAL: could not create shared memory segment: Cannot allocate memory
I've just installed PostgreSQL, using brew, on Mac OS Mountain Lion. The server doesn't start and the log file shows : $ cat /usr/local/var/postgres/server.log FATAL: could not create shared memory segment: Cannot allocate memory DETAIL: Failed system call was shmget(key=5432002, size=3809280, 03600). HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space, or exceeded your kernel's SHMALL parameter. You can either reduce the request size or reconfigure the kernel with larger SHMALL. To reduce the request size (currently 3809280 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections. The PostgreSQL documentation contains more information about shared memory configuration. I have been using psql before, on Lion, without this kind of prob. What is the workaround ? -- Yvon
Re: [GENERAL] [Mac OS X Mountain Lion] FATAL: could not create shared memory segment: Cannot allocate memory
On 10/07/12 6:30 AM, Yvon Thoraval wrote: What is the workaround ? exactly what the error says to do, increase SHMMAX and SHMMAL in your kernel configuration. on differnet unix-like systems you do this differently (/etc/system on vintage Solaris, /etc/sysctl.conf on most Linux distros, etc). -- john r pierceN 37, W 122 santa cruz ca mid-left coast -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] [Mac OS X Mountain Lion] FATAL: could not create shared memory segment: Cannot allocate memory
On Sun, Oct 7, 2012 at 7:30 AM, Yvon Thoraval yvon.thora...@gmail.com wrote: I've just installed PostgreSQL, using brew, on Mac OS Mountain Lion. The server doesn't start and the log file shows : $ cat /usr/local/var/postgres/server.log FATAL: could not create shared memory segment: Cannot allocate memory DETAIL: Failed system call was shmget(key=5432002, size=3809280, 03600). HINT: This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space, or exceeded your kernel's SHMALL parameter. You can either reduce the request size or reconfigure the kernel with larger SHMALL. To reduce the request size (currently 3809280 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections. The PostgreSQL documentation contains more information about shared memory configuration. http://www.postgresql.org/docs/9.2/static/kernel-resources.html -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] [Mac OS X Mountain Lion] FATAL: could not create shared memory segment: Cannot allocate memory
2012/10/7 Scott Marlowe scott.marl...@gmail.com http://www.postgresql.org/docs/9.2/static/kernel-resources.html OK, fine thanks to both. I've found a page dealing with that prob : Fixing the postgresql initdb fatal shared memory error on Leopardhttp://willbryant.net/software/mac_os_x/postgres_initdb_fatal_shared_memory_error_on_leopard The points are to : Easy to fix; run: sudo sysctl -w kern.sysv.shmall=65536 sudo sysctl -w kern.sysv.shmmax=16777216 (The first one's the critical one for me, but second seems appropriate too.) This changes the limits in the currently-running kernel. To make these values stick across reboots, add them to /etc/sysctl.conf, like this: kern.sysv.shmall=65536 kern.sysv.shmmax=16777216 (Create this file if it doesn't already exist – it doesn't on fresh Leopard installs.) -- Yvon
Re: [GENERAL] [Mac OS X Mountain Lion] FATAL: could not create shared memory segment: Cannot allocate memory
On Sun, Oct 7, 2012 at 1:59 PM, Yvon Thoraval yvon.thora...@gmail.com wrote: 2012/10/7 Scott Marlowe scott.marl...@gmail.com http://www.postgresql.org/docs/9.2/static/kernel-resources.html OK, fine thanks to both. I've found a page dealing with that prob : Fixing the postgresql initdb fatal shared memory error on Leopard I'd have posted more, but 1: I know just enough about MacOS to be dangerous and 2: MacOS is known for changing how shared memory works from one minor patch to another so.. 3: Any page on making work will be dependent on the exact MacOS version you are running. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] [Mac OS X Mountain Lion] FATAL: could not create shared memory segment: Cannot allocate memory
2012/10/7 Scott Marlowe scott.marl...@gmail.com 'd have posted more, but 1: I know just enough about MacOS to be dangerous and 2: MacOS is known for changing how shared memory works from one minor patch to another so.. 3: Any page on making work will be dependent on the exact MacOS version you are running. In fact i had already installed PostgreSQL on mac os x Lion, recently i upgraded to mac os x mountain lion. And also switching to a brew install of Postgres. I don't why but it is more difficult, on Mountain Lion, than on Lion. And also far more difficult than on (X)Ubuntu 12.04. On Lion and Ubuntu i had only to change postgresql.conf and pg_hba.conf. But here with ML (Mountain Lion) the server is running but not accepting connection : $ psgrep postgres yt 47140 0,0 0,0 2444240520 ?? Ss1:20 0:00.00 postgres: wal writer process yt 47139 0,0 0,0 2444240564 ?? Ss1:20 0:00.05 postgres: writer process yt 47138 0,0 0,0 2444240588 ?? Ss1:20 0:00.00 postgres: checkpointer process yt 47136 0,0 0,1 2444240 3696 s002 S+1:20 0:00.02 postgres -D /usr/local/var/postgres yt 47142 0,0 0,0 2440520400 ?? Ss1:20 0:00.00 postgres: stats collector process yt 47141 0,0 0,0 2444372 1528 ?? Ss1:20 0:00.00 postgres: autovacuum launcher process (my psgrep is an alias of 'ps aux | grep -v grep | grep') $ psql -p 5433 psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket /tmp/.s.PGSQL.5433? the socket is here : /var/pgsql_socket $ ls -al drwxr-xr-x 5 ytwheel 170 8 oct 01:27 . drwxr-xr-x 26 root wheel 884 7 oct 14:00 .. -rw-r--r-- 1 ytwheel 313 8 oct 01:08 .profile srwxrwxrwx 1 ytwheel0 8 oct 01:27 .s.PGSQL.5433 -rw--- 1 ytwheel 64 8 oct 01:27 .s.PGSQL.5433.lock no socket at all in /tmp... It's to late : 2 hours in the early morning here in Paris... -- Yvon
[GENERAL] Mac OS X Lion how to connect to remote server ?
I've installed PostgreSQL using one click installer on Mac OS X Lion. I'd like to query this server from the net. How to allow specific IPV6 addresses to connect to the databases 'addressbook', 'cli', 'landp' and 'landp_public' ? I've tested a simple solution using ssh port forwarding : $ ssh -L :localhost:5432 yt@iMac But I'd like not to use this solution, I'd better use tcp ip. Then how to setup pg_hba.conf and postgresql.conf for that purpose ? Does i need to open TCPIP port 5432, and how ? -- Yvon
[GENERAL] Mac OS X 10.6 - libpq.dylib vs. libpq.a and PQisthreadsafe()
Hello, I've been getting acquainted with the C interface for libpq and have run into an issue with trying to link to the dynamic libpq while still getting thread safety. I have tried the following by compiling the 9.1 source with the --enable-thread-safety flag and I've tried the libpq libraries provided in the EnterpriseDB build of 9.1. All of this is on Mac OS X 10.6.8 with XCode 4.0.2. The problem I'm having is that PQisthreadsafe() returns 0 when I link to the dynamic library(libpq.5.4.dylib), but it returns 1 when I link to the static library (libpq.a). The code I'm using is as follows: #include libpq-fe.h int main (int argc, const char * argv[]) { if (PQisthreadsafe() == 1) { puts(Thread safe); } else { puts(Not thread safe); } } Commands and output (main.c, libpq.a and libpq.5.4.dylib are all in the same directory): gcc -I /Library/PostgreSQL/9.1/include main.c libpq.a -o main Output: Thread safe gcc -I /Library/PostgreSQL/9.1/include main.c libpq.5.4.dylib -o main Output: Not thread safe I'm admittedly not great with the nuances of the linker or with the PostgreSQL C interface so it's possible I'm missing something obvious here. If anyone knows how I should be using libpq as a dynamic library with thread safety, then that would be a great help. Regards, __ David McKeone Arts Management Systems Ltd. mailto:da...@artsman.com http://www.artsman.com Phone: (403) 536-1203 Fax: (403) 536-1210
Re: [GENERAL] Mac OS X 10.6 - libpq.dylib vs. libpq.a and PQisthreadsafe()
David McKeone da...@artsman.com writes: I've been getting acquainted with the C interface for libpq and have run into an issue with trying to link to the dynamic libpq while still getting thread safety. I have tried the following by compiling the 9.1 source with the --enable-thread-safety flag and I've tried the libpq libraries provided in the EnterpriseDB build of 9.1. All of this is on Mac OS X 10.6.8 with XCode 4.0.2. Hm, is there a libpq dylib in /usr/lib? If so, maybe it's capturing the reference? otool -L main would be informative about which dylib is actually getting called, I think. If it's not what you expected, the lack of a -L switch in your link command is probably the reason. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Mac OS X 10.6 - libpq.dylib vs. libpq.a and PQisthreadsafe()
On 2011-10-17, at 4:23 PM, Tom Lane wrote: Hm, is there a libpq dylib in /usr/lib? If so, maybe it's capturing the reference? otool -L main would be informative about which dylib is actually getting called, I think. If it's not what you expected, the lack of a -L switch in your link command is probably the reason. regards, tom lane Here is the output for otool -L for both. Static libpq.a main: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11) Dynamic libpq.5.4.dylib using -lpq main: libpq.5.dylib (compatibility version 5.0.0, current version 5.4.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11) Dynamic libpq.5.4.dylib using the command from the previous email (This one is interesting because /usr/local/pgsql doesn't exist on this machine) main: /usr/local/pgsql/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.4.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11) I did have a libpq.5.dylib in /usr/lib and it turns out that that was the problem. So it looks like, even though I was specifying the library, it just picked the one at /usr/lib version anyway. (I obviously have much more to learn about how the linker works on OS X) The solution was to move the Enterprise DB libpq.5.4.dylib into /usr/lib (and create associated symlinks) and it worked correctly after that. Thanks for pointing me in the right direction.
Re: [GENERAL] Mac OS X shared_buffers not same as postgresql.conf file
On Sun, 2011-09-25 at 12:13 -0500, Neil Tiffin wrote: On Sep 24, 2011, at 4:21 PM, Guillaume Lelarge wrote: On Sat, 2011-09-24 at 14:43 -0500, Neil Tiffin wrote: On Sep 24, 2011, at 1:31 PM, Joe Conway wrote: On 09/23/2011 02:33 PM, Neil Tiffin wrote: I have shared_buffers in the config file set for 32 MB and pgAdmin reports a value of 32 MB, but pgAdmin also says the current value is 4096. Can anyone point me to any docs about why the current value may be different than the config value? Temp_buffers are the same way, config file 8MB, but current value in pgAdmin is 1024? Internally shared_buffers is tracked as number of 8K pages. postgres=# show shared_buffers; shared_buffers 32MB (1 row) postgres=# select setting from pg_settings where name='shared_buffers'; setting - 4096 (1 row) postgres=# select 4096 * 8 / 1024 as MB; mb 32 (1 row) HTH, Excellent, just what I was looking for. I know there had to be a simple explanation, even though it seems a little retarded that pgAdmin does not point this out. And how do you get that value from pgAdmin? the config editor gives me the value with its unit, so I guess it's not from the config editor. I got the values from selecting in pgAdmin: Tools - Server Configuration - postgresql.conf, then I get a table with setting name, value, current value, and comment columns. The 'value' column shows the unit, but the 'current value' column does not, at least on Mac OS X. Yes, I have the same behaviour. The Value comes from the file (hence with the unit), and the Current Value comes from PostgreSQL (simple query: select setting from pg_settings where name='shared_buffers'). -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Mac OS X shared_buffers not same as postgresql.conf file
On Sep 24, 2011, at 4:21 PM, Guillaume Lelarge wrote: On Sat, 2011-09-24 at 14:43 -0500, Neil Tiffin wrote: On Sep 24, 2011, at 1:31 PM, Joe Conway wrote: On 09/23/2011 02:33 PM, Neil Tiffin wrote: I have shared_buffers in the config file set for 32 MB and pgAdmin reports a value of 32 MB, but pgAdmin also says the current value is 4096. Can anyone point me to any docs about why the current value may be different than the config value? Temp_buffers are the same way, config file 8MB, but current value in pgAdmin is 1024? Internally shared_buffers is tracked as number of 8K pages. postgres=# show shared_buffers; shared_buffers 32MB (1 row) postgres=# select setting from pg_settings where name='shared_buffers'; setting - 4096 (1 row) postgres=# select 4096 * 8 / 1024 as MB; mb 32 (1 row) HTH, Excellent, just what I was looking for. I know there had to be a simple explanation, even though it seems a little retarded that pgAdmin does not point this out. And how do you get that value from pgAdmin? the config editor gives me the value with its unit, so I guess it's not from the config editor. I got the values from selecting in pgAdmin: Tools - Server Configuration - postgresql.conf, then I get a table with setting name, value, current value, and comment columns. The 'value' column shows the unit, but the 'current value' column does not, at least on Mac OS X. Neil -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] Mac OS X shared_buffers not same as postgresql.conf file
Hello all, I am hoping someone can help me with 9.0.4 server on 8GB Mac w/Snow Leopard and shared_buffers configuration setting. I have shared_buffers in the config file set for 32 MB and pgAdmin reports a value of 32 MB, but pgAdmin also says the current value is 4096. Can anyone point me to any docs about why the current value may be different than the config value? Temp_buffers are the same way, config file 8MB, but current value in pgAdmin is 1024? Thank you. Neil -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Mac OS X shared_buffers not same as postgresql.conf file
On 09/23/2011 02:33 PM, Neil Tiffin wrote: I have shared_buffers in the config file set for 32 MB and pgAdmin reports a value of 32 MB, but pgAdmin also says the current value is 4096. Can anyone point me to any docs about why the current value may be different than the config value? Temp_buffers are the same way, config file 8MB, but current value in pgAdmin is 1024? Internally shared_buffers is tracked as number of 8K pages. postgres=# show shared_buffers; shared_buffers 32MB (1 row) postgres=# select setting from pg_settings where name='shared_buffers'; setting - 4096 (1 row) postgres=# select 4096 * 8 / 1024 as MB; mb 32 (1 row) HTH, Joe -- Joe Conway credativ LLC: http://www.credativ.us Linux, PostgreSQL, and general Open Source Training, Service, Consulting, 24x7 Support -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Mac OS X shared_buffers not same as postgresql.conf file
On Sep 24, 2011, at 1:31 PM, Joe Conway wrote: On 09/23/2011 02:33 PM, Neil Tiffin wrote: I have shared_buffers in the config file set for 32 MB and pgAdmin reports a value of 32 MB, but pgAdmin also says the current value is 4096. Can anyone point me to any docs about why the current value may be different than the config value? Temp_buffers are the same way, config file 8MB, but current value in pgAdmin is 1024? Internally shared_buffers is tracked as number of 8K pages. postgres=# show shared_buffers; shared_buffers 32MB (1 row) postgres=# select setting from pg_settings where name='shared_buffers'; setting - 4096 (1 row) postgres=# select 4096 * 8 / 1024 as MB; mb 32 (1 row) HTH, Excellent, just what I was looking for. I know there had to be a simple explanation, even though it seems a little retarded that pgAdmin does not point this out. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
Re: [GENERAL] Mac OS X shared_buffers not same as postgresql.conf file
On Sat, 2011-09-24 at 14:43 -0500, Neil Tiffin wrote: On Sep 24, 2011, at 1:31 PM, Joe Conway wrote: On 09/23/2011 02:33 PM, Neil Tiffin wrote: I have shared_buffers in the config file set for 32 MB and pgAdmin reports a value of 32 MB, but pgAdmin also says the current value is 4096. Can anyone point me to any docs about why the current value may be different than the config value? Temp_buffers are the same way, config file 8MB, but current value in pgAdmin is 1024? Internally shared_buffers is tracked as number of 8K pages. postgres=# show shared_buffers; shared_buffers 32MB (1 row) postgres=# select setting from pg_settings where name='shared_buffers'; setting - 4096 (1 row) postgres=# select 4096 * 8 / 1024 as MB; mb 32 (1 row) HTH, Excellent, just what I was looking for. I know there had to be a simple explanation, even though it seems a little retarded that pgAdmin does not point this out. And how do you get that value from pgAdmin? the config editor gives me the value with its unit, so I guess it's not from the config editor. -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
[GENERAL] Mac OS X
I tried to install postgres onto my macbook via 'fink' and don't like it all that much. I decided to install from source, it's a fallback to my slackware days. But fink already created a user postgres and I can't seem to find anything to change it's configuration settings for shell, home director... If anyone has suggestions I would appreciate it. Also, does anyone know of a more current installation write-up for Mac other than what Apple provides? It's written around 7.4 and I'm not sure it's going to be optimal. ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [GENERAL] Mac OS X
I tried to install postgres onto my macbook via 'fink' and don't like it all that much. I decided to install from source, it's a fallback to my slackware days. But fink already created a user postgres and I can't seem to find anything to change it's configuration settings for shell, home director... Im not sure how fink adds the user, but try NetInfo Manager (In Applications/Utlilities). If the user is not there, then it might be in /etc/passwd as for other Unix OS's Also, does anyone know of a more current installation write-up for Mac other than what Apple provides? It's written around 7.4 and I'm not sure it's going to be optimal. PostgreSQL has been building out of the box on OSX since at least the later 7.4.x series, but certainly all of the 8.x series. So you should just follow the installation instructions for Unix in the INSTALL file that comes with the source. If you have any problems then post the errors back to the list and someone should be able to help... Cheers Adam ---(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: [GENERAL] Mac OS X
On 7/12/07, Tom Allison [EMAIL PROTECTED] wrote: I tried to install postgres onto my macbook via 'fink' and don't like it all that much. I decided to install from source, it's a fallback to my slackware days. Try MacPorts (http://www.macports.org/), a modern BSD-style ports system for OS X. The PostgreSQL port sets up everything except initdb, and installs a launchd script for controlling the postmaster daemon: $ port install postgresql82-server MacPorts has a good selection of support packages -- PostGIS, language bindings, etc. One advantage of using MacPorts is that, quite unlike Debian's packages, ports are incredibly easy to write -- each port is just a small text file. If the sources have a reasonably modern layout (tarball, configure script, makefile), it's around three lines in addition to the package name, description etc. MacPorts handles the downloading, compiling, staging, file tracking, uninstallation and so on. So if MacPorts doesn't have a package you want, you can still install it from source and have it integrated into the MacPorts universe. Alexander. ---(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: [GENERAL] Mac OS X
I tried to install postgres onto my macbook via 'fink' and don't like it all that much. I decided to install from source, it's a fallback to my slackware days. But fink already created a user postgres and I can't seem to find anything to change it's configuration settings for shell, home director... If anyone has suggestions I would appreciate it. Also, does anyone know of a more current installation write-up for Mac other than what Apple provides? It's written around 7.4 and I'm not sure it's going to be optimal. Personally, I use the PG package available on http://www.entropy.ch/ software/macosx/postgresql/. It worked flawlessly, set up initdb, and configured PG to start at boot time. Thanks, Aurynn Shaw The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 ext 103 PostgreSQL Replication, Consulting, Custom Development, 24x7 support [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [GENERAL] Mac OS X
On Nov 9, 2006, at 9:10 AM, Nathan Leon Pace, MD, MStat wrote: I run an older version of psql (7.2.4) on a Linux machine. I wish to migrate psql to an Intel Mac running OS x 10.4.8. The supported platforms table in postgresql-8.1-US.pdf (page 259) lists Mac OS X with a PPC cpu as being supported, but not Mac OS X with a Intel cpu. Can psql run on an Intel Mac? It's running fine on this one. No problems building from source. There are several people providing prebuilt universal binary packages for OS X. http://www.entropy.ch/software/macosx/postgresql/ is one. Cheers, Steve ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/
Re: [GENERAL] mac os x compile failure
On Jan 24, 2006, at 9:21 , Michael Glaesemann wrote: On Jan 22, 2006, at 3:10 , Tom Lane wrote: That's odd --- AFAIR I've never had trouble building bison on my OS X laptop. What happens when you try? I neglected to take any notes. I remember it was complaining about muscle something-or-other during make. I have mixed emotions about it, but bison 1.875 built with no problems the very first time I tried when I went in to service the machine. No evidence at all of the problems I had building bison-1.875 and bison-2.1 last week. I can't imagine what I did differently. It was a straightforward ./configure --prefix=/usr/ local, make, make install. Kinda feel silly that I can't replicate the error, but glad that it went fine. One workaround would be to check out from CVS and then drop in the bison output files from the 8.1.2 release tarball. I'll give that a shot when I get back to that machine, probably this coming weekend. Install from CVS when just fine. No error due to F_FULLSYNC, and configure properly displayed checking whether F_FULLFSYNC is declared... no Mac OS X 10.2.8 ./configure --prefix=/usr/local/pgsql-cvs --with-pgport=5431 -- mandir=/usr/local/share/man/ --with-includes=/sw/include/ --with- libraries=/sw/lib/ Full output from configure, make, make install available if desired. make check failed because it wasn't able to initdb (not enough memory available) and I didn't want to mess around with changing shmem*. (I don't even remember how to do that on an OS X 10.2 box.) Is there a way to set the number of connections lower for the regression tests? Thanks again, Tom. Looks like this fixed it. Michael Glaesemann grzm myrealbox com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [GENERAL] mac os x compile failure
On Jan 22, 2006, at 3:10 , Tom Lane wrote: That's odd --- AFAIR I've never had trouble building bison on my OS X laptop. What happens when you try? I neglected to take any notes. I remember it was complaining about muscle something-or-other during make. One workaround would be to check out from CVS and then drop in the bison output files from the 8.1.2 release tarball. I'll give that a shot when I get back to that machine, probably this coming weekend. Michael Glaesemann grzm myrealbox com ---(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: [GENERAL] mac os x compile failure
On Jan 18, 2006, at 9:17 , Michael Glaesemann wrote: On Jan 18, 2006, at 4:56 , Tom Lane wrote: I'll try to see that this gets fixed for PG 8.1.3, but in the short run you might be best off to update your OS X installation, or revert to PG 8.0.* which doesn't try to use FULLFSYNC at all. Thanks for working on this, Tom. I've got a Mac OS X 10.2 installation at a client and saw the same error when I was attempting to upgrade from 7.4 to 8.1 but didn't have time to explore the cause. If Neil doesn't report back sooner, I'll see if I can't build against head this weekend. Unfortunately I don't have a recent-enough version of bison on the 10.2 machine and can't get bison-1.875 or bison-2.1 to compile so I can't install from CVS. I'll definitely check when 8.1.3 is released. Michael Glaesemann grzm myrealbox com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [GENERAL] mac os x compile failure
Michael Glaesemann [EMAIL PROTECTED] writes: Unfortunately I don't have a recent-enough version of bison on the 10.2 machine and can't get bison-1.875 or bison-2.1 to compile so I can't install from CVS. I'll definitely check when 8.1.3 is released. That's odd --- AFAIR I've never had trouble building bison on my OS X laptop. What happens when you try? One workaround would be to check out from CVS and then drop in the bison output files from the 8.1.2 release tarball. I'm pretty sure we have not changed any of the bison (or flex) input files since then in that branch. regards, tom lane ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [GENERAL] mac os x compile failure
Thanks for the help, Tom, and others who made suggestions. I compiled and installed 8.0.6 with no problems on OS X 10.2.8 My little old imac's a happy postgres host now. Neil --- Tom Lane [EMAIL PROTECTED] wrote: Neil Brandt [EMAIL PROTECTED] writes: fd.c: In function `pg_fsync_writethrough': fd.c:271: `F_FULLFSYNC' undeclared (first use in this function) fd.c:271: (Each undeclared identifier is reported only once fd.c:271: for each function it appears in.) Hmm. This is our bug: the code mistakenly supposes that every version of OS X has that symbol, whereas evidently it was introduced in 10.3. I'll try to see that this gets fixed for PG 8.1.3, but in the short run you might be best off to update your OS X installation, or revert to PG 8.0.* which doesn't try to use FULLFSYNC at all. If you'd really like to stay on OS X 10.2, please consider joining the buildfarm http://www.pgbuildfarm.org/index.html so that any other such problems will be caught promptly. We have buildfarm members running 10.3 and 10.4, but nobody covering 10.2. regards, tom lane ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq __ Find your next car at http://autos.yahoo.ca ---(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
[GENERAL] mac os x compile failure
I'm trying to compile postgres 8.1.2 on OS X 10.2.8. Unfortunately I'm not much of a compile-your-own guy, and I've hit a compile error that's beyond my improvisation abilities, and gets no google hits either. I realize this also an OS X expert thing: I'm also seeking help on one of the apple.com lists as well. I installed the December 2002 xcode package of developer stuff from apple, which seemed to be the last one that was for OS X 10.2. Initially I only installed the parts called BSDSDK and Developer Tools Software. The postgres configure utility ran through fine. I ran make. Several minutes into it, I got a missing header file for osx installed version constants. So I then installed the xcode part called Mac OS X SDK. I ran make again. Now, further in, I get the following output and error (note the make -C file SUBSYS.o is output, not my initial command which was just make in the directory at the top of the postgres source). make -C file SUBSYS.o gcc -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../../../src/include -I/sw/include -c -o fd.o fd.c fd.c: In function `pg_fsync_writethrough': fd.c:271: `F_FULLFSYNC' undeclared (first use in this function) fd.c:271: (Each undeclared identifier is reported only once fd.c:271: for each function it appears in.) make[4]: *** [fd.o] Error 1 make[3]: *** [file-recursive] Error 2 make[2]: *** [storage-recursive] Error 2 make[1]: *** [all] Error 2 make: *** [all] Error 2 Searching, I couldn't find anything useful on the F_FULLFSYNC constant, and no reports on a similar failure. Any ideas? (Help!) Thanks, Neil __ Find your next car at http://autos.yahoo.ca ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [GENERAL] mac os x compile failure
Neil Brandt wrote: I'm trying to compile postgres 8.1.2 on OS X 10.2.8. Unfortunately I'm not much of a compile-your-own guy, and I've hit a compile error that's beyond my improvisation abilities, and gets no google hits either. Make your life easy. Use Darwin ports: http://darwinports.opendarwin.org/ -- The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564 PostgreSQL Replication, Consulting, Custom Development, 24x7 support Managed Services, Shared and Dedicated Hosting Co-Authors: PLphp, PLperl - http://www.commandprompt.com/ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [GENERAL] mac os x compile failure
Neil Brandt [EMAIL PROTECTED] writes: fd.c: In function `pg_fsync_writethrough': fd.c:271: `F_FULLFSYNC' undeclared (first use in this function) fd.c:271: (Each undeclared identifier is reported only once fd.c:271: for each function it appears in.) Hmm. This is our bug: the code mistakenly supposes that every version of OS X has that symbol, whereas evidently it was introduced in 10.3. I'll try to see that this gets fixed for PG 8.1.3, but in the short run you might be best off to update your OS X installation, or revert to PG 8.0.* which doesn't try to use FULLFSYNC at all. If you'd really like to stay on OS X 10.2, please consider joining the buildfarm http://www.pgbuildfarm.org/index.html so that any other such problems will be caught promptly. We have buildfarm members running 10.3 and 10.4, but nobody covering 10.2. regards, tom lane ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [GENERAL] mac os x compile failure
On Jan 18, 2006, at 4:56 , Tom Lane wrote: I'll try to see that this gets fixed for PG 8.1.3, but in the short run you might be best off to update your OS X installation, or revert to PG 8.0.* which doesn't try to use FULLFSYNC at all. Thanks for working on this, Tom. I've got a Mac OS X 10.2 installation at a client and saw the same error when I was attempting to upgrade from 7.4 to 8.1 but didn't have time to explore the cause. If Neil doesn't report back sooner, I'll see if I can't build against head this weekend. Michael Glaesemann grzm myrealbox com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
[GENERAL] Mac OS X 10.3 and SYSV shared memory settings
Because I was just burned by this, I'd like to remind OS X users that OS 10.3 (Panther) may be a less desirable platform than 10.2 for running PostgreSQL and other applications that benefit from customizing SYSV shared memory settings. The problem is that in 10.3, there unbelievably seems to be no reliable way to customize the SYSV shared memory settings such that the settings are preserved across OS updates (10.3.6 to 10.3.7, e.g.)! The following reminder from the PG 8.0 manual (thanks to whomever put this in) also applies to PG 7.4.X, and it is incredibly important: In OS X 10.3, these commands [shared memory sysctl commands] have been moved to /etc/rc and must be edited there. You'll need to reboot to make changes take effect. Note that /etc/rc is usually overwritten by OS X updates (such as 10.3.6 to 10.3.7) so you should expect to have to redo your editing after each update. If someone has a solution to this problem, please let me know. In the meantime we'll have to implement a cron-driven alert and a policy change, hope that transitioning to a new sysadmin at a later date does not screw us, and pray that 10.4 provides a solution to this problem. A simple change to /etc/rc on Apple's part seems to be all that would be required - it already executes sysctl commands from a user-defined /etc/sysctl.conf file, but the shared memory settings can only be set *once*, and /etc/rc happens to set the defaults before reading /etc/sysctl.conf. I can have a cron job remove the shared memory sysctls in /etc/rc if they reappear, but that would be a decidedly imperfect kludge. Kevin Murphy ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster