[GENERAL] Unable to match same value in field.

2016-03-10 Thread Condor
Hello, I using postgresql 9.5.1 and I have problem to match value in one field. Both tables are text: =# \d list_cards_tbl; Column | Type | Modifiers ---+-+-- recid | integer | no

Re: [GENERAL] Unable to match same value in field.

2016-03-10 Thread Karsten Hilbert
On Thu, Mar 10, 2016 at 11:09:00AM +0200, Condor wrote: > Can some one point me what can be the problem with this value and how to > resolve it ? I think probably index problem but I reindex that table and > problem is not resolved For the fun of it try dropping all indexes on the table and rerun

Re: [GENERAL] PostgreSQL crashed, whole PC not responding

2016-03-10 Thread Magnus Hagander
On Thu, Mar 10, 2016 at 2:37 AM, Kiswono Prayogo wrote: > Hi, I'm upgrading to PostgreSQL 9.5.1 in 64-bit ArchLinux (Linux > 4.4.1-2-ARCH) for around 4 days (previously we use 9.4.x), and the > PostgreSQL crashed and make the whole PC down, with this last log from > journalctl: > > Mar 09 23:31:1

Re: [GENERAL] How to setup Active Directory users in Postgres 9.3.11

2016-03-10 Thread Giuseppe Sacco
Hello Wyatt, Il giorno mer, 09/03/2016 alle 14.35 +, Wyatt Sanford ha scritto: > I have recently been tasked with installing Postgres 9.3.11 on a > Windows 2012 R2 server on Active Directory and restoring backups from > a Linux server running Postgres 9.3.11.  I have all of the databases > res

