Tagged Questions
3
votes
1answer
196 views
timelines and history files postgresql 9.1
Can someone explain me the purpose of timelines and history files and the setting 'recovery_target_timeline' in recovery.conf.
The vague understanding I got from the postgresql 9.1 documentation is ...
2
votes
1answer
165 views
Very slow query when matching text field is not empty string
I have a very simple query that is essentially this:
Select * from my_table Where my_field != '';
There are about 40,000 rows in the table and the "my_field" column is a text field (varchar 255)
...
1
vote
1answer
24 views
Closest match in text fields between two tables: how to improve plpgsql function
I am trying to geocode data in one table (A) with address data contained in another table (B). As street names can be written differently, I would like to first go through the data in A and for each ...
1
vote
1answer
60 views
How can use custom_variable_class
i am create custom_variable_class= myapp in postgresql.conf. And set the value is inside of function like
CREATE OR REPLACE FUNCTION fn_purchase(xmode text, xuserno integer)
RETURNS text AS
set ...
1
vote
1answer
2k views
incorrect checksum in control file error for postgres 9.1.3 data created in osx-Lion and accessed in osx-snow-leopard
I get the following error when trying to start postgres using the data created in another mac machine.
FATAL: incorrect checksum in control file
The postgres version is 9.1.3 and the data ...
1
vote
1answer
201 views
ActiveRecord with Postgres: Has Many Through and Indexing
Let's say you have three models:
class Collection < ActiveRecord::Base
has_many :comments, through => :users
end
class User < ActiveRecord::Base
belongs_to :collection
has_many ...
0
votes
1answer
21 views
Accessing Postgresql results
I wrote a query and it returns a result set as below,
result = [
{"total_requests" : "4", "requesttimestamp" : null},
{"total_requests" : "2", "requesttimestamp" : null},
{"total_requests" : "4", ...
1
vote
0answers
26 views
How to create 2 node Active/Active postgresql cluster in Ubunutu
I want to create a two node postgresql cluster which runs in Active/Active mode. How can I do this in Ubuntu?
1
vote
0answers
25 views
PostgreSQL Cluster Startup Race Condition?
My software process depends on the existence of a specific database in the local PostgreSQL cluster. PostgreSQL and my software process are both started by upstart on system start. A script is ...
1
vote
0answers
89 views
Low Postgres Cache Hit Ratio - data size or something else?
I've just upgraded my Heroku postgres database from the Kappa plan (800MB RAM, postgres 9.1) to the Ronin plan (1.7GB RAM, postgres 9.2), but performance has degraded.
Following the guide here, I ...
0
votes
0answers
22 views
encoding issues with importing csv in postgres
basically I want to import my xlsx data into postgres . Now for that I am converting xlsx file into .csv changing its encoding to utf 8 .
Then I am using the:
COPY JS FROM ...
0
votes
0answers
40 views
How to compile a Package using a psql command script
We are creating a wrapper script (This script will be used to setup a db i.e create schema , Create table , Create packages etc) which will call multiple scripts within it. This is how we have made ...
0
votes
0answers
15 views
Apache APR DBD: what does error code 7 returned by apr_dbd_select() means?
I use APR for PostgreSQL communication. When i shut down PostgreSQL server, the apr_dbd_select() function returns code 7. The apr_dbd_error() function returns the following string for error code 7:
...
0
votes
0answers
46 views
postgresql to mssql query conversion
can any one help me to convert the following query into mssql which is working on postgresql now
query is to take the updated datetime of the report in the asc order of the date
select
count(*) ...
0
votes
0answers
21 views
Multiple Relations on the same model
i'm having a problem retrieving related data of my model ProductsPproduct when i search with contain. My table is basically a mapping between ordered products and produced products for example ...