Tag Info

New answers tagged

0

As of today the latest GA version of MySQL (MySQL-5.6) doSQL-5.6 in the sense that the parallelism happens by database. That means you will have only one thread working at one database. To turn on this feature you will need to set the option --slave-parallel-workers. The next MySQL version 5.7 which is not GA yet, does support more multi-threading. That ...


0

Make sure you are not running out of memory and causing disk thrashing issues. If you have plenty of open memory, then go directly into PostgreSQL and look for an offending query. SELECT * FROM pg_stat_activity;


0

Even if nodejs does include this functionality(it shouldn't), you should really rely on something like pgpool to handle this. You can set it to favor the slave, for reads(or not), and configure it to push all writes to master. This is really not something that should be handled by your framework.


0

To expand on Frank's answer, I have done the following to reset PostgreSQL on Ubuntu 14.04 LTS: sudo service postgresql stop sudo bash # Root permissions to move the data folder mv /var/lib/postgresql/9.3/main ~ # Move the database for safety logout sudo -u postgres bash mkdir /var/lib/postgresql/9.3/main /usr/lib/postgresql/9.3/bin/initdb -D ...


-2

If you only want the create tables, then you can do pg_dump -s databasename | awk 'RS="";/CREATE TABLE[^;]*;/'


0

Found a way. There seemed to be some problem with the extensions that Ninefold was using so by adding a -n public option, it would create the backup only the public schema. PGPASSWORD=password pg_dump -h ipaddress -p port -U user -d database -Fc --no-acl --no-owner -x -O -N postgis -n public > ninefold-backup.dump


0

I was having this problem aswell. I fixed this by doing: cd /var/lib/postgresql/9.1/main #Change 9.1 to your version Remove the symlink to the old certificates sudo rm server.* Then regenerate the certificates openssl genrsa -des3 -out server.key 2048 openssl rsa -in server.key -out server.key.insecure mv server.key server.key.secure mv ...


0

Impossible upgrade the postgresql-client without the postgresql package too. But, it's possible to make the postgresql service doesn't restart until the next OS reboot. Use policy-rc.d cat > ./usr/sbin/policy-rc.d <<EOF #!/bin/sh exit 101 EOF chmod a+x ./usr/sbin/policy-rc.d Just remember to delete policy-rc.d if you want restart PostgreSQL ...


0

If you're using hot_standby_feedback then there can be issues with WAL accumulation on the master. Otherwise there's no real problem if you don't mind your replica getting potentially indefinitely delayed. I strongly recommend setting up WAL archiving if you haven't already.


0

I applied the steps here and they worked for me.


1

Not exactly what you are asking for, but will serve your purpose: 1) Put all of your script files in a folder; and 2) use a bash script to iterate through your files and run psql. For example: SCRIPTS_DIR=/home/myproject/scripts DATABASE_NAME=database_name for file in $SCRIPTS_DIR/*.sql do sudo -u postgres psql $DATABASE_NAME -f $file done This is in ...


0

Have you raised the kernel max segment size too? Try: sysctl -w kernel.shmmax=1258291200


0

The accepted answer didn't help me; if there are others like me please read below. I traced the problem to pg_upgradecluster explicitly unsetting LC_ALL. This made Perl fail whichever way I was playing with the other environmental variables. So what I did is that I simply commented line 352 in /usr/bin/pg_upgradecluster: #delete $ENV{'LC_ALL'}; This did ...


0

Turns out I had locked down which external IP address I could use within the firewall rule. So port 5432 was being seen as filtered from any other IP address. Maybe that is overkill, using both the firewall and pg_hba.conf to limit access to a specific external IP address? Brad



Top 50 recent answers are included