Re: Migration of Oracle Vault to Postgres

2023-09-22 Thread Laurenz Albe
On Fri, 2023-09-22 at 11:36 +0800, Elango Thiagarajan wrote: > We are planning to migrate Oracle Enterprise edition to Azure Postgresql. > > Our oracle database is guarded by Oracle Vault. Do we have similar security > on Postgres. > > Any Whitepapers on how to migrate vault to Postgres. You wi

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread Luca Ferrari
On Thu, Sep 21, 2023 at 7:46 PM Dominique Devienne wrote: > > Hi. To administer our PostgreSQL-based system, we have custom tools > to manage the schemas, load data, etc... Including a versatile CLI tool. > > But that tool is special purpose, while sometimes we want/need the general > purpose PSQL

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread Luca Ferrari
On Fri, Sep 22, 2023 at 12:13 PM Dominique Devienne wrote: > So my question is how I pass the password my tool already own, to the forked > PSQL, > w/o that password leaking. I could pass it on the command-line, but that > would be leaking > it to the `ps` command (and in various other places).

Re: debugger from superuser only.... why?

2023-09-22 Thread Luca Ferrari
On Wed, Sep 20, 2023 at 9:32 AM Александр Петросян (web) wrote: > > Checked few sources, can not seem to find reasoning behind this limit: > > > You must have superuser privileges to use the debugger. > It means database superuser. > What is the reason? I suspect the debugger will need to open

Re: debugger from superuser only.... why?

