Re: [GENERAL] unexpected error tables can have at most 1600 columns

2015-04-13 Thread Day, David
Pavel, Thanks so much. This seems to help explain the problem. I can say that the patch file had a later statement with an error related to search_path setup. Given that the logic that applies patches repeat attempts for an extended period of time, I speculate that the rollback of the patch

Re: [GENERAL] Hot standby problems: consistent state not reached, no connection to master server.

2015-04-13 Thread Guillaume Lelarge
Le 12 avr. 2015 16:50, Ilya Ashchepkov koc...@gmail.com a écrit : Hello. I'm setting up hot standby slave. It recovers from wal archive files, but I can't connect to it: $ psql psql: FATAL: the database system is starting up On master: # select name,setting from pg_settings where name

Re: [GENERAL] Re: Hot standby problems: consistent state not reached, no connection to master server.

2015-04-13 Thread Adrian Klaver
On 04/13/2015 11:25 AM, Ilya Ashchepkov wrote: On Mon, 13 Apr 2015 10:06:05 -0700 Adrian Klaver adrian.kla...@aklaver.com wrote: On 04/13/2015 09:42 AM, Ilya Ashchepkov wrote: On Sun, 12 Apr 2015 17:30:44 -0700 Adrian Klaver adrian.kla...@aklaver.com wrote: If a connection is not

[GENERAL] Re: Hot standby problems: consistent state not reached, no connection to master server.

2015-04-13 Thread Ilya Ashchepkov
On Mon, 13 Apr 2015 10:06:05 -0700 Adrian Klaver adrian.kla...@aklaver.com wrote: On 04/13/2015 09:42 AM, Ilya Ashchepkov wrote: On Sun, 12 Apr 2015 17:30:44 -0700 Adrian Klaver adrian.kla...@aklaver.com wrote: Oh! I missed this! Thank you! Now slave reached consistent state some

[GENERAL] bigserial continuity safety

2015-04-13 Thread Pawel Veselov
Hi. If I have a table created as: CREATE TABLE xq_agr ( idBIGSERIAL PRIMARY KEY, node text not null ); and that multiple applications insert into. The applications never explicitly specify the value for 'id'. Is it safe to, on a single connection, do: - open

Re: [GENERAL] bigserial continuity safety

2015-04-13 Thread David G. Johnston
On Mon, Apr 13, 2015 at 3:05 PM, Pawel Veselov pawel.vese...@gmail.com wrote: Hi. If I have a table created as: CREATE TABLE xq_agr ( idBIGSERIAL PRIMARY KEY, node text not null ); and that multiple applications insert into. The applications never

Re: [GENERAL] Help with slow table update

2015-04-13 Thread David G. Johnston
On Mon, Apr 13, 2015 at 5:01 PM, Pawel Veselov pawel.vese...@gmail.com wrote: r_agrio_hourly - good, r_agrio_total - bad. Update on r_agrio_hourly (cost=0.42..970.32 rows=250 width=329) (actual time=2.248..2.248 rows=0 loops=1) - Index Scan using u_r_agrio_hourly on r_agrio_hourly

[GENERAL] recovery of a windows archive in linux

2015-04-13 Thread Guillaume Drolet
Dear list, I have a base backup and archive logs from a Windows 7 PGSQL 9.3 install. The machine OS disk started to show signs of failure so I replaced it and now I want to switch for a Linux system. My question is: will I be able to play my archive logs and point-in-time recover on the Linux

Re: [GENERAL] bigserial continuity safety

