Re: [GENERAL] Inheritance and foreign keys

2017-05-25 Thread Jayadevan M
On Thu, May 25, 2017 at 6:00 PM, Achilleas Mantzios < ach...@matrix.gatewaynet.com> wrote: > The way I do it is the following : > - ensure a common sequence for the ID for all tables in the inheritance > tree (usually one parent and one or more children) > - enforce normal FK constraints for all F

[GENERAL] Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup

2017-05-25 Thread y39chen
Yeah, I figured out the point(logic). The precondition is should not have any connections accept while recovering. It is clear to me now. Thank you very much. static TransactionId btree_xlog_delete_get_latestRemovedXid(xl_btree_delete *xlrec) { .. if (*CountDBBackends(InvalidOid)* == 0

Re: [GENERAL] logical replication in PG10 BETA

2017-05-25 Thread Igor Neyman
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Thursday, May 25, 2017 3:13 PM To: Igor Neyman ; George Neuner ; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BETA On 05/25/2017 11:09 AM, Igor Neyman wrote: >

Re: [GENERAL] logical replication in PG10 BETA

2017-05-25 Thread Adrian Klaver
On 05/25/2017 11:09 AM, Igor Neyman wrote: __ Adrian, thanks for trying to help. Even though the role I'm using (user=repl_user) has REPLICATION attribute, I thought your question about .p

Re: [GENERAL] Why is posgres picking a suboptimal plan for this query?

2017-05-25 Thread Sam Saffron
OK, I committed a fix to Discourse, the suggested pattern by Tom works like a charm, in my particular user case it cuts a query down from 200-500ms to 8ms. Thank you heaps https://github.com/discourse/discourse/commit/29fac1ac18acdc1f0d2c1650d33d2d4a1aab0a0b On Wed, May 24, 2017 at 6:33 PM, Sam

Re: [GENERAL] logical replication in PG10 BETA

2017-05-25 Thread Igor Neyman
-Original Message- From: Adrian Klaver [mailto:adrian.kla...@aklaver.com] Sent: Wednesday, May 24, 2017 7:06 PM To: Igor Neyman ; George Neuner ; pgsql-general@postgresql.org Subject: Re: [GENERAL] logical replication in PG10 BETA On 05/24/2017 08:30 AM, Igor Neyman wrote: > -Origina

[GENERAL] ODBC and Kerberos authtentication

2017-05-25 Thread Jorge GarcĂ­a
Hello everyone, I'm new to the list, greetings from MX! I'm currently working on a small project with PostgreSQL 9.6. This project involves Kerberos for authentication, my question is: The ODBC driver support this? What are the flags/options you have to use on the odbc.ini file? I cant find t

Re: [GENERAL] Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup

2017-05-25 Thread Tom Lane
y39chen writes: > We found the panic happened when adding one of our patch. > switch (port->canAcceptConnections) > { > case CAC_STARTUP: > ereport(*LOG*, > (errcode(ERRCODE_CANNOT_CONNECT_NOW), >

Re: [GENERAL] pg_dump 8.3.3 ERROR: invalid page header in block 2264419 of relation "pg_largeobject"

2017-05-25 Thread Tom Lane
David Wall writes: > They do have a slave DB running via WAL shipping. Would that likely > help us in any way? Have you tried taking a backup from the slave? It's possible that the corruption exists only on the master. regards, tom lane -- Sent via pgsql-general mai

Re: [GENERAL] Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup

2017-05-25 Thread Michael Paquier
On Thu, May 25, 2017 at 5:23 AM, y39chen wrote: > My doubt is Standby is redoing the records in WAL from master. how accept > connection in standby side while recovering would trigger > btree_xlog_delete_get_latestRemovedXid() and panic happen. You should look at the relationship between the code

Re: [GENERAL] Inheritance and foreign keys

2017-05-25 Thread Achilleas Mantzios
The way I do it is the following : - ensure a common sequence for the ID for all tables in the inheritance tree (usually one parent and one or more children) - enforce normal FK constraints for all FK relations within the same "realm"/"tenant"/"schema" etc, i.e. where it makes sense - for enforc

[GENERAL] Re: Is there possibility btree_redo with XLOG_BTREE_DELETE done between standby_redo and the end of backup

2017-05-25 Thread y39chen
Thank you the comments. We found the panic happened when adding one of our patch. static int ProcessStartupPacket(Port *port, bool SSLdone) { .. /* * If we're going to reject the connection due to database state, say so * now instead of wasting cycles on an authentic

Re: [GENERAL] Inheritance and foreign keys

2017-05-25 Thread Andreas Kretschmer
Not possible - yet. Am 25. Mai 2017 13:48:59 MESZ schrieb Jayadevan M : >Hi, > >I designed three tables so that one table inherits another, and the >third >table references the parent table. If a record is inserted into the >third >table and the value does exist in the parent table indirectly, bec

[GENERAL] Inheritance and foreign keys

2017-05-25 Thread Jayadevan M
Hi, I designed three tables so that one table inherits another, and the third table references the parent table. If a record is inserted into the third table and the value does exist in the parent table indirectly, because it is present in the inherited table, I still get an error. Is some option

[GENERAL] Buy counterfeit money ( morganmoore...@gmail.com )euros,dollars,pounds, SAR,ZAR,AED

2017-05-25 Thread anthonymarc
Buy counterfeit money ( morganmoore...@gmail.com )euros,dollars,pounds, SAR,ZAR,AED Hello to everyone. Take the chance now to become rich and be able to pay your tuition fees and still have some money to buy school stuffs,pay your loans, hospital bills, utility bills and all your bills. fake docu

Re: [GENERAL] pg_dump 8.3.3 ERROR: invalid page header in block 2264419 of relation "pg_largeobject"

2017-05-25 Thread Karsten Hilbert
On Wed, May 24, 2017 at 04:45:51PM -0700, David Wall wrote: > They do have a slave DB running via WAL shipping. Would that likely help us > in any way? If you can find out which blobs are afflicted you may be able to extract those from the slave and re-insert them into the new DB. > Because the

Re: [GENERAL] pg_dump 8.3.3 ERROR: invalid page header in block 2264419 of relation "pg_largeobject"

2017-05-25 Thread Karsten Hilbert
On Wed, May 24, 2017 at 07:18:14PM -0400, Tom Lane wrote: > If possible, I'd take a physical backup (e.g. with tar) of the entire $PGDATA > directory, Make sure the backup goes directly to a different physical volume in case the underlying hardware is bad. Karsten -- GPG key ID E4071346 @ eu.p