Re: [GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-10 Thread Adam Brusselback
Rob, I understand that if I were to replicate the logic in that view for every use case I had for those totals, this would not be an issue. But that would very much complicate some of my queries to the point of absurdity if I wanted to write them in a way which would push everything down properly.

[GENERAL] How to find configuration data in _PG_init()

2016-03-10 Thread david
My language handler requires some configuration information to start up, which I would like to get from the file system (but it could be set up by an SQL query SET). Currently I’m using hard-coded paths, which doesn’t seem like a good solution. Is there perhaps a way to get the path that was use

Re: [GENERAL] Unable to match same value in field.

2016-03-10 Thread Adrian Klaver
On 03/10/2016 01:09 AM, Condor wrote: Hello, I using postgresql 9.5.1 and I have problem to match value in one field. Both tables are text: =# \d list_cards_tbl; Column | Type | Modifiers ---+-+--

Re: [GENERAL] How to find configuration data in _PG_init()

2016-03-10 Thread Adrian Klaver
On 03/10/2016 05:24 AM, da...@andl.org wrote: My language handler requires some configuration information to start up, which I would like to get from the file system (but it could be set up by an SQL query SET). Currently I’m using hard-coded paths, which doesn’t seem like a good solution. Is the

Re: [GENERAL] Plan to support predicate push-down into subqueries with aggregates?

2016-03-10 Thread rob stone
On Thu, 2016-03-10 at 07:09 -0500, Adam Brusselback wrote: > Rob, > I understand that if I were to replicate the logic in that view for > every use case I had for those totals, this would not be an issue. > But that would very much complicate some of my queries to the point > of absurdity if I want

[GENERAL] pg_restore without dropping db/table

2016-03-10 Thread anj patnaik
Hello, I've a database/table already with existing records. I will then create a dump via pg_dump from another database and want to restore into this first database. I just want to update the existing db with any new rows. Does pg_restore only add new rows if I restore without deleting old db? P

Re: [GENERAL] pg_restore without dropping db/table

2016-03-10 Thread Karsten Hilbert
On Thu, Mar 10, 2016 at 10:51:05AM -0500, anj patnaik wrote: > Does pg_restore only add new rows if I restore without deleting old db? No. For one thing, pg_restore cannot know what you consider to be a "new row". Best, Karsten -- GPG key ID E4071346 @ eu.pool.sks-keyservers.net E167 67FD A291

Re: [GENERAL] pg_restore without dropping db/table

2016-03-10 Thread Adrian Klaver
On 03/10/2016 09:41 AM, Karsten Hilbert wrote: On Thu, Mar 10, 2016 at 10:51:05AM -0500, anj patnaik wrote: Does pg_restore only add new rows if I restore without deleting old db? No. For one thing, pg_restore cannot know what you consider to be a "new row". If you however do know what is n

Re: [GENERAL] Re: "missing chunk number XX for toast value YY in pg_toast ..." after pg_basebackup.

2016-03-10 Thread fredrik
Hi Adrian, thank you again for your continued patience. On 10 March 2016 00:20:13 +01:00, Adrian Klaver wrote: > On 03/09/2016 10:41 AM, wrote: > > > Hi Adrian, > > > > thank you very much for your patience. I apologise for the missing > > information. > > > > On 9 March 2016 16:13:00 +01:

Re: [GENERAL] pg_restore without dropping db/table

2016-03-10 Thread Melvin Davidson
On Thu, Mar 10, 2016 at 12:53 PM, Adrian Klaver wrote: > On 03/10/2016 09:41 AM, Karsten Hilbert wrote: > >> On Thu, Mar 10, 2016 at 10:51:05AM -0500, anj patnaik wrote: >> >> Does pg_restore only add new rows if I restore without deleting old db? >>> >> >> No. For one thing, pg_restore cannot kn

[GENERAL] Best approach for multi-database system

2016-03-10 Thread Edson Richter
Hi! Using async replication between geographically database servers. I've some 9.3 and some 9.4 servers, so doesn't matter the version (the only reason I've not migrated all to 9.4 yet is because I'm short on time). I've experienced some synchronization failures between Master-Slave servers

Re: [GENERAL] Fwd: How does PostgreSQL serializable transaction works? (SELECT/UPDATE vs INSERT conflict)

2016-03-10 Thread Alexandru Lazarev
Ok, Now it's more clear for me. Thanks to all, especially on @Kevin deep explanation and (tx3) example. Question is closed. I intuited that it might be as all of You explained, but was not sure, I was confused by "predicate lock" - I thought it's related to `SELECT+WHERE` and not to data (a kind o

Re: [GENERAL] Best approach for multi-database system

2016-03-10 Thread Andy Colson
On 3/10/2016 1:41 PM, Edson Richter wrote: Hi! Using async replication between geographically database servers. I've some 9.3 and some 9.4 servers, so doesn't matter the version (the only reason I've not migrated all to 9.4 yet is because I'm short on time). I've experienced some synchronizatio

Re: [GENERAL] Fwd: How does PostgreSQL serializable transaction works? (SELECT/UPDATE vs INSERT conflict)

2016-03-10 Thread Kevin Grittner
On Thu, Mar 10, 2016 at 1:50 PM, Alexandru Lazarev wrote: > One more "offtop" question - What kind of frameworks do > automatically retries for failed transactions? Are > Hibernate/Spring in that list? I have seen that done in Hibernate/Spring using dependency injection to create a transaction m

[GENERAL] recovering database from a linux file system

2016-03-10 Thread Alka Gupta
All, We recently had a server crash at my company which contained a program to monitor various network devices around the world. Of course the server was sitting in a dusty closet somewhere and the owner is long gone from the company, so we can't find where any backups were stored. At any rate

Re: [GENERAL] recovering database from a linux file system

2016-03-10 Thread John R Pierce
On 3/10/2016 12:05 PM, Alka Gupta wrote: The vendor won't give us any way to access the machine and retrieve the DB, so I removed the HDD and connected it to my Linux laptop. I was able to grab all the DB files and copy them to my Windows desktop, where I then installed PostgreSQL 9.0 (to matc

Re: [GENERAL] Best approach for multi-database system

2016-03-10 Thread Edson Richter
Interesting. This logicel (only remove WAL files after been applied) should be available in PostgreSQL by default. I mean, to have an option wheter every 15 minutes a master server query slave for completeness, or slave notify master last successfully imported WAL. Atenciosamente, Edson Carl

Re: [GENERAL] Best approach for multi-database system

2016-03-10 Thread Andy Colson
please don't top post. > Em 10/03/2016 16:56, Andy Colson escreveu: On 3/10/2016 1:41 PM, Edson Richter wrote: Hi! Using async replication between geographically database servers. I've some 9.3 and some 9.4 servers, so doesn't matter the version (the only reason I've not migrated all to 9.4 yet

Re: [GENERAL] recovering database from a linux file system

2016-03-10 Thread Alka Gupta
Thank you John! Do you know if there is any encryption or security or will plainly copying the files will work? Do I need to know any db usernames and passwords, which obviously I don't have? -Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgre

Re: [GENERAL] Best approach for multi-database system

2016-03-10 Thread Edson Richter
Em 10/03/2016 17:18, Andy Colson escreveu: please don't top post. > Em 10/03/2016 16:56, Andy Colson escreveu: On 3/10/2016 1:41 PM, Edson Richter wrote: Hi! Using async replication between geographically database servers. I've some 9.3 and some 9.4 servers, so doesn't matter the version (the

Re: [GENERAL] pg_restore without dropping db/table

2016-03-10 Thread Karsten Hilbert
On Thu, Mar 10, 2016 at 01:49:42PM -0500, Melvin Davidson wrote: > The best way to accomplish what you want is to create a table with the same > structure in the first database as the one you want to restore to. Then you > can truncate that table, restore the data from the other db into it, and >

Re: [GENERAL] recovering database from a linux file system

2016-03-10 Thread Adrian Klaver
On 03/10/2016 12:25 PM, Alka Gupta wrote: Thank you John! Do you know if there is any encryption or security or will plainly copying the files will work? Do I need to know any db usernames and passwords, which obviously I don't have? The files should not be encrypted. There will be database us

Re: [GENERAL] pg_restore without dropping db/table

2016-03-10 Thread Melvin Davidson
fyi, since the version of PostgreSQL was NOT stated (or O/S) as is the proper thing to do when posting, I gave a generic solution which covers all versions and O/S's On Thu, Mar 10, 2016 at 3:53 PM, Karsten Hilbert wrote: > On Thu, Mar 10, 2016 at 01:49:42PM -0500, Melvin Davidson wrote: > > > T

Re: [GENERAL] recovering database from a linux file system

2016-03-10 Thread John R Pierce
On 3/10/2016 12:25 PM, Alka Gupta wrote: Do you know if there is any encryption or security or will plainly copying the files will work? Do I need to know any db usernames and passwords, which obviously I don't have? plain copy should be fine, any encryption would be file system level, and if

Re: [GENERAL] pg_restore without dropping db/table

2016-03-10 Thread Karsten Hilbert
On Thu, Mar 10, 2016 at 03:59:58PM -0500, Melvin Davidson wrote: > fyi, since the version of PostgreSQL was NOT stated (or O/S) as is the > proper thing to do when posting, I gave a generic solution which covers all > versions and O/S's That's an important point. Karsten -- GPG key ID E4071346

Re: [GENERAL] How to find configuration data in _PG_init()

2016-03-10 Thread david
> ow...@postgresql.org] On Behalf Of Adrian Klaver > > My language handler requires some configuration information to start > > up, which I would like to get from the file system (but it could be > > set up by an SQL query SET). Currently I’m using hard-coded paths, > > which doesn’t seem like a go

[GENERAL] Cannot create role, no default superuser role exists

2016-03-10 Thread Robert McAlpine
Postgresql 9.5, Ubuntu 14.04. I broke my ability to access postgres after attemping to install postgres-xc (ironic, since I installed that to use pg_ctl to reload my pg_hba.conf without restarting the entirety of postgres). After doing so I can no longer access my databases via psql or any other

Re: [GENERAL] Cannot create role, no default superuser role exists

2016-03-10 Thread Adrian Klaver
On 03/10/2016 04:11 PM, Robert McAlpine wrote: Postgresql 9.5, Ubuntu 14.04. I broke my ability to access postgres after attemping to install postgres-xc (ironic, since I installed that to use pg_ctl to reload my pg_hba.conf without restarting the entirety of postgres). That is available with

Re: [GENERAL] Cannot create role, no default superuser role exists

2016-03-10 Thread Robert McAlpine
Thank you for the quick reply. I very recently had some success by doing a complete purge of postgresql-9.5, reinstalling and then copying in the original data directory (or I guess I could have just pointed to it, but w/e). I did not expect this to work, as I thought it would just point to the ta

Re: [GENERAL] Cannot create role, no default superuser role exists

2016-03-10 Thread Scott Marlowe
For future reference you can start the postmaster in single user mode and create a new postgres account or grant the current one superuser access if this happens again. Just google "Postgresql single user mode". -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make change