2023-09-22 Thread Luca Ferrari
On Fri, Sep 22, 2023 at 1:28 PM Alexander Petrossian wrote: > SELECT * FROM pldbg_set_global_breakpoint(1, 65695, -1, NULL); > > ERROR: must be a superuser to create a breakpoint > > > I am wondering why is this, why not allow debugging for non-privileged users? Again, I'm suspecting that this de

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread Dominique Devienne
On Fri, Sep 22, 2023 at 12:45 PM Luca Ferrari wrote: > On Fri, Sep 22, 2023 at 12:13 PM Dominique Devienne > wrote: > > So my question is how I pass the password my tool already own, to the > forked PSQL, > > w/o that password leaking. I could pass it on the command-line, but that > would be lea

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread Dominique Devienne
On Fri, Sep 22, 2023 at 10:56 AM Luca Ferrari wrote: > On Thu, Sep 21, 2023 at 7:46 PM Dominique Devienne > wrote: > > and I also need to run some PSQL \commands and SQL to config PSQL > correctly > > for the context our tool was run with (i.e. our tool's own CLI options). > > > > Isn't .psqlrc

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread Francisco Olarte
On Fri, 22 Sept 2023 at 15:25, Dominique Devienne wrote: > On Fri, Sep 22, 2023 at 12:45 PM Luca Ferrari wrote: ... >> I think that forking a beast like psql will make you incurring into a >> lot of security problems that are worst your "password leak". > I'm sorry, but this doesn't make sense to

Re: debugger from superuser only.... why?

2023-09-22 Thread Luca Ferrari
On Fri, Sep 22, 2023 at 2:00 PM Alexander Petrossian (PAF) wrote: > Some mail list you would suggest, Luka? > pgadmin mailing list, or ask EDB somehwere. >> >> > SELECT * FROM pldbg_create_listener(); >> uh oh, it mentions a listener...then there must be some "sender" >> somehwere, that probably

How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread David G. Johnston
On Friday, September 22, 2023, Luca Ferrari wrote: > > > That's why I'm asking the community how best to the forked PSQL can > connect w/o password prompting. > > psql and lipq can exploit .pgpass for exactly that aim: not messing > around with passwords. > Again, I would discourage you to fork p

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread Dominique Devienne
On Fri, Sep 22, 2023 at 5:19 PM Luca Ferrari wrote: > On Fri, Sep 22, 2023 at 3:24 PM Dominique Devienne > wrote: > You added information I was not aware before: you are dumping > PostgreSQL to restore it into SQLite, while I was thinking you wanted > to do some stuff with a PostgreSQL-to-Postgr

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread Brad White
Seems to me that your tool could set the env var that you want. If you don't export it, I think it shouldn't "leak" but your child process should get it as part of their environment. On Fri, Sep 22, 2023 at 12:43 PM Dominique Devienne wrote: > On Fri, Sep 22, 2023 at 5:19 PM Luca Ferrari wrote:

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread David G. Johnston
On Friday, September 22, 2023, Dominique Devienne wrote: > > > I already told you my app is LIBPQ aware, including about PGPASSWORD and > PGSERVICE. > It's users who decide to use these mechanisms (which have plain-text > passwords BTW...), not my tool. > The same way PSQL prompts for a password w

Start service

2023-09-22 Thread Brad White
I'm trying to start a v15 service on a Windows 2012 R2 server where it hasn't been used for a while. The service is set to run as pgUser. pgUser owns the Postgres directory, including the data dir. The command the service is using is ' "C:\Program Files\PostgreSQL\15\bin\pg_ctl.exe" runservice

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread Luca Ferrari
On Fri, Sep 22, 2023 at 3:24 PM Dominique Devienne wrote: > I'm talking of replacing using my tool then psql, with using my tool that > forks psql. I thought you were talking about forking the source code to write your own psql, sorry about that. It is clear to me that you mean Unix fork(2) and

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread Tom Lane
"David G. Johnston" writes: > Once you have the password you should utilize the PGPASSWORD environment > variable to get it passed to psql. It doesn’t matter in the least how you > obtained that password in the first place. Keep in mind that on many flavors of Unix, a process's environment varia

Re: Start service

2023-09-22 Thread Brad White
Good guess, but no. I should have mentioned that I checked that. There is, though, a postmaster.opts file that wasn't there earlier. It contains C:/Program Files/PostgreSQL/15/bin/postgres.exe "-D" "C:\Program Files\PostgreSQL\15\data" Note the lack of quotes around the exe path. On Fri,

Re: debugger from superuser only.... why?

2023-09-22 Thread postgresql439848
hi, the first steps to use debugger: 1. modify config file 2. restart server ... i would say, enough reasons to be superuser or not?

Re: Start service

2023-09-22 Thread Brad White
I created the pid file by hand and I get C:\Users\administrator>"C:\Program Files\PostgreSQL\15\bin\pg_ctl.exe" start -N "postgresql-x64-15" -D "C:\Program Files\PostgreSQL\15\data" -w -U TMA\pgUse r -P *** pg_ctl: another server might be running; trying to start server anyway

Re: Start service

2023-09-22 Thread postgresql439848
Am 22.09.23 um 20:40 schrieb Brad White: I'm trying to start a v15 service on a Windows 2012 R2 server where it hasn't been used for a while. The service is set to run as pgUser. pgUser owns the Postgres directory, including the data dir. The command the service is using is ' "C:\Program Fi

StackBuilder unexpected restart

2023-09-22 Thread russcampbell
I downloaded and installed Postgres 15.4 and then let StackBuilder run. All I installed was pgAgent and the four drivers. The software notified me that I should choose "Restart Later" or "No" if I was asked about restarting. Instead of getting that type of question along the way, I got no such ques

Re: Start service

2023-09-22 Thread Brad White
So, there were two issues. Even though admin is in the admin group and had Full Control under effective permissions, somehow that wasn't enough. I noticed that I can run the v14 service, but it had Admin explicitly listed with full control on Data. Once I added that, I started getting error message

Re: Start service

2023-09-22 Thread Nick Ivanov
I'd check if there is already "postmaster.pid" in C:\Program Files\PostgreSQL\15\data, left over from a previous abend. On Fri, Sep 22, 2023 at 2:40 PM Brad White wrote: > I'm trying to start a v15 service on a Windows 2012 R2 server where it > hasn't been used for a while. > The service is set

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread Dominique Devienne
On Fri, Sep 22, 2023 at 8:56 PM Tom Lane wrote: > "David G. Johnston" writes: > > Once you have the password you should utilize the PGPASSWORD environment > > variable to get it passed to psql. It doesn’t matter in the least how > you > > obtained that password in the first place. > > Keep in m

Ubuntu 18 + PHP 8.2 + PDO: can't find drivers

2023-09-22 Thread Chris Kelly
The need has mostly passed (I used another computer with Ubuntu 20) but are there clear, *working* instructions for how to connect to Postgress on Ubuntu 18 via PDO? I don't see drivers that would work. This is for a Drupal site.

Re: Ubuntu 18 + PHP 8.2 + PDO: can't find drivers

2023-09-22 Thread Adrian Klaver
On 9/22/23 13:39, Chris Kelly wrote: The need has mostly passed (I used another computer with Ubuntu 20) but are there clear, *working* instructions for how to connect to Postgress on Ubuntu 18 via PDO? I don't see drivers that would work. This is for a Drupal site. 1) I'm assuming that when

Re: How to fork pg_dump or psql w/o leaking secrets?

2023-09-22 Thread David G. Johnston
On Friday, September 22, 2023, Dominique Devienne wrote: > > Remember that I'm already connected in the "parent" process, to the DB. > There aught to be a way to obtain a token from the DB via a connection, > with a short duration, to supply to the exec'd PostgreSQL tools like psql > or pg_dump,

Re: Ubuntu 18 + PHP 8.2 + PDO: can't find drivers

2023-09-22 Thread Ray O'Donnell
On 22 September 2023 21:40:38 Chris Kelly wrote: The need has mostly passed (I used another computer with Ubuntu 20) but are there clear, *working* instructions for how to connect to Postgress on Ubuntu 18 via PDO? I don't see drivers that would work. This is for a Drupal site. From memory

Re: Ubuntu 18 + PHP 8.2 + PDO: can't find drivers

2023-09-22 Thread Ray O'Donnell
On 22 September 2023 21:40:38 Chris Kelly wrote: The need has mostly passed (I used another computer with Ubuntu 20) but are there clear, *working* instructions for how to connect to Postgress on Ubuntu 18 via PDO? I don't see drivers that would work. This is for a Drupal site. PS - depend

Re: connecting to new instance

2023-09-22 Thread Alan Hodgson
On Fri, 2023-09-22 at 17:08 -0500, Brad White wrote: > I have the v15 service started and listening on 0.0.0.0:5434. > Through TCPView, I can see it listening on 5434, I can see the > previous version listening and connecting on 5432. > I can connect from localhost to port 5434. > I have ipv6 turne

Re: connecting to new instance

2023-09-22 Thread Adrian Klaver
On 9/22/23 15:08, Brad White wrote: I have the v15 service started and listening on 0.0.0.0:5434 . Through TCPView, I can see it listening on 5434, I can see the previous version listening and connecting on 5432. I can connect from localhost to port 5434. I have ipv6 turned

connecting to new instance

2023-09-22 Thread Brad White
I have the v15 service started and listening on 0.0.0.0:5434. Through TCPView, I can see it listening on 5434, I can see the previous version listening and connecting on 5432. I can connect from localhost to port 5434. I have ipv6 turned off in the network settings on both machines. >From any other

Re: Changed functionality from 14.3 to 15.3

2023-09-22 Thread Michael Corey
I created a clean 14.3 server with everything default on server creation. Ran the setup script did the test and again I was able to query the data successfully. I then decided to create a clean 15.3 server with everything default. Ran the setup script did the test and was not able to query the da