Thread: Disable unix-domain sockets?

Disable unix-domain sockets?

From
Murray Cumming
Date:
I'd like to avoid having to specify the unix socket directory when
starting local instances of postgres, due to the new restrictions on the
characters that can be in its path
http://archives.postgresql.org/pgsql-bugs/2012-09/msg00012.php
(only partly solved by a recent commit):

This needs to be specified with the -k command line parameter:
http://www.postgresql.org/docs/9.2/static/app-postgres.html
or the unix_socket_directory configuration setting:
http://www.postgresql.org/docs/9.2/static/runtime-config-connection.html#GUC-UNIX-SOCKET-DIRECTORY
where it is documented as being for unix-domain socket connections.

I hoped that if I didn't use "local" in my pg_hba.conf file, instead
using just "host", then postgresql might not allow unix socket
connections at all, so it wouldn't need to create that .lock file.
http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html

But postgres still tries to create the .lock file, failing here on
Fedora because it defaults not to /tmp but to /var/run/postgresql, which
the local user can't write to.

So is there some way to avoid the need for the .lock file, or should the
documentation say that the directory is needed regardless of the
connections allowed?

And if not, is there any downside to just using /tmp ?

--
murrayc@murrayc.com
www.murrayc.com
www.openismus.com



Re: Disable unix-domain sockets?

From
Tom Lane
Date:
Murray Cumming <murrayc@murrayc.com> writes:
> I hoped that if I didn't use "local" in my pg_hba.conf file, instead
> using just "host", then postgresql might not allow unix socket
> connections at all, so it wouldn't need to create that .lock file.
> http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html

> But postgres still tries to create the .lock file, failing here on
> Fedora because it defaults not to /tmp but to /var/run/postgresql, which
> the local user can't write to.

If you are using a version that defaults to /var/run/postgresql, then
it is new enough to have the unix_socket_directories parameter.  Setting
that to empty should do the trick.  pg_hba.conf is not the place to
configure which ports/sockets PG listens on.

            regards, tom lane


migrate from PostgreSQL to Oracle

From
jo
Date:
Hi all,

I'm working with same db schema in PostgreSQL and Oracle,
We mainly work in PostgreSQL but sometimes we need to copy schema and
data from pg to oracle
because some our customers want to use oracle instead of pg.

Thus I'm looking for some linux script to migrate from pg to oracle.
At the moment, I dump data from pg using pg_dump in the format:
INSERT INTO table (columns) (values)
then I load it into the Oracle db using cx_Oracle
this procedure is so slow, and sometimes I have to edit and modify
data manually, because some INSERT format aren't compatible.
Is there any interesting linux script to do this more easily? something
like the ora2pg script.

thanks

j



Re: migrate from PostgreSQL to Oracle

From
Alban Hertroys
Date:
On 25 October 2012 15:50, jo <jose.soares@sferacarta.com> wrote:
> Hi all,
>
> I'm working with same db schema in PostgreSQL and Oracle,
> We mainly work in PostgreSQL but sometimes we need to copy schema and data
> from pg to oracle
> because some our customers want to use oracle instead of pg.

That sounds like a job for an ETL tool, for example Pentaho.

--
If you can't see the forest for the trees,
Cut the trees and you'll see there is no forest.


Re: migrate from PostgreSQL to Oracle

From
Martin Gainty
Date:
squirrel

http://www.squirrelsql.org/index.php?page=plugins

Saludos desde EEUU
Martin
______________________________________________
Porfavor ..no altere o interrumptir esta communicacion

> Date: Thu, 25 Oct 2012 15:50:08 +0200
> From: jose.soares@sferacarta.com
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] migrate from PostgreSQL to Oracle
>
> Hi all,
>
> I'm working with same db schema in PostgreSQL and Oracle,
> We mainly work in PostgreSQL but sometimes we need to copy schema and
> data from pg to oracle
> because some our customers want to use oracle instead of pg.
>
> Thus I'm looking for some linux script to migrate from pg to oracle.
> At the moment, I dump data from pg using pg_dump in the format:
> INSERT INTO table (columns) (values)
> then I load it into the Oracle db using cx_Oracle
> this procedure is so slow, and sometimes I have to edit and modify
> data manually, because some INSERT format aren't compatible.
> Is there any interesting linux script to do this more easily? something
> like the ora2pg script.
>
> thanks
>
> j
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general