PostgreSQL version 9.2

learn more… | top users | synonyms (1)

4
votes
1answer
1k views

Could not open file “pg_clog/0000”: No such file or directory

My local PostgreSql 9.2 database won't start anymore this morning. I am on Windows 7. Yesterday, I performed a Windows Update before going to bed. I have checked the log and found: 2014-05-28 ...
2
votes
1answer
125 views

Postgres 9.2 - postgres - FATAL: XX000: relation mapping file “global/pg_filenode.map” contains incorrect checksum

We have a ~400GB Postgres database (v9.2.6) (running on CentOS 6.5) that had a problem with free space and with every command (ls, pwd etc) we were seeing a segmentation fault error. We were able to ...
1
vote
1answer
33 views

How do I GRANT for all tables across all schemas

I want to GRANT SELECT ON ALL TABLES TO foo; But postgres tells me I have a syntax error at "TO". It expects a GRANT like: GRANT SELECT ON ALL TABLES IN SCHEMA public TO foo; ...
1
vote
1answer
95 views

How to measure or estimate the streaming replication lag in Postgres 9.2

I've been asked to reverse engineer an app that uses postgresql in the back end. I can see that there is some database replica tion going on... based on my reading, I *think it's called streaming ...
1
vote
1answer
80 views

Slow Query with LIMIT

We have this query: SELECT "messages".* FROM "messages" WHERE "messages"."account_id" = 1 AND "messages"."status" = 'unread' AND (created_at >= '2014-04-24 01:00:00.000000') ORDER BY id DESC It ...
0
votes
1answer
78 views

Postgresql Streaming replication - monitoring

I have setup streaming replication for my postgres servers. I am using PostgreSQL 9.2.6. Replication seems to be working fine. I am monitoring this with two ways using nagios: Log_delay and ...
0
votes
1answer
219 views

How to configure postgresql-9.2 to know blk_write_time in pg_stat_database

Interested in the procedure for collecting block write statistics of PostgreSQL 9.2. Steps followed for configuration, could get blk_read time but not blk_write_time CREATE EXTENSION adminpack; and ...
4
votes
0answers
531 views

Getting multiple queries with “show transaction isolation level” in pg_activity

I am using PostgreSQL server for my production use. When I fire a query like select * from pg_stat_activity on my server, I am getting 98% of queries like SHOW TRANSACTION ISOLATION LEVEL and ...
3
votes
0answers
57 views

Recovery from Live to a new Slave Server - PostgreSQL - ERROR

I've started a new SLAVE PostgreSQL server set up. master: 192.168.100.1 slave1: 192.168.100.2 slave2(NEW SLAVE) 192.168.100.3 * NOTE: I run the pg_basebackup from another STANDBY SERVER. Not ...
2
votes
0answers
191 views

2 versions of Postgis installed

For some reason I manage to have 2 versions of postgis installed at the same time due to a wrong update. I can see this as by issuing a select postgis_full_version() i get back version 2.1.0 ...
2
votes
0answers
479 views

PostgreSQL index array of int4range using GIN / GIST - custom operator class

Here is my table: CREATE TABLE mytable ( id INT NOT NULL PRIMARY KEY, val int4range[] ); I want to index the val column: CREATE ...
1
vote
0answers
40 views

Slow query - PostgreSQL 9.2

I've got a Query that takes some time to be executed... Can you guys help to improve the total time? Thank you! QUERY: SELECT file.inode_id AS file_id, file.parent_inode_id AS ...
1
vote
0answers
88 views

PostgreSQL DML statements

I am trying to trick an application into executing a DML statement AFTER starting a SELECT statement without using stacked queries so I cannot use the ; character anywhere in my query. I have resorted ...
1
vote
0answers
163 views

PostgreSQL Idle Session in Transactions with RELEASE_EXEC_SVP queries and lock

I am having a problem with having idle sessions in transactions. In pgAdmin Server Status, it is showing "RELEASE_EXEC_SVP_XXXXXX" (XXXXXX data are varied) as its query and it's locks also contain a ...
1
vote
0answers
40 views

Restore postgresql database from remote sql file

I would like to know if it's possible to restore a database from a remote sql file. The problem: - Working with PostgreSQL 9.2.4 - I have an small remote server with 10GB left in storage - I have a ...
1
vote
0answers
311 views

