Re: SQL Query never ending...

2018-06-20 Thread Fabrízio de Royes Mello
rejected. > Are you talking about http://explain.depesz.com ?? If yes you should copy and paste the EXPLAIN output of your query... If you don't do it yet, please do it and send to us the results . And use some external service like pastebin.com to send long SQL statements. Regards, -- Fab

Re: execute block like Firebird does

2018-02-11 Thread Fabrízio de Royes Mello
hich returns a set of records ? > > you can use a DO - block: > > > https://www.postgresql.org/docs/current/static/sql-do.html > But DO blocks returns "void", I mean you can't return values/records from this statement. Regards, -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Disable TRUST authentication by using ClientAuthentication_hook

2018-07-13 Thread Fabrízio de Royes Mello
ple if you forgot the superuser password. > Otherwise, there's good chance you might use the ClientAuthentication hook > to do what you want. > > > If you're an server admin you can disable the extension (editing shared_pre_load_libraries GUC), change password and then enable the exten

Re: Replication pull instead of push

2018-03-07 Thread Fabrízio de Royes Mello
which needs to be > replicated from master to slave. > The way is fix your network connection and if necessary change your subscription side do connect again in your server and continue pulling data. If you don't drop your publication it will retain the WAL until the subscription connect again a

Re: postgres with graph model

2018-04-19 Thread Fabrízio de Royes Mello
idea was to use a graph database e.g > neo4j, but I have > got a limitation, that the whole system should be designed in Postgres. > Did you can give some ideas to build a graph within Postgres Do you already check the pgrouting [1] project? Regards, [1] http://pgrouting.org/ > --

Re: Problem with trigger makes Detail record be invalid

2018-04-19 Thread Fabrízio de Royes Mello
[1] https://pt.stackoverflow.com/questions/256115/postgresql-foreign-keys-falhando/256398#256398 -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Oracle vs PG

2018-10-23 Thread Fabrízio de Royes Mello
was almost content-free I not would use it on either > side of the argument. The only thing I pulled from it was Amazon changed > databases and hit the learning curve. That will happen in either direction. > +1... I completely agree -- Fabrízio de Royes Mello Timbira - http://w

Re: Oracle vs PG

2018-10-23 Thread Fabrízio de Royes Mello
Savepoint infrastructure we need a more detailed information. Regards, -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Logical locking beyond pg_advisory

2018-09-17 Thread Fabrízio de Royes Mello
n more about what kind of problem you want to solve. > b) What are the consequences of the large number of inserts and deletions The first thing came to my mind with this approach is table bloat. > c) Performance. In fact, pg_advisory* implies a network roundtrip, but (I think) no table operat

Re: Connection pooling for differing databases?

2019-03-07 Thread Fabrízio de Royes Mello
ns with database names on another server, etc. Is there a way to do something like this? > Yeap, pgbouncer do that. See "databases" configuration section [1]. Regards, [1] https://pgbouncer.github.io/config.html#section-databases -- Fabrízio de Royes Mello Timbi

Re: Table Replication

2019-01-29 Thread Fabrízio de Royes Mello
1] extension. Regards, [1] https://www.2ndquadrant.com/en/resources/pglogical/ -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: dump and restore ordered by schema or table name

2019-06-04 Thread Fabrízio de Royes Mello
dump or restore ordered alphabetically ? It could > be by schema or table, do we have it ? > > Did you check the -l and -L options? It can help you. Regards, -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: with and trigger

2019-05-29 Thread Fabrízio de Royes Mello
result, so ... > This trigger is obviously an example, our tables have more complex > structures but here we want only to understand the way postgres works or if > it´s not working properly. > To see updated data using a trigger in the same transaction you should create

Re: Refresh Publication takes hours and doesn´t finish

2019-05-21 Thread Fabrízio de Royes Mello
alog you should set "allow_system_table_mods=on" and restart PostgreSQL service. After that you'll able to recreate the "pg_catalog.pg_publication_tables" system view. (You can use the Tom's suggestion using LATERAL) Regards, -- Fabrízio de Royes Mello

Re: Re: Refresh Publication takes hours and doesn´t finish

2019-05-21 Thread Fabrízio de Royes Mello
FROM pg_publication P, pg_class C JOIN pg_namespace N ON (N.oid = C.relnamespace), LATERAL pg_get_publication_tables(P.pubname) WHERE C.oid = pg_get_publication_tables.relid; CREATE VIEW Regards, -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Re: Refresh Publication takes hours and doesn´t finish

