New answers tagged

1

You may want to switch to (or allow) ident auth, then create a local system user with that same name. Then you can just run that script as that user, and it will log you in to postgres with that same user. https://www.postgresql.org/docs/9.0/static/auth-methods.html https://www.postgresql.org/docs/9.0/static/auth-pg-hba-conf.html So something like this ...


1

Take a look at a similar post here: Postgresql: Scripting psql execution with password The overall accepted answer (which may or may not work for your version of Postgres) is to use the PGPASSWORD environment variable like so: PGPASSWORD=[your password] psql -Umyuser < myscript.sql EDIT: Seems as though you tried and this didn't work. Have you looked ...


0

@dilyin Thanks for the update. We updated ulimit value in startup script of PostgreSQL but still the issue was there. Finally we fixed the issue by reducing max_files_per_process to 200 from default 1000. This parameter is in postgresql.conf file and this sets the maximum number of simultaneously open files allowed to each server subprocess.


0

Ah... The known problem. Usually people start to edit "/etc/security/limits.conf" file, but forget that this file only apply to the actively logged in users through the pam system. If you start the database manually using the init script the database proces will inherit your modified limits, mut if the database is started at boot or started by somethis ...


0

I believe you mean arrays? insert into fieldname values ('{"(1,2)","(2,3)"}') Naturally, this is documented.


0

I've never used docker, so can't comment on this, but I would recommend (and I'm using this in production for large, heavily used databases for a long time) the, in my opinion, way to go in (complex) cluster setups: corosync and pacemaker. Use the pgsql resource agent and a virtual, floating IP, to which you connect the clients. If you've never worked with ...


2

Check and make sure postregsql is listening on your interface IP (not just 127.0.0.1). ss -ltn If not, modify the listen_addresses to * or the IP you want. These settings should be in postgresql.conf file generally located in the postgresql data directory. https://www.postgresql.org/docs/9.4/static/runtime-config-connection.html


3

You cannot do this. No RDBMS allow you to keep data in S3. S3 is just an internet object store, each access need you to download the WHOLE object using particular API. It is only practical if the object is small enough to load one time and fit into the memory, e.g. something as small as sqlite that allow you to load in-memory and little to no change to the ...


0

psql -U is trying to work correctly. However, the way postgresql is trying to authenticate you is failing. When you sudo to postgres, the psql command takes your identity from your sudo'ed shell. Without "-U", it tries to use the user ID and looks it up in the list of roles. It says 'hey, the client is running under the user id postgres! We can trust ...


0

This is how I fixed the issue. Sharepoint won't give the option to select the appropriated external data source driver unless you install layer2solutions: www.layer2solutions.com (this is not free) This will give you a new link called "Connect to external data source" on all list settings page which then allows you to select the the ".Net data provider ...


1

The file /usr/local/var/postgres/postmaster.pid is not a PID in itself, it is a text file that contains a PID. In this case it seems to be 1167. Try cat /usr/local/var/postgres/postmaster.pid. The file is there because for some reason postgres was shut down uncleanly. If this PID 1167 exists (ps -p $(cat /usr/local/var/postgres/postmaster.pid) should work ...



Top 50 recent answers are included