On Heroku in production, how can I copy database A to database B on command?

From my local terminal, I can use the following commands to do what I need to do: heroku pgbackups:capture --expire heroku pgbackups:restore charcoal --confirm max-kiosk However, I want to do this ...
1
vote
0answers
136 views

Postgresql 9.2 - Auto vacuum running continuously for 18+ hours

I currently have a table that is updated daily (easily 20%+ rows are updated, all floats/integers) and the vacuum is kicking off and running for more than 18 hours. There are 19 million rows total. ...
1
vote
0answers
860 views

PgPool is pushing Postgres to 100% cpu usage

I think I've followed the configuration for pgpool correctly, but he's pushing my postgres machines to 100% cpu usage unnecessarily. I have one pgpool machine that works just fine, no overload at all, ...
0
votes
0answers
23 views

Migration DDL - PostgreSQL 9.2

I'm doing a DDL to migrate all the attachments from the DB to a NFS server. Structure: /userfiles/account/5554/attachment/26687981/file/2790000/main.with_name/photo.j‌​pg ...
0
votes
0answers
20 views

Select ID put into a new Table - PostgreSQL 9.2

I need to select all the File ID's on a table and put the results in the new table I've created. How can I do that? Please, have a look: 1: Select all the file ID's of gorfs.inodes/segments for ...
0
votes
0answers
22 views

Slow Query - Optimize - PostgreSQL 9.2

I've got a slow query.. I'd like to make it faster.. Make add an index? Query: SELECT j.clientid AS client_id, ni.segment_index AS note_id, f.inode_id AS file_id, ...
0
votes
0answers
21 views

Postgres 9.2 replica can't catchup to master

I have configured a master/replica setup for postgres 9.2 on Amazon Linux. PS output shows that the replica is connected and streaming, but also recovering. This has been going on for about 24 hours. ...
0
votes
0answers
32 views

postgres versions differ for root / user

I have upgraded postgres 9.2 to 9.4 on Centos7 following the instructions here, but then I am left with what I think is a slightly weird result: [user@machine]$ sudo bash [sudo] password for user: ...
0
votes
0answers
23 views

what happens to WAL files when standby server is in recovery

in the case where we have SERVER1 (prod db) and SERVER2 (hot standby), what happens to the WAL files from SERVER1 when SERVER2 goes into recovery mode and is opened? On SERVER1, the ARCHIVE_COMMAND ...
0
votes
0answers
166 views

pgpoolAdmin for pgpool-II 3.4 : superuser: unknown (Connection error)

I cannot start/stop/reload my nodes through pgpoolAdmin and it says "superuser: unknown" even though I'm logged with the postgres account. What could be the cause? pgpool.conf is identical to another ...
0
votes
0answers
23 views

Using pipelined order by while fetching only first ten rows

PostgreSQL 9.2 I have the table table: id user_id amount PK integer integer and I need to fetch the first 10 rows as follows: SELECT user_id, SUM(amount) s FROM table GROUP BY ...
0
votes
0answers
31 views

Postgresql indexing for IS NULL

I have two similar queries, whose only difference (in the last two lines) is that one uses IS NULL while the other compares defined values. Query #1 takes only a few minutes: UPDATE ...
0
votes
0answers
501 views

How to enable implicit casts in PostgreSQL >=9.2?

Coming from this topic on SO a user suggest me to enable implicit casts in my PostgreSQL and I don't know how to do that. I also don't know if this is a good practice or if it's the solution to the ...
0
votes
0answers
102 views

Error while inserting values in array in Postgresql

I am writing a Postgresql function that saves some Ids information into the array and later on processing them one by one. I am new to postgresql and finding some difficulties to work with arrays ...
0
votes
0answers
108 views

Postgres 9.2 on Windows

Simple question, but utterly infuriating. Trying to use psql from a command prompt, but can't access any of the previous commands with the up/down cursors. I could also really do with finding out ...
0
votes
0answers
37 views

Preserving tablespace and databases from previous install?

I goofed and destroyed my postgresql 9.2/postgis 2.1 installation under freebsd 9.2 by trying to install mapnik which, for my inconvenience, overwrote it with 9.0. I have, on another spindle, a ...