2019-05-20 Thread Fabrízio de Royes Mello
namespace), > +LATERAL pg_get_publication_tables(P.pubname) > + WHERE C.oid = pg_get_publication_tables.relid; > And why not just JOIN direct with pg_publication_rel ? Regards, -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: In-depth commercial postgresql training

2019-06-27 Thread Fabrízio de Royes Mello
sql source code). Is there any company that offers > something like that? > > Another important thing to mention is that due to legal reasons we can't > make payments in any currency other than BRL. > Hi Marcelo, Our Brazilian company called Timbira can help you. Regards, -- Fabrízio

Re: patch 11.2 to 11.4

2019-06-28 Thread Fabrízio de Royes Mello
3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 > 20150623 (Red Hat 4.8.5-36), 64-bit > (1 row) > > Please do the needful. > > During a normal "yum update" (if I'm not wrong) PostgreSQL is restarted... If not you should restart manually. Regards, -- Fab

Re: patch 11.2 to 11.4

2019-06-27 Thread Fabrízio de Royes Mello
se share me the steps . > > Just run the following command: yum update postgresql11* Regards, -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Operator is not unique

2019-09-24 Thread Fabrízio de Royes Mello
> Did you created an operator for it? Why? Regards, -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Operator is not unique

2019-09-24 Thread Fabrízio de Royes Mello
oprrest | oprjoin -+--+--+-+-++-+--+---++---+-+-+- + | 11 | 10 | b | f | f | 1700 | 1700 | 1700 | 1758 | 0 | numeric_add | - | - (1 row) Please, try it in your environment and let us know. Regards, --

Re: POLL: Adding transaction status to default psql prompt

2020-02-06 Thread Fabrízio de Royes Mello
Em qua, 5 de fev de 2020 às 23:55, Vik Fearing escreveu: > > Please answer +1 if you want or don't mind seeing transaction status by > default in psql or -1 if you would prefer to keep the current default. > +1 -- Fabrízio de Royes Mello Timbira - http://www.ti

Re: Date created for tables

2019-12-24 Thread Fabrízio de Royes Mello
very easy to get a very first version tracking local objects and if we need to add shared objects (databases, roles, tablespaces) we can use hooks and some piece of C code to do the job. Regards, -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Co

Re: Need auto fail over cluster solution for PostGres

2019-12-30 Thread Fabrízio de Royes Mello
options: https://github.com/zalando/patroni https://github.com/sorintlab/stolon https://github.com/ClusterLabs/PAF Regards, -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Conditional column filtering with pglogical replication

2020-10-23 Thread Fabrízio de Royes Mello
> Hello, According to the documentation [1] the row_filter is a normal PostgreSQL expression with the same limitations of CHECK constraints, so you can do something like: row_filter := 'c between 10 and 20 and b = ?' Regards, [1] https://github.com/2ndQuadrant/pglogical#row-filtering -- Fabrízio de Roy

Re: Join optimization

2020-07-11 Thread Fabrízio de Royes Mello
Is there a fundamental reason why PG can't do the same? > It does... did you see the “never executed” notice on the Postgres explain output? Regards, -- Fabrízio de Royes Mello Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Getting Involved

2021-03-17 Thread Fabrízio de Royes Mello
bug fixing process works. > > Any help is greatly appreciated! Hi, First of all be welcome... the links below can help you to solve all initial doubts about the GSoC: https://wiki.postgresql.org/wiki/GSoC https://wiki.postgresql.org/wiki/GSoC_2021 Regards, -- Fabrízio de Royes Mell

Re: Where can I follow the progress of "Pluggable Storage" development?

2021-12-13 Thread Fabrízio de Royes Mello
Em seg., 13 de dez. de 2021 às 11:35, Jean Baro escreveu: > > Hello there. > > I am just an enthusiast of PostgreSQL and would like to get more information about Pluggable Storage's progress (or not). Please. > We already support it since version 12 released in 2019 but we named it as "Table

Re: How to explicitly lock and unlock tables in pgsql?

2022-03-16 Thread Fabrízio de Royes Mello
Em qua., 16 de mar. de 2022 às 17:30, Shaozhong SHI escreveu: > Table locks present a barrier for progressing queries. > > How to explicitly lock and unlock tables in pgsql, so that we can > guarantee the progress of running scripts? > > Regards, > > David > Have a look at

Re: Postgres calendar?

2022-10-04 Thread Fabrízio de Royes Mello
Em ter., 4 de out. de 2022 às 18:02, Bruce Momjian escreveu: > > Would people be interesting in subscribing to a Postgres calendar that > includes dates for minor releases, final minor release dates for major > versions, commit fests, and even Postgres events? For example, it could > include