Clients connect to our PostgreSQL 8.3 database but leave the connections opened. Is it possible to configure PostgreSQL to close those connections after a certain amount of inactivity?
I have a database column called auto_review where column type is boolean.
There is an index for that field, created using the ActiveRecord ORM.
CREATE INDEX index_table_on_auto_renew ON table USING btree (auto_renew);
When I query the field for a…
I'm attempting to import a CSV file into a database via the "COPY" command; however, I get the (what seems common) error that I need to be a superuser and that I should use "\copy" instead. However, when using \copy, I get a syntax error:
ERROR: …
I am developing a function in Postgres which aims to recover for each record of a query the value of a result of a check contained in a set of functions. Only one of these functions will return the correct value. These functions have a common prefix…
I am using PostgreSSQL 8.3.
I want to execute this query:
select COALESCE(col_fr,col,'Unknown') from my_table where id = 'abc';
Twist in the story is column name colum_fr should be generated dynamically. my_table has different columns for different…
I posted this on StackOverflow and it was suggested this query was better suited here.
I'm trying to encourage the use and monitoring of autovacuum in some PostgreSQL 8.3 databases.
One objection I hit often is that people don't "trust" autovacuum…
I have a table with about 10 million records. I want to do a simple group by, but it's using a sequential scan and is slow...
select run_id, count(*) from result group by run_id;
I have an index defined on the run_id column.
How can I speed this…
I have a Postgresql database that need to read data from two SQL Servers (one SQL Server 2000 and one SQL Server 2008).
I want to setup two dblinks to the SQL Servers.
After googling, foruming, reading documentation, I struggle to find something…
We have a PostgreSQL 8.3.7 database suffering severe bloat after an algorithmic change. Unfortunately upgrading isn't an option at this time.
For a particular group of partitioned count roll-up tables, we used to update them by selecting then either…
I don't know if this question better suits here or in SO ...
This is a script that I'd like to launch (the code of the function was copied from a question on SO):
\c mydb
create or replace function truncate_tables(username in varchar) returns void…
I would like to upgrade a PostgreSQL 8.3 server to PostrgreSQL 8.4. There are many software components that interact with the server over the network, and I am concerned with compatibility issues.
Is there any interface change between the different…
I just created a new cluster using PostgreSQL 8.3 and looks like everything worked. What I am having issues with is trying to start the server of this new cluster. My two clusters are on different ports. When looking online to start the new…
I would like to simulate putting postgresql into "recovery mode".
Few times i have situation where postgresql puted himself into recovery mode. In logs i had:
Oct 18 06:37:35 xx postgres[5738]: [19-1] 2014-10-18 06:37:35.441 CEST|5738|xx|yy|FATAL: …
I am using postgresql 8.3 in a read/write heavy application where data are being written to the database from a background process while they are also being read/written from a web application.
At peak hours, we notice performance problems in the…
I have a database in Postgres 8.3 (and PostGIS 4.2), which I need to import in Postgres 10.5.
I am a DB newbie and would appreciate any pointers to get started.