2015-04-13 Thread Jim Nasby
On 4/13/15 7:45 PM, David G. Johnston wrote: On Mon, Apr 13, 2015 at 3:05 PM, Pawel Veselov pawel.vese...@gmail.com mailto:pawel.vese...@gmail.comwrote: Hi. If I have a table created as: CREATE TABLE xq_agr ( idBIGSERIAL PRIMARY KEY, node

Re: [GENERAL] Help with slow table update

2015-04-13 Thread Pawel Veselov
On Sun, Apr 12, 2015 at 5:40 PM, Jim Nasby jim.na...@bluetreble.com wrote: On 4/9/15 6:18 PM, Pawel Veselov wrote: Hi. I have a plpgsql procedure that updates a few similar tables. for some reason, updates on one of the tables take a lot longer the updates on the other ones. The difference

Re: [GENERAL] recovery of a windows archive in linux

2015-04-13 Thread Adrian Klaver
On 04/13/2015 04:37 PM, Guillaume Drolet wrote: Dear list, I have a base backup and archive logs from a Windows 7 PGSQL 9.3 install. The machine OS disk started to show signs of failure so I replaced it and now I want to switch for a Linux system. My question is: will I be able to play my

[GENERAL] With Update From ... vs. Update ... From (With)

2015-04-13 Thread David G. Johnston
Hello! Is there any non-functional difference between these two forms of Update? WITH name AS ( SELECT ) UPDATE tbl SET ... FROM name WHERE tbl.id = name.id and UPDATE tbl SET ... FROM ( WITH qry AS ( SELECT ) SELECT * FROM qry ) AS name WHERE tbl.id = name.id They both better give the same

Re: [GENERAL] recovery of a windows archive in linux

2015-04-13 Thread Jim Nasby
On 4/13/15 6:37 PM, Guillaume Drolet wrote: Dear list, I have a base backup and archive logs from a Windows 7 PGSQL 9.3 install. The machine OS disk started to show signs of failure so I replaced it and now I want to switch for a Linux system. My question is: will I be able to play my archive

Re: [GENERAL] With Update From ... vs. Update ... From (With)

2015-04-13 Thread Jim Nasby
On 4/13/15 8:12 PM, David G. Johnston wrote: Hello! Is there any non-functional difference between these two forms of Update? WITH name AS ( SELECT ) UPDATE tbl SET ... FROM name WHERE tbl.id http://tbl.id = name.id http://name.id and UPDATE tbl SET ... FROM ( WITH qry AS ( SELECT ) SELECT *

Re: [GENERAL] Help with slow table update

2015-04-13 Thread Jim Nasby
On 4/13/15 7:01 PM, Pawel Veselov wrote: Cursors tend to make things slow. Avoid them if you can. Is there an alternative to iterating over a number of rows, where a direct update query is not an option? I really doubt that either the actual processing logic, including use of types has

[GENERAL] Re: Hot standby problems: consistent state not reached, no connection to master server.

2015-04-13 Thread Ilya Ashchepkov
On Mon, 13 Apr 2015 12:24:11 -0700 Adrian Klaver adrian.kla...@aklaver.com wrote: On 04/13/2015 11:25 AM, Ilya Ashchepkov wrote: On Mon, 13 Apr 2015 10:06:05 -0700 Adrian Klaver adrian.kla...@aklaver.com wrote: On 04/13/2015 09:42 AM, Ilya Ashchepkov wrote: On Sun, 12 Apr 2015 17:30:44

Re: [GENERAL] bigserial continuity safety

2015-04-13 Thread David G. Johnston
On Mon, Apr 13, 2015 at 7:01 PM, Jim Nasby jim.na...@bluetreble.com wrote: On 4/13/15 7:45 PM, David G. Johnston wrote: On Mon, Apr 13, 2015 at 3:05 PM, Pawel Veselov pawel.vese...@gmail.com mailto:pawel.vese...@gmail.comwrote: Hi. If I have a table created as: CREATE TABLE

Re: [GENERAL] Pgagent

2015-04-13 Thread Ramesh T
Hi, in stepsdefinition- do $body$ begin perform delete_empty_parts(); end; $body$ delete_empty_parts is the function i do selected SQL option in step process.Right clicked on job chosen run now it getting failed(On error i selected failed,if select success it getting success) I'm running

[GENERAL] Pgagent

2015-04-13 Thread Ramesh T
Hi all, i have a function to delete data from table.Where i need to place function in pgagent.in definition section can i select SQL or BATCH ..? or else any other method.? Any Help..

Re: [GENERAL] PG-9.3.6, unable to drop role because some objects depend on it

2015-04-13 Thread Dennis Jenkins
Apologies for the typo of your name in my last post, Tom. On Mon, Apr 13, 2015 at 12:16 PM, Dennis Jenkins dennis.jenkins...@gmail.com wrote: Doh. I found my answer. Tome posted it years ago.. http://www.postgresql.org/message-id/18994.1325874...@sss.pgh.pa.us I have to connect to the

Re: [GENERAL] PG-9.3.6, unable to drop role because some objects depend on it

2015-04-13 Thread Dennis Jenkins
Doh. I found my answer. Tome posted it years ago.. http://www.postgresql.org/message-id/18994.1325874...@sss.pgh.pa.us I have to connect to the offending database and try to drop role again to get the list of actual objects. One database cannot query the catalog of another. On Mon, Apr 13,

Re: [GENERAL] Pgagent

2015-04-13 Thread Ramesh T
no error messages.. i checked at PostgreSQL\9.4\data\pg_log Didn't deleted data from table.after schedule time.. one thing i don't understand ,after set timings and in definition section also the function works fine individually. any help.. On Mon, Apr 13, 2015 at 8:47 PM, Adrian Klaver

Re: [GENERAL] schema or database

2015-04-13 Thread Pavel Stehule
2015-04-13 10:43 GMT+02:00 Albe Laurenz laurenz.a...@wien.gv.at: Michael Cheung wrote: I have many similar database to store data for every customer. Structure of database is almost the same. As I use same application to control all these data, so I can only use one database user to

Re: [GENERAL] schema or database

2015-04-13 Thread John R Pierce
On 4/13/2015 12:07 AM, Alban Hertroys wrote: That's easier to backup, sure, but you can't restore a single customer's schema easily that way. So if one customer messes up their data big time, you'll need to restore a backup for all customers in the DB. if you use pg_dump -Fc, then you can

Re: [GENERAL] schema or database

2015-04-13 Thread Alban Hertroys
On 13 Apr 2015, at 4:20, Ian Barwick i...@2ndquadrant.com wrote: On 13/04/15 11:08, Michael Cheung wrote: hi, all; I am new here. And I need some suggestion. I have many similar database to store data for every customer. Structure of database is almost the same. As I use same

Re: [GENERAL] Limiting user from changing its own attributes

2015-04-13 Thread David G. Johnston
On Sun, Apr 12, 2015 at 10:23 PM, Sameer Kumar sameer.ku...@ashnik.com wrote: On Mon, Apr 13, 2015 at 1:03 PM Jim Nasby jim.na...@bluetreble.com wrote: No. I suspect the community would support at least a hook for GUC changes, if not a full-on permissions system. A hook would make it

Re: [GENERAL] schema or database

2015-04-13 Thread Albe Laurenz
Michael Cheung wrote: I have many similar database to store data for every customer. Structure of database is almost the same. As I use same application to control all these data, so I can only use one database user to connect to these database. And I have no needs to query table for

Re: [GENERAL] SELinux context of PostgreSQL connection process

2015-04-13 Thread Мартынов Александр
If the user is given the necessary permissions, then can the connection process get a context of the user? I mean a category and a level (sensibility) by context. Does the architecture of PostgreSQL permit to add changing a context of a connection process to context of the connecting user?

Re: [GENERAL] schema or database

2015-04-13 Thread Anil Menon
In addition to all these comments - If you use multiple databases, if you want to keep some common tables (example counties_Table, My_company_details), its going to be a pain - if you want to access tables across databases - you might need to start using FDWs (which is going to be a

Re: [GENERAL] schema or database

2015-04-13 Thread Jim Nasby
On 4/13/15 6:21 AM, Anil Menon wrote: In addition to all these comments - If you use multiple databases, if you want to keep some common tables (example counties_Table, My_company_details), its going to be a pain - if you want to access tables across databases - you might need to start using

Re: [GENERAL] Pgagent

2015-04-13 Thread Adrian Klaver
On 04/13/2015 06:53 AM, Ramesh T wrote: Hi all, i have a function to delete data from table.Where i need to place function in pgagent.in http://pgagent.in definition section can i select SQL or BATCH ..? or else any other method.? See here:

[GENERAL] Re: Hot standby problems: consistent state not reached, no connection to master server.

2015-04-13 Thread Ilya Ashchepkov
On Sun, 12 Apr 2015 17:30:44 -0700 Adrian Klaver adrian.kla...@aklaver.com wrote: On 04/12/2015 08:25 AM, Ilya Ashchepkov wrote: On Sun, 12 Apr 2015 08:10:48 -0700 Adrian Klaver adrian.kla...@aklaver.com wrote: On 04/12/2015 07:47 AM, Ilya Ashchepkov wrote: Hello. I'm setting up

[GENERAL] PG-9.3.6, unable to drop role because some objects depend on it

2015-04-13 Thread Dennis Jenkins
I am attempting to remove a role from Postgresql-9.3.6. I've already reassigned ownership for the role's tables, functions, sequences, types, views, etc... However, I am still unable to remove the role. Postgresql reports that 8 objects in the database 'postgres' depend on this role. How do I

Re: [GENERAL] Re: Hot standby problems: consistent state not reached, no connection to master server.

2015-04-13 Thread Adrian Klaver
On 04/13/2015 09:42 AM, Ilya Ashchepkov wrote: On Sun, 12 Apr 2015 17:30:44 -0700 Adrian Klaver adrian.kla...@aklaver.com wrote: Oh! I missed this! Thank you! Now slave reached consistent state some time after start, but still no connection to master server and still restoring wal-files.

[GENERAL] unexpected error tables can have at most 1600 columns

2015-04-13 Thread Day, David
Situation I have a co-developer installing a new Virtual Machine and encountering a postgres error during the installation. One of our SQL patch files is failing unexpectedly. The patch is attempting to add columns to a table, The table involved currently has only 2 columns, Interactively I

Re: [GENERAL] unexpected error tables can have at most 1600 columns

2015-04-13 Thread Pavel Stehule
2015-04-13 17:57 GMT+02:00 Day, David d...@redcom.com: Situation I have a co-developer installing a new Virtual Machine and encountering a postgres error during the installation. One of our SQL patch files is failing unexpectedly. The patch is attempting to add columns to a table,

Re: [GENERAL] Pgagent

2015-04-13 Thread Adrian Klaver
On 04/13/2015 07:22 AM, Ramesh T wrote: Hi, in stepsdefinition- do $body$ begin perform delete_empty_parts(); end; $body$ delete_empty_parts is the function i do selected SQL option in step process.Right clicked on job chosen run now it getting failed(On error i selected failed,if select