Questions tagged [pg-ctl]
15 questions
5
votes
2 answers
CentOS 7 pg_ctl: could not access directory "/var/lib/pgsql/data": Permission denied
PostgreSQL 10.6 and CentOS 7
pg_ctl status
pg_ctl: could not access directory "/var/lib/pgsql/data": Permission denied`
Wouldn't pg_ctl have access to this, given /var/lib/pgsql/data has ownership postgres:postgres?
drwx------ 3 postgres…

Rich_F
- 1,830
- 3
- 24
- 45
2
votes
1 answer
pg_ctl.exe fails to start with custom postgresql.conf
I'm trying to setup a PS1 script to automated PostgreSQL installation.
Stop PostgreSQL .\pg_ctl.exe -D "$PostgresInstallPath\data" stop
Replace conf file Copy-Item -Path "$PSScriptRoot\postgresql.conf" -Destination…

TKO
- 35
- 3
2
votes
1 answer
PostgreSQL in Windows can't run server in background
I have this problem. My OS is Windows server 2012, when I installed. postgresql-10
I open a cmd.exe windows and script it
pg_ctl -D "\My postgres path\10\data" start
Then, server is running. everything is fine.
but when I close the cmd
My postgres…

Frank Liao
- 855
- 1
- 8
- 25
2
votes
2 answers
Postgres service won't start in Windows after pgdata directory was moved
I followed these instructions to move Postgres data directory from C:\Users\username\Documents\dir\postgres96_data to C:\Users\username\Documents\postgres96_data.
Now the Postgres service won't start. Trying to start it manually yields the following…

pedrovgp
- 767
- 9
- 23
2
votes
1 answer
set initdb encoding for postgres
When I try to call pg_ctl with init[db] the option for setting the encoding is not recognized:
pg_ctl init -D=D:\testdata -E=UTF8 -U=postgres
pg_ctl: illegal option -- E
Has this changed? I used latest PostgreSQL 9.6 (zip download, x64).
When I…

Beachwalker
- 7,685
- 6
- 52
- 94
1
vote
0 answers
Postgres upgrade(10.9 to 12.2) is failing sporadically
Postgres upgrade(10.9 to 12.2) is failing sporadically
We have upgraded postgres cluster from 10.5 to 12.2
10.5 version has also has extension lib PLV8. But we want to get rid of that extension in the upgraded version (12.2)
Before upgrade, we have…

Arju Pidugu
- 23
- 3
1
vote
1 answer
How to shut down Postgres 9.6.11 without pg_ctl on MacOS?
I have multiple installations of Postgres on my MacOS Mojave machine. Version 10.7 is running, and I want to shut it down, in order to start 9.6.
It's definitely running:
$ psql -h localhost -U postgres
Password for user postgres:
psql (9.6.11,…

Steve Bennett
- 114,604
- 39
- 168
- 219
1
vote
0 answers
PostgreSQL 10 => 11.1 pg_upgrade Postmaster Using Old Cluster
I seem to be caught between two operations, both pg_upgrade to change over the PostgreSQL major version, and pg_ctl to control the current postmaster control of the old cluster.
[Sun Dec 30 09:29 rich@HQ /usr/local/var]…

Rich_F
- 1,830
- 3
- 24
- 45
1
vote
2 answers
Read PostgreSQL data directory files
How can i view and read files in PostgreSQL "data\base" directory.
I try to use "pg_ctl" to import this directory to my server as a database but It failed. i try to make a tar archive and restore it using pgadmin, but it return toc heading error.
I…

Maria roies
- 25
- 1
- 5
0
votes
1 answer
pg_ctl command gives no reponse on Ubuntu 20.04 Postgres14
Im new to Ubuntu, Accessing something like pg_ctl wont work. Whats the problem here? Is it not installed? Or is it something else? Would really appreciate some help
Guy@GuyLinux:~$ sudo -i -u postgres
[sudo] password for guy:
postgres@GuyLinux:~$…

Milanor
- 51
- 5
0
votes
1 answer
Set timeout to Postgres service pg_ctl
My PostgreSQL service is timing out. I have read here that if not provided, default timeout is 60 seconds and we can configure PGCTLTIMEOUT environment variable. I am not sure whether to add in for user or for system and how can I validate that it…

Imad
- 7,126
- 12
- 55
- 112
0
votes
2 answers
pg_Ctl -data directory has wrong ownership
I am unable to start the Postgres server and whenever I use pg_ctl I am getting the following error - can some one help me to fix this. I changed the folder permissions using CHmod and tried running with Sudo -s also but still the problem…

Radhakrishnan Rajendran
- 21
- 1
- 6
0
votes
1 answer
how to add database in a new cluster in postgreSQL?
I am using
sudo pg_createcluster -u=$USER --datadir=candisDatabase -l=candisDatabase/candis.psql.log 9.6 candisCluster
to create a new database cluster with the specified directory as candisDatabase under the account $USER (which is…

rupav jain
- 645
- 1
- 7
- 13
0
votes
0 answers
Is it necessary to run pg_ctlcluster stop on Ubuntu 16.04 before shutting down?
I haven't run
pg_ctlcluster stop
or
pg_ctl stop
or
sudo systemctl stop postgresql@9.6-main
before rebooting since I installed Postgres on my Ubuntu 16.04 machine.
I'm wondering if I've been lucky (since I've detected no database problems) or…

RalphShnelvar
- 557
- 1
- 6
- 17
0
votes
0 answers
I can't stop postgresql server on ssh with Jenkins
I try to do some actions on my Postgresql sever and I restart it...
I'm doing that with a Jenkins job, so I use script from my Jenkins machine who connect on ssh to the postgresql server. But problem, it display me this since 2hours
and when I try…
user7127267