473,786 Members | 2,866 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

unix_socket_dir ectory not fully recognized by pg_ctl?

Dear Gurus,

I have a similar problem as discussed in
http://archives.postgresql.org/pgsql...6/msg00321.php

This probably should go to pgsql-novice too, but I'm not a member of that
list so please forgive my lazyness.

I use Debian Woody Linux and installed postgres (v7.2.1), but I needed a
newer version, so decided to try 7.4RC2 (which is not in the news yet, as I
checked today). It compiled and installed, and I could run the backend.
However, PHP could not run, since it searched for the socket in
/var/run/postgresql.

I found the unix_socket_dir ectory option in postgresql.conf and set it to
/var/run/postgresql and restarted the server with

bin/pg_ctl start -w -D data -l data/postgres.log

The socket file and socket lockfile was created in /var/run/postgresql
-- it's ok, but pg_ctl hung, and after quite some time it exited with
"pg_ctl: postmaster does not start"

However; I can connect the server with PHP's pg_connect(), or psql -- but
psql only works through TCP/IP (i.e. -h localhost). If run locally, it
searches for socket in /tmp. Using

psql -h /var/run/postgresql

did work. My questions are:
What causes pg_ctl's strange behaviour?
Is this the only way to tell this to psql?
Is there a compile-time configuration parameter? (could not find it)
Is there a psqlrc setting for this?
Is there a complete description for psqlrc? (could not find it)

TIA,

--------------------- cut here ---------------------

G.
--
while (!asleep) sheep++;
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly

Nov 12 '05 #1
1 3819
On Sun, 2003-11-16 at 21:01, Szûcs Gábor wrote:
Dear Gurus,

I have a similar problem as discussed in
http://archives.postgresql.org/pgsql...6/msg00321.php

This probably should go to pgsql-novice too, but I'm not a member of that
list so please forgive my lazyness.

I use Debian Woody Linux and installed postgres (v7.2.1), but I needed a
newer version, so decided to try 7.4RC2 (which is not in the news yet, asI
checked today). It compiled and installed, and I could run the backend.
However, PHP could not run, since it searched for the socket in
/var/run/postgresql.
The debian packages put the socket in /var/run/postgresql and therefore
everything that links to libpq.so on Debian will look for it there.
I found the unix_socket_dir ectory option in postgresql.conf and set it to
/var/run/postgresql and restarted the server with

bin/pg_ctl start -w -D data -l data/postgres.log

The socket file and socket lockfile was created in /var/run/postgresql
-- it's ok, but pg_ctl hung, and after quite some time it exited with
"pg_ctl: postmaster does not start"

However; I can connect the server with PHP's pg_connect(), or psql -- but
psql only works through TCP/IP (i.e. -h localhost). If run locally, it
searches for socket in /tmp. Using

psql -h /var/run/postgresql

did work. My questions are:
What causes pg_ctl's strange behaviour?
That's the way it is built by default. Since you built it rather than
installing it from a package, that's the behaviour you got.
Is this the only way to tell this to psql?
You can say "psql -h /var/run/postgresql" to specify where the Unix
socket is. If the hostname begins with a slash, it is taken as the
socket location rather than a network address.
Is there a compile-time configuration parameter? (could not find it)
#define DEFAULT_PGSOCKE T_DIR "/var/run/postgresql"
in src/include/pg_config_manua l.h
Is there a psqlrc setting for this?
No - that is too late. You need the location of the socket before you
start the connection.
Is there a complete description for psqlrc? (could not find it)


In the man page for psql. It contains commands (that would be valid on
the command line) to run as psql starts up.
You can get Debian packages of 7.4 built for woody from
http://people.debian.org/~elphick/debian

This will fix the incompatibilty problems you are having.

In /etc/apt/sources.list:
deb http://people.debian.org/~elphick/debian stable main

--
Oliver Elphick Ol************@ lfix.co.uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
=============== =============== ==========
"A Song for the sabbath day. It is a good thing to
give thanks unto the LORD, and to sing praises unto
thy name, O most High." Psalms 92:1
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2175
by: Allen Landsidel | last post by:
Here's maybe a silly question, but I haven't seen it asked or answered so.. For those settings in the .conf file that say "this doesn't take effect until the database is restarted".. does that mean that "pg_ctl reload" also does not reload them? I imagine the statement is specific, and means what it says, but I'm curious anyway.. s'all for now.
0
1253
by: mvh | last post by:
I had been rotating my log files with the equivalent of pg_ctl -w -s | flog /var/log/pgsql 2>&1 where 'flog' is a logfile rotation program... and this no longer seems to work with 7.4.1 - this may not have worked with 7.4 either, but I am sure that it worked with 7.3 and earlier. When I run the above command, it returns to the shell immediately.
9
4070
by: Alexander Cohen | last post by:
(sorry for the double post if there is one - i sent the mail to the lisyt from the wrong address) Hi, Im passing this in the commmand line to start up the PostgreSQL server: ../pg_ctl start -w -D /Volumes/GROUCH\ 2/Database3 but its always giving me this error:
1
1512
by: Alexander Cohen | last post by:
Has anyone attempted to write a version of pg_ctl in C code? Is it in the works anywhere? thanks! -- Alexander Cohen http://www.toomuchspace.com (819) 348-9237 (819) 432-3443
2
1240
by: muteki | last post by:
Hi, I would like to know is the wait_seconds inside the pg_ctl script changable? If not, do you know what would happen if someone changed it from 60 sec to 7 sec? I found that my configuration has been changed by someone else in order to shorten the shutdown wait time. But I am guessing there is some fundamental reasoning for the default values (60sec) and would like to know what's the side effect if this has been modified. Thanks,
0
2168
by: Ed L. | last post by:
On 7.4.6 and earlier, we use apache's log rotation program as follows: pg_ctl start | rotatelogs ... If we have a configuration failure, say a bad parameter in postgresql.conf, we often don't quickly notice because it goes to stdout (into the log). It'd be nice if it went to stderr as well so we could see it without having to search the log, but that wouldn't work if we wanted to capture stderr in the logs (do normal ERROR messages...
10
16430
by: dba123 | last post by:
Why am I getting this error for Budget? Error: An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code Additional information: String was not recognized as a valid Boolean. Public Sub UpdateCustomer_DashboardGraphs(ByVal sender As Object, ByVal e As System.EventArgs)
0
1556
by: fiona | last post by:
Divelements release fully featured Office 2007 style Ribbon control Major component suite designed to mimic the advanced user interface features of Microsoft Office 2007 Dorset, United Kingdom - September 4 2006, Divelements Ltd announces the release of SandRibbon V1. SandRibbon is a suite of controls and components that present your application's commands and features in well-organised lists and popups, divided into logical groups with...
0
1467
by: fiona | last post by:
Dramatically increases support for accessibility as well as fully conforming to the Office 2007 UI license and guidelines Dorset, United Kingdom - January 3 2007, Divelements Ltd announces the release of SandRibbon 1.5 SandRibbon is a suite of controls and components that makes it easy to use the Office 2007 style grouping of commands and features in well-organised lists and popups. Known as the "Ribbon", this new UI paradigm replaces...
0
9650
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9962
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6748
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.