Re: POSTGRES_FSM_RELATIONS CRITICAL: DB control fsm relations used: 79569 of 80000 (99%)

2019-05-29 Thread Adrian Klaver
On 5/29/19 9:41 AM, Julie Nishimura wrote: Just for those who might be interested... We increased the settings for max_fsm_relations, max_fsm_pages and restarted the service. It came up with no problem. And it looks like after the restart of the psql service the utilization of fsm_relations

Re: Questions about btree_gin vs btree_gist for low cardinality columns

2019-05-29 Thread Jeremy Finzel
On Fri, May 24, 2019 at 10:25 AM Jeremy Finzel wrote: > I have been hoping for clearer direction from the community about > specifically btree_gin indexes for low cardinality columns (as well as low > cardinality multi-column indexes). In general there is very little > discussion about this

Re: POSTGRES_FSM_RELATIONS CRITICAL: DB control fsm relations used: 79569 of 80000 (99%)

2019-05-29 Thread Julie Nishimura
Just for those who might be interested... We increased the settings for max_fsm_relations, max_fsm_pages and restarted the service. It came up with no problem. And it looks like after the restart of the psql service the utilization of fsm_relations was reset to 0. POSTGRES_FSM_RELATIONS OK: DB

Re: with and trigger

2019-05-29 Thread Tom Lane
Ron writes: > On 5/29/19 8:26 AM, Tom Lane wrote: >> This doesn't explicitly talk about triggers, but I think our attitude >> about the case you're discussing is that the results are unspecified. >> If a trigger fired in one WITH arm tries to look at the table(s) >> modified by other WITH arms,

Re: with and trigger

2019-05-29 Thread Andreas Kretschmer
> >Are CTEs still optimization fences? >https://www.2ndquadrant.com/en/blog/postgresql-ctes-are-optimization-fences/ Yes, but not in 12. Regards, Andreas -- 2ndQuadrant - The PostgreSQL Support Company

Re: with and trigger

2019-05-29 Thread Ron
On 5/29/19 8:26 AM, Tom Lane wrote: PegoraroF10 writes: We like to use With to insert, update and return some value to user. But some informations of those related tables are not available on that time, is that a bug ? No, see the "WITH Clause" section of the SELECT reference page: The

Re: psql: FATAL: the database system is starting up

2019-05-29 Thread Adrian Klaver
On 5/28/19 6:59 PM, Tom K wrote: On Tue, May 28, 2019 at 9:53 AM Adrian Klaver > wrote: Correct.  Master election occurs through Patroni.  WAL level is set to: wal_level = 'replica' So no archiving. > > After the most recent crash 2-3

Re: Query reg. postgresql 9.6 migration from ubuntu 16.04 to 18.04

2019-05-29 Thread a venkatesh
Thanks your response. Please check the following details. 1) Size of Postgres cluster. A. The number of nodes per cluster are 3 - 1 pgmaster, 1 pgslave and 1 pgpool. There are clusters of multiple sizes - 500 GB, < 500 GB and a few higher than that. 2) Method of migration: Dump/restore

Re:

2019-05-29 Thread Adrian Klaver
On 5/29/19 1:03 AM, Pawan Sharma wrote: Hello All, Is it possible check privileges of all the users or roles, and what are the objects owned by user and role with their privileges. I am getting the output which want from information_schema.roles_usage_grants, but as I not running the query

Re: with and trigger

2019-05-29 Thread Tom Lane
PegoraroF10 writes: > We like to use With to insert, update and return some value to user. But some > informations of those related tables are not available on that time, is that > a bug ? No, see the "WITH Clause" section of the SELECT reference page: The primary query and the WITH queries

Re: with and trigger

2019-05-29 Thread PegoraroF10
Well, I think is not a transaction problem, because if you do the same thing on a DO it will work. DO $$ declare vMaster_ID integer; begin insert into Master(Customer_ID, Field2) values(1, 'BlaBla') returning Master_ID into vMaster_ID; insert into Detail(Master_ID, Product_ID, ProductValue)

Re: with and trigger

2019-05-29 Thread Fabrízio de Royes Mello
Em qua, 29 de mai de 2019 às 08:52, PegoraroF10 escreveu: > > We like to use With to insert, update and return some value to user. But some > informations of those related tables are not available on that time, is that > a bug ? > > with > Master(Master_ID) as (insert into Master(Customer_ID,

Re: with and trigger

2019-05-29 Thread Geoff Winkless
On Wed, 29 May 2019 at 12:52, PegoraroF10 wrote: > This trigger will not work because Master record was not inserted yet. > That seems reasonable. Since the transaction is meant to be atomic any select within the query should return data from tables as they are at the start of the transaction,

with and trigger

2019-05-29 Thread PegoraroF10
We like to use With to insert, update and return some value to user. But some informations of those related tables are not available on that time, is that a bug ? with Master(Master_ID) as (insert into Master(Customer_ID, Field2) values(1, 'BlaBla') returning Master_ID), Detail as (insert

[no subject]

2019-05-29 Thread Pawan Sharma
Hello All, Is it possible check privileges of all the users or roles, and what are the objects owned by user and role with their privileges. I am getting the output which want from information_schema.roles_usage_grants, but as I not running the query as a superuser so I am able to see only one