3
votes
1answer
186 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
147 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
18 views

Why would ALTER TABLE DROP CONSTRAINT on an empty table take a long time?

I am trying to load several million rows of data into a table (a "follow" table that contains two foreign keys to the user table, and the associated indexes on those keys) in a single transaction. My ...
1
vote
1answer
51 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 ...
0
votes
1answer
14 views

column spree_preferences.key does not exist

When I run rake db:migrate I get the following error message. PG::Error: ERROR: column spree_preferences.key does not exist` Anyone can please tell me how to fix this error.
0
votes
1answer
24 views

Postgre SQL incorrect syntaxt near If

I'm trying to create function but it's having error at If statement don't know what's the problem with it. CREATE FUNCTION uspgetcountrylistwithpagenumber(IN "PageNumber" integer, IN "PageSize" ...
0
votes
1answer
27 views

Error “invalid byte sequence” while restoring PostgreSQL database

Today when I am trying to restore my postgresql database(8.1.22) from production using pgadmin3. After restoring it thrown some errors like WARNING: errors ignored on restore: 4 and i found that out ...
0
votes
1answer
52 views

Creating a Unique PostgreSQL Index that Contains Operations

I would like to create a unique PostgreSQL index that contains operations. Does anyone know if this is possible? CREATE UNIQUE INDEX ux_data ON table (name, color) The operation that I would like ...
0
votes
1answer
151 views

converting image to byte array and store in postgresql using function

In my case , I want store image to database(postgresql) using storeprocedure. my database is in server. I am converting the image into byte array in front end. Now i need to know How to pass the ...
1
vote
0answers
23 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
62 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
12 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
41 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
19 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 ...

1 2
15 30 50 per page