Re: Real application clustering in postgres.

2020-03-08 Thread Christoph Moench-Tegeder
## Andrew Kerber (andrew.ker...@gmail.com): > The nice point of oracle > dataguard is that it is a block by block copy, while all of the Postgres > Multi-Master and master-slave replication solutions work by SQL capture. https://www.postgresql.org/docs/12/warm-standby.html#STREAMING-REPLICATION

Re: Table with many NULLS for indexed column yields strange query plan

2020-03-08 Thread Tom Lane
"Peter J. Holzer" writes: > How is the selectivity of "type"? Would an index on that column help? The EXPLAIN results say that the "type = 'Standard'" condition is completely not selective: in both plans, there is no "Rows Removed by Filter" indication where it's applied, indicating that it did

Re: Another INSTEAD OF TRIGGER question

2020-03-08 Thread stan
On Sun, Mar 08, 2020 at 10:07:24PM +0100, S??ndor Daku wrote: > On Sun, 8 Mar 2020 at 21:26, stan wrote: > > > On Sun, Mar 08, 2020 at 03:56:56PM +0100, S??ndor Daku wrote: > > > On Sun, 8 Mar 2020 at 15:31, stan wrote: > > > > > > > On Sun, Mar 08, 2020 at 10:29:09AM -0400, stan wrote: > > > >

Re: Table with many NULLS for indexed column yields strange query plan

2020-03-08 Thread Peter J. Holzer
On 2020-03-05 18:08:53 -0700, greigwise wrote: > I have a query like this: > > SELECT "table1".* FROM "table1" > INNER JOIN "table2" ON "table2"."table1_id" = "table1"."id" > INNER JOIN "table3" ON "table3"."id" = "table2"."table3_id" > WHERE "table3"."number" = '' > AND ("table2"."type") IN

Re: Real application clustering in postgres.

2020-03-08 Thread Peter J. Holzer
On 2020-03-06 15:55:27 +0100, Laurenz Albe wrote: > On Fri, 2020-03-06 at 03:25 -0600, Ron wrote: > > > RAC is not really a high availability solution: because of the shared > > > storage, it has a sibgle point of failure. > > > > This is utter nonsense. Dual redundant storage controllers > >

Re: Determining the type of an obkect in plperl

2020-03-08 Thread Peter J. Holzer
On 2020-03-05 05:59:10 -0500, stan wrote: > On Wed, Mar 04, 2020 at 05:09:19PM -0700, David G. Johnston wrote: > > On Wed, Mar 4, 2020 at 4:21 PM stan wrote: > > > I am in the process of writing a plperl function. In this function > > > I need to compare the data in the NEW versus OLD structures.

Re: Advice request : simultaneous function/data updates on many databases

2020-03-08 Thread Peter J. Holzer
On 2020-03-04 14:42:01 -0800, Guyren Howe wrote: > On Mar 4, 2020, at 14:33 , Rory Campbell-Lange > wrote: > Essentially we wish to reduce the window where the frontend and backend > aren't synchronised. > > If we have (for example) 200 databases which each take 2 seconds to >

Re: How to discover what table is

2020-03-08 Thread PegoraroF10
correct, what schema that table belongs to. -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: How to discover what table is

2020-03-08 Thread Ron
On 3/8/20 12:26 PM, PegoraroF10 wrote: I have a publication/subscription replication. Then this week started to see this message on Log of replica server. Message is "duplicate key value violates unique constraint "pksyslookup"" Detail is "Key (lookup_id)=(56) already exists." and on

How to discover what table is

2020-03-08 Thread PegoraroF10
I have a publication/subscription replication. Then this week started to see this message on Log of replica server. Message is "duplicate key value violates unique constraint "pksyslookup"" Detail is "Key (lookup_id)=(56) already exists." and on production server message is "logical decoding

Re: Restrict user to create only one db with a specific name

2020-03-08 Thread Peter J. Holzer
On 2020-03-06 16:39:14 -0700, David G. Johnston wrote: > On Fri, Mar 6, 2020 at 4:28 PM Tiffany Thang wrote: > Is there a way in PostgreSQL 12 to restrict user to creating a database > with a specific database name? [...] > Why does userA need create database privileges? Not speaking for

Re: Another INSTEAD OF TRIGGER question

2020-03-08 Thread Sándor Daku
On Sun, 8 Mar 2020 at 15:31, stan wrote: > On Sun, Mar 08, 2020 at 10:29:09AM -0400, stan wrote: > > Still working on updateable views. > > > > Wish list item, a way to see the entire query that caused the trigger to > > fire. > > > > Now on to something i hope I can get. Can I see what the

Re: Another INSTEAD OF TRIGGER question

2020-03-08 Thread Rob Sargent
> On Mar 8, 2020, at 8:31 AM, stan wrote: > > On Sun, Mar 08, 2020 at 10:29:09AM -0400, stan wrote: >> Still working on updateable views. >> >> Wish list item, a way to see the entire query that caused the trigger to >> fire. >> >> Now on to something i hope I can get. Can I see what the

Re: Another INSTEAD OF TRIGGER question

2020-03-08 Thread stan
On Sun, Mar 08, 2020 at 10:29:09AM -0400, stan wrote: > Still working on updateable views. > > Wish list item, a way to see the entire query that caused the trigger to > fire. > > Now on to something i hope I can get. Can I see what the verb that caused > the trigger to fire is? IE UPDATE,

Another INSTEAD OF TRIGGER question

2020-03-08 Thread stan
Still working on updateable views. Wish list item, a way to see the entire query that caused the trigger to fire. Now on to something i hope I can get. Can I see what the verb that caused the trigger to fire is? IE UPDATE, INSERT, DELETE? -- "They that would give up essential liberty for

Re: Restrict user to create only one db with a specific name

2020-03-08 Thread Paul Förster
Hi Tiff, note that there is an absurd high maximum of databases possible inside a PostgreSQL database cluster. I think, the maximum is 4,294,950,911 but I'm sure you don't get that many users or databases anyway. ;-) Cheers, Paul > On 07. Mar, 2020, at 23:35, Tiffany Thang wrote: > > Thanks