pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
how to change the port number for the Postgres server
3+ messages / 3 participants
[nested] [flat]

* how to change the port number for the Postgres server
@ 2007-09-12 17:10  Jessica Richard <rjessil@yahoo.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Jessica Richard @ 2007-09-12 17:10 UTC (permalink / raw)
  To: pgsql-admin

Everything was running fine under the default number 5432. After the port number was changed to another number  in postresql.conf file and the server was restarted, dblink is broken, it is still looking for the old port number 5432... not sure if everything else is broken as well... 

So, how to change the port number cleanly? There other Postgis components on the system too.

Thanks,
Jessica

       
---------------------------------
Need a vacation? Get great deals to amazing places on Yahoo! Travel. 

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: how to change the port number for the Postgres server
@ 2007-09-12 17:23  Kevin Kempter <kevin@kevinkempterllc.com>
  parent: Jessica Richard <rjessil@yahoo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Kevin Kempter @ 2007-09-12 17:23 UTC (permalink / raw)
  To: pgsql-admin

On Wednesday 12 September 2007 11:10:51 Jessica Richard wrote:
> Everything was running fine under the default number 5432. After the port
> number was changed to another number  in postresql.conf file and the server
> was restarted, dblink is broken, it is still looking for the old port
> number 5432... not sure if everything else is broken as well...
>
> So, how to change the port number cleanly? There other Postgis components
> on the system too.
>
> Thanks,
> Jessica
>
>
> ---------------------------------
> Need a vacation? Get great deals to amazing places on Yahoo! Travel.


Not sure if this is a full fix per dblink but you might try setting this in 
the postgres .bashrc or .profile (or even in /etc/profile)

export PGPORT=5555 
# of course change 5555 to your new port number


/Kevin



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: how to change the port number for the Postgres server
@ 2007-09-12 17:34  Joe Conway <mail@joeconway.com>
  parent: Jessica Richard <rjessil@yahoo.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Joe Conway @ 2007-09-12 17:34 UTC (permalink / raw)
  To: Jessica Richard <rjessil@yahoo.com>; +Cc: pgsql-admin

Jessica Richard wrote:
> Everything was running fine under the default number 5432. After the 
> port number was changed to another number  in postresql.conf file and 
> the server was restarted, dblink is broken, it is still looking for the 
> old port number 5432... not sure if everything else is broken as well...
> 
> So, how to change the port number cleanly? There other Postgis 
> components on the system too.

postgresql.conf only affects the server. dblink is a client.

Either set PGPORT environment variable, or explicitly call out the port 
number you want as part of the libpg connection string. See:

http://www.postgresql.org/docs/8.2/interactive/libpq-envars.html
http://www.postgresql.org/docs/8.2/interactive/libpq-connect.html

HTH,

Joe




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2007-09-12 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-09-12 17:10 how to change the port number for the Postgres server Jessica Richard <rjessil@yahoo.com>
2007-09-12 17:23 ` Kevin Kempter <kevin@kevinkempterllc.com>
2007-09-12 17:34 ` Joe Conway <mail@joeconway.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox