The Stack Overflow podcast is back! Listen to an interview with our new CEO.
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 4403

All versions of PostgreSQL. Add an additional version-specific tag like postgresql-11 if that context is important.

5
votes
1answer
I'm trying to run a query that should return around 2000 rows, but my RDS-hosted PostgreSQL 9.3 database is giving me the error "out of memory DETAIL: Failed on request of size 2048.". What does …
asked Apr 3 '14 by Cerin
0
votes
1answer
How do you diagnose why an instance of psql is hanging mid-way through executing a SQL script? I have a sanitation script with a bunch of UPDATE statements like: UPDATE table1 SET column1 = CONCAT(' …
asked May 17 '18 by Cerin
1
vote
The problem ended up being some obscure bug in Bash. I was calling psql from a Bash script, which was being called from another Bash script, which was being run from a Cron job, which was redirecting …
answered Jun 1 '18 by Cerin
-1
votes
2answers
I have a PostgreSQL 9.3 database with two tables, table B with 100 million records linked via a FK constraint to another table A with around 10 million records. Occasionally I need to delete a … unresponsive and wouldn't let me connect back in, forcing me to restart it. I understand that PostgreSQL doesn't scale well, and isn't a good database for large-data applications, but is there any way to delete this constraint, or am I stuck with it forever? …
asked Apr 14 '17 by Cerin
2
votes
postgresql stop ssh -t myuser@oldserver "sudo service postgresql stop" # Ensure our user owns postgres's files so our rsync call can access them. ssh -t myuser@oldserver "sudo chown -R myuser:myuser … /etc/postgresql" ssh -t myuser@oldserver "sudo chown -R myuser:myuser /var/lib/postgresql" # Copy down all the files. sudo rsync --progress -azv --delete myuser@oldserver:/etc/postgresql/9.5/main …
answered May 24 '17 by Cerin
0
votes
0answers
How do you estimate the total time reindexing an entire table will take in PostgreSQL? I have a large PostgreSQL database, the primary table of which has 15 million records and 100 columns, and 200 …
asked Feb 3 '16 by Cerin
3
votes
Empirically, I've found GIN indexes need to be re-indexed after I've inserted a large number of rows into the table. I had a table with 15 million rows that had a GIN index that let me do a keyword s …
answered Feb 9 '16 by Cerin
0
votes
2answers
I have a large PostgreSQL database on a server with a failing disk. I cannot run pg_dump because of disk errors. I have another server with the identical OS (Ubuntu 16.04) and the identical version … of PostgreSQL (9.5.6). How do I copy the raw database files to the new server? I don't care if read errors corrupt parts of the database, as I have ways of identifying and fixes those issues, but I …
asked May 23 '17 by Cerin
3
votes
1answer
How do you estimate the total time reindexing an entire table will take in PostgreSQL? I have a large PostgreSQL database, the primary table of which has 15 million rows with 100 columns and 200 …
asked Feb 3 '16 by Cerin
2
votes
I found this post and this post helpful, but like others have mentioned, it can be difficult to calculate the overall progress of vacuum, since the process involves a few separate operations. I use t …
answered Aug 12 by Cerin
1
vote
0answers
What would account for the difference in table sizes between one PostgreSQL database and another restored from its dump file? On an Ubuntu 12.04 host, I'm running PostgreSQL 9.1, and I dumped my …
asked Feb 6 '14 by Cerin
0
votes
1answer
The hard drive on my PostgreSQL 9.5 server died, but I managed to recover most of the data. I've restored the database to a solid state hard drive, and I can access most of the data. However, when I …
asked Jan 17 by Cerin
2
votes
1answer
How do you index a table in PostgreSQL so that min/max queries return as quickly as possible? I have a large table with a couple hundred million rows. Each row as a source_id and a date when the …
asked Apr 12 '17 by Cerin
4
votes
1answer
I have a COUNT(*) query in PostgreSQL that runs often, and looks like: SELECT COUNT(*) FROM customer WHERE source_id IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); This query …
asked Jan 22 '16 by Cerin