Re: Logical replication subscription owner

2020-05-09 Thread Euler Taveira
e documented accordingly. I'm +0.5 to the idea of adding a WARNING when you create/alter a role that has REPLICATION but not LOGIN. -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pg_restore error message

2020-05-07 Thread Euler Taveira
Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services From f3853512e827952402020b2b0f3003ac8c5c9d96 Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Thu, 7 May 2020 18:17:28 -0300 Subject: [PATCH] pg_restore failure message

Re: WAL usage calculation patch

2020-04-06 Thread Euler Taveira
On Mon, 6 Apr 2020 at 10:37, Julien Rouhaud wrote: > On Mon, Apr 06, 2020 at 10:12:55AM -0300, Euler Taveira wrote: > > On Mon, 6 Apr 2020 at 00:25, Amit Kapila > wrote: > > > > > > > > I have pushed pg_stat_statements and Explain related patches. I am >

Re: WAL usage calculation patch

2020-04-06 Thread Euler Taveira
pw? wal_records and wal_bytes does not have a prefix 'num'. It seems inconsistent to me. Regards, -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: [PATCH] Skip llvm bytecode generation if LLVM is missing

2020-03-12 Thread Euler Taveira
adding instruction into README of all extensions. What is the side effects of not providing .bc files? It seems some extensions won't benefit from LLVM. Regards, -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Restore replication settings when modifying a field type

2020-03-10 Thread Euler Taveira
4abac742dd35ed9b9b01). Are you planning to backpatch it? IMHO you should because it is a bug (since REPLICA IDENTITY was introduced in 9.4). This patch can be applied as-is in 12 but not to other older branches. I attached new patches. Regards, -- Euler Taveira http://www.2ndQuadrant.co

Re: logical replication empty transactions

2020-03-05 Thread Euler Taveira
On Thu, 5 Mar 2020 at 05:45, Amit Kapila wrote: > Euler, can we try to update the patch based on the number of > transactions threshold and see how it works? > > I will do. -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote D

Re: logical replication empty transactions

2020-03-03 Thread Euler Taveira
can add it to the patch. Regards, -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: row filtering for logical replication

2020-01-16 Thread Euler Taveira
it suggestions. I'll post a new patch as soon as possible. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: logical replication does not fire per-column triggers

2019-12-13 Thread Euler Taveira
nth(estate->es_range_table, 0); + It should be outside the loop. + if (newtup.changed) It should be newtup.changed[i]. You should add a test that exposes "ignore OF col1" such as: $node_publisher->safe_psql('postgres', "UPDATE tab_fk_ref SET id = 6 WHERE id = 1;

Re: obsolete example

2019-11-21 Thread Euler Taveira
o improve it). I suggest unbreak the funcs module with 'mv funcs_new.c func.c'. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: psql \d for wide tables / pattern for individual columns

2019-11-10 Thread Euler Taveira
ifferentiate a complete output from another suppress-some-columns output if you don't provide the meta-command. I think you should explicitly show that some columns were suppressed (something like "... suppressed columns..." after the list of matched columns). If you don't, it could lead

Re: logical replication empty transactions

2019-11-08 Thread Euler Taveira
s "skip empty transaction" as you described above and I did something similar to it. Patch is attached. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento From 433ea40a02ab823f3aa70c

Re: pg_upgrade and subscriptions

2019-11-08 Thread Euler Taveira
nges that happen while database was offline" because the slot will remain in the publisher and we are upgrading the subscriber. Since we are providing a script for the common case, you are free to ignore it and create a new script that fulfill your requirements. -- Euler Taveira

Re: v12 and pg_restore -f-

2019-11-04 Thread Euler Taveira
? I'm -0.5 on changing usage(). If you are using 9.5, you know that it does not work. If you try it by accident (because it works in v12), it will work but it is not that important to inform it in --help (if you are in doubt, checking the docs will answer your question).

Re: auxiliary processes in pg_stat_ssl

2019-11-04 Thread Euler Taveira
p, it is pointless. BackendType that open connections to server are: autovacuum worker, client backend, background worker, wal sender. I also notice that pg_stat_gssapi is in the same boat as pg_stat_ssl and we should constraint the rows to backend types that open connections. I'm attaching a patc

Re: v12 and pg_restore -f-

2019-11-04 Thread Euler Taveira
s certainly room to > > consider reverting the part that says you *must* write "-f -" to get > > output to stdout. > > I don't think this will buy us anything, if we get past branches updated > promptly. > +1. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: On disable_cost

2019-11-01 Thread Euler Taveira
ive than others, regardless of the cost. > I'm afraid it is not as cheap as using diable_cost as a node cost. Are you proposing to add a new boolean variable in Path struct to handle those cases in compare_path_costs_fuzzily? -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: abs function for interval

2019-10-31 Thread Euler Taveira
done). > >It'd probably be easiest to implement this by comparing with a 0 >interval using inteval_lt() or interval_cmp_internal(). > Hmm. Good idea. Let me try it. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consult

Re: Restore replication settings when modifying a field type

2019-10-31 Thread Euler Taveira
lterColumnType records everything that depends on the column and for indexes it saves the definition (via pg_get_indexdef_string). Definition is not sufficient for reconstructing the replica identity information because there is not such keyword for replica identity in CREATE INDEX. The new index shou

abs function for interval

2019-10-31 Thread Euler Taveira
789 seconds' as t; t - 10 mons 3 days 03:55:06.789 (1 row) -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento F

Re: Add a GUC variable that control logical replication

2019-10-19 Thread Euler Taveira
eature is not essential for unidirectional logical replication. However, it is important for multi-master replication. Data synchronization tool will generate transactions with rows that are already in the other node(s) so those transactions can't be replicated to avoid (expensive) conflicts. -

Re: v12 and pg_restore -f-

2019-10-09 Thread Euler Taveira
ht ridiculous, so I don't see why we're so concerned about > a change to how pg_restore works here. > Yeah, if you check pg_restore version, you could use new syntax for 12+. We break scripts every release (mainly with catalog changes) and I don't know why this change is different than the other ones. The pg_restore changes is more user-friendly and less error-prone. Regards, -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Regarding extension

2019-10-03 Thread Euler Taveira
by "ld". However, if you want to know an extension is installed in a specific database, you should be logged in it. That's because extension catalog is not global. > How to have trigger for create extension? > Event triggers. -- Euler Taveira

Re: row filtering for logical replication

2019-09-25 Thread Euler Taveira
Em qua, 25 de set de 2019 às 08:08, Euler Taveira escreveu: > > I'll send a patchset later today. > ... and it is attached. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinam

Re: row filtering for logical replication

2019-09-25 Thread Euler Taveira
IDENTITY. I explain this in documentation. > 4. SQL splicing code in fetch_remote_table_info() function is too long > I split it into small pieces. I also run pgindent to improve code style. I'll send a patchset later today. Regards, -- Euler Taveira Timbira - http:/

Re: doc: pg_trgm missing description for GUC "pg_trgm.strict_word_similarity_threshold"

2019-09-12 Thread Euler Taveira
Em seg, 10 de jun de 2019 às 14:34, Alexander Korotkov escreveu: > > Pushed! > Alexander, this commit is ok for 11 and so. However, GUC strict_word_similarity_threshold does not exist in 9.6 and 10. The attached patch revert this part. It should apply cleanly in 9.6 and 10. -- Eule

Re: row filtering for logical replication

2019-09-04 Thread Euler Taveira
Em ter, 3 de set de 2019 às 00:32, Euler Taveira escreveu: > > Ops... exact. That was an oversight while poking with different types of > slots. > Here is a rebased version including this small fix. -- Euler Taveira Timbira - http://www.ti

Re: row filtering for logical replication

2019-09-02 Thread Euler Taveira
y Kondratov, in line 955 of > 0005-Row-filtering-for-logical-replication.patch it should be > instead of > Ops... exact. That was an oversight while poking with different types of slots. -- Euler Taveira Timbira - http://www.timbira.c

Re: Proposal: roll pg_stat_statements into core

2019-09-02 Thread Euler Taveira
replication out-of-box; we should do the same for query analysis. Regards, -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: [Patch] Add a reset_computed_values function in pg_stat_statements

2019-09-01 Thread Euler Taveira
ys reset all statement statistics). Why don't you provide a pg_stat_statements_reset_computed_values(userid Oid, dbid Oid, queryid bigint)? You forgot to provide documentation for the new function. You should revoke pg_stat_statements_reset_computed_values from PUBLIC. Regards, -- Euler Taveira

Re: row filtering for logical replication

2019-09-01 Thread Euler Taveira
Em dom, 1 de set de 2019 às 06:09, Erik Rijkers escreveu: > > The first 4 of these apply without error, but I can't get 0005 to apply. > This is what I use: > Erik, I generate a new patch set with patience diff algorithm. It seems it applies cleanly. -- E

Re: row filtering for logical replication

2019-08-31 Thread Euler Taveira
with is_cloud=TRUE on cloud, replicated to remote; > then updated with is_cloud=FALSE on remote, replicated to cloud; then > deleted on remote. > That's because you don't include is_cloud in PK or REPLICA IDENTITY. I add a small note in docs. -- Euler Taveira

Re: row filtering for logical replication

2019-08-31 Thread Euler Taveira
used in expressions must be part of PK or REPLICA IDENTITY. I add regression tests. Comments? -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento From 87945236590e9fd37b203d325b74dc5b

Re: base backup client as auxiliary backend process

2019-07-11 Thread Euler Taveira
be restarted and (b) it can't be parallelized. AFAICS your proposal doesn't solve them. It would be nice if it can be solved in future releases (using rsync or another in-house tool is as fragile as using pg_basebackup). -- Euler Taveira Timbira - http://www

Re: Inconsistency between attname of index and attname of relation

2019-07-05 Thread Euler Taveira
ion about the > identity of the tuple being updated / deleted. > Ouch. That's a wal2json bug. I saw that you already opened an issue. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

initial random incompatibility

2019-06-08 Thread Euler Taveira
the year [1] (commit 6645ad6bdd81e7d5a764e0d94ef52fae053a9e13). [1] https://www.postgresql.org/message-id/3859.1545849...@sss.pgh.pa.us -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Fix link for v12

2019-05-23 Thread Euler Taveira
Hi, I noticed that v12 release notes is referencing the wrong GUC. It should be recovery_target_timeline instead of recovery_target_time. Patch attached. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento

Re: pgindent run next week?

2019-05-22 Thread Euler Taveira
h files and 1 of 25 .c files. Like Mark, I don't have a strong preference, however, re-indent files would reduce developer time while preparing patches to back branches. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: vacuumdb and new VACUUM options

2019-05-08 Thread Euler Taveira
both? > --index-cleanup=BOOL -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: improving wraparound behavior

2019-05-03 Thread Euler Taveira
t it kills some processes that are starving resources. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Adding Unix domain socket path and port to pg_stat_get_wal_senders()

2019-04-12 Thread Euler Taveira
Em sex, 12 de abr de 2019 às 01:39, Michael Paquier escreveu: > > On Thu, Apr 11, 2019 at 10:19:01PM -0300, Euler Taveira wrote: > > application_name. I'm not sure if it solves your complain but Peter > > committed a patch [1] for v12 that distinguishes replicas in the

Re: Adding Unix domain socket path and port to pg_stat_get_wal_senders()

2019-04-11 Thread Euler Taveira
ocket information into client_addr unless we are prepared to break this view (client_addr has type inet and it would be necessary to change it to text). It could break a lot of applications. [1] https://www.postgresql.org/message-id/flat/1257eaee-4874-e791-e83a-46720c72c...@2ndquadrant.com --

Re: PostgreSQL pollutes the file system

2019-04-10 Thread Euler Taveira
065d4%40timbira.com.br -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Should the docs have a warning about pg_stat_reset()?

2019-04-10 Thread Euler Taveira
tistics that it depends on" plus detail "Consider executing ANALYZE on all your tables" / "Consider executing ANALYZE on table foo.bar". -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: change password_encryption default to scram-sha-256?

2019-04-08 Thread Euler Taveira
bouncer SCRAM support. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Fix doc bug in logical replication.

2019-04-08 Thread Euler Taveira
h both have the incorrect information as well, even if > the patch itself does not. > I would say it is inaccurate because the actual instruction works. I agree that your words are an improvement but it lacks a comment on the slot_[store|modify]_cstrings. -- Euler Taveira

Re: Should the docs have a warning about pg_stat_reset()?

2019-03-26 Thread Euler Taveira
lse think this is a problem worth trying to solve? > I don't remember why we didn't consider table without stats to be ANALYZEd. Isn't it the case to fix autovacuum? Analyze autovacuum_count + vacuum_count = 0? If at least autovacuum was also time-based, it shou

Re: Special role for subscriptions

2019-03-21 Thread Euler Taveira
dea is CREATE bit to create subscriptions (without replicate) and SUBSCRIBE bit to replicate tables. It is not just a privilege to create a subscription but also to modify tables that a role doesn't have explicit permission. Let's allocate another AclItem? -- Euler Taveira

Re: PostgreSQL pollutes the file system

2019-03-20 Thread Euler Taveira
nt votes, let's at least consider a 'pg_' prefix. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: PostgreSQL pollutes the file system

2019-03-20 Thread Euler Taveira
rything related to PostgreSQL. > There are Postgres binaries that do not start with 'pg_' (for example, pgbench and ecpg) and do not confuse newbies or conflict with OS binary names. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultori

Re: PostgreSQL pollutes the file system

2019-03-20 Thread Euler Taveira
databases. psql -c "stmt" can replace createdb, dropdb, createuser and dropuser. What about deprecate them (and remove after a support cycle)? -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Special role for subscriptions

2019-03-19 Thread Euler Taveira
ted in a transparent manner (which means that CREATE PUBLICATION/SUBSCRIPTION should create iif there is no NODE specification) -- old syntax should work but we start to accept node info in both sides. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQ

Re: proposal: pg_restore --convert-to-text

2019-03-16 Thread Euler Taveira
ooks like pretty, but which one is preffered? > I don't have a style preference but decided to change to your suggestion. New version attached. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolviment

Re: [WIP] CREATE SUBSCRIPTION with FOR TABLES clause (table filter)

2019-03-12 Thread Euler Taveira
+4IdzfM3G2/vEKf2bOgKxK4rL5ZSqKf+6KP3R5LzyrCj > UAmz4/+AzIdNausRzseSH6uQd5aswU6ehpASRAuHNFjL0YoLSwrsQu11uE+y4fbv > rGttqtsoqDSXPuVrTz1FpiLM7jokdOKTJGERfy5W2ojJeHMSzfC6WOxIt5wLciv7 > MGiOhTRRMliSaYlH2aPKzmrq3YNhr439PX8ApwcLeYkAg1Wlt95TgYdew7nKNakC > KqMdv2Z5PH+75HRD4pTNDzPj8C1BEy7HGAxgYFtPHck/teE1MO8hKqUCHmNAvF9E > vDNUG9hgLCs1Sq7/FteJo08sUltIB0dBOtCXYWNJvTKry0y1rkwMbdvBzSyW3MiC > QGAb9v86IQsHa9gpLGRJjKy9ALt8Y+K2pCQDGGMrtme7gTM5Tvo71ZmNBIIMUAft > 3VGokTGrscnXEI3BMbJExswOTh+kFwSAUn3rpscFcUiGjDmW5prcMR4afJFARyJs > FSw3DG3Mgqp88a7GSVYp6QN5yCYmxqVOyddUqTkev4vEAX9CmsiuDeYmWJz9egd1 > BurjiT800yAa97qGGfe5g4YSyDf7VlA0KdPbBmZFCoOyroBtgPQ= > =TNMF > -END PGP SIGNATURE- -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Suggestions on message transfer among backends

2019-03-11 Thread Euler Taveira
, if it is part of a complex solution, a background worker with shared memory access is the way to go. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Temporal Table Proposal

2019-02-22 Thread Euler Taveira
Em sex, 22 de fev de 2019 às 18:16, Paul Jungwirth escreveu: > > On 2/22/19 11:31 AM, Euler Taveira wrote: > > Em sex, 22 de fev de 2019 às 15:41, Ibrar Ahmed > > escreveu: > >> > >> While working on another PostgreSQL feature, I was thinking that

Re: Temporal Table Proposal

2019-02-22 Thread Euler Taveira
n't in the January CF. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: psql show URL with help

2019-02-22 Thread Euler Taveira
one could be confused as I said earlier. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: psql show URL with help

2019-02-22 Thread Euler Taveira
O URL should be printed iif psql version is the same as server version. If we want flexibility, let's add an option to enable URL exhibition (always/same) that defaults to same. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Des

Re: Set fallback_application_name for a walreceiver to cluster_name

2019-02-20 Thread Euler Taveira
tely as well. It's still possible to specify another > application_name in primary_conninfo explicitly. > I tested it and both patches work as described. Passes all tests. Doc describes the proposed feature. Doc builds without errors. -- Euler Taveira Timb

Re: BRIN summarize autovac_report_workitem passes datname as relname

2019-02-20 Thread Euler Taveira
Em qua, 20 de fev de 2019 às 15:56, Justin Pryzby escreveu: > > I guess it should be database.namespace.relname ? > Yup. It is an oversight in 7526e10224f0792201e99631567bbe44492bbde4. -- Euler Taveira Timbira - http://www.timbira.com.br/ P

Re: list append syntax for postgresql.conf

2019-02-20 Thread Euler Taveira
ed_preload_libraries = 'foo' then shared_preload_libraries += 'bar' and then shared_preload_libraries = 'pg_stat_statements' You have only 'pg_stat_statements' or 'foo, bar, pg_stat_statements'? Suppose you mistype 'bar' as 'baz', do you have only 'pg_stat_statements'? -- Euler Taveira

Re: proposal: pg_restore --convert-to-text

2019-02-19 Thread Euler Taveira
Em seg, 18 de fev de 2019 às 19:21, Tom Lane escreveu: > > Euler Taveira writes: > > Since no one has stepped up, I took a stab at it. It will prohibit > > standard output unless '-f -' be specified. -l option also has the > > same restriction. > > Hm, don't really

Re: proposal: pg_restore --convert-to-text

2019-02-18 Thread Euler Taveira
ne has stepped up, I took a stab at it. It will prohibit standard output unless '-f -' be specified. -l option also has the same restriction. It breaks backward compatibility and as Tom suggested a variant of this patch (without docs) should be applied to back branches. -- Euler Taveira

Re: proposal: pg_restore --convert-to-text

2019-02-13 Thread Euler Taveira
to this road, -f option should allow - (stdout) as parameter. > (Yes, it will break the scripts of anyone who is currently scripting > pg_restore to output SQL text. How many people do that?) > I use pg_restore to stdout a lot but I wouldn't bother to specify an option to get it (such as pg_

Re: row filtering for logical replication

2018-11-23 Thread Euler Taveira
TAP test. > Sure. Besides the problem presented by Hironobu-san, I'm doing some cleanup and improving docs. I also forget to declare pg_publication_rel TOAST table. Thanks for your review. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: row filtering for logical replication

2018-11-23 Thread Euler Taveira
s of this feature. > Use the same infrastructure as RLS could be a good idea but use RLS for row filtering is not. RLS is complex. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: row filtering for logical replication

2018-11-01 Thread Euler Taveira
d = %u AND p.pubname IN (", MyLogicalRepWorker->relid); + appendStringInfo(, "SELECT pg_get_expr(prrowfilter, prrelid) FROM pg_publication p INNER JOIN pg_publication_rel pr ON (p.oid = pr.prpubid) WHERE pr.prrelid = %u AND p.pubname IN (", lrel->remoteid); -- Euler Tav

Re: row filtering for logical replication

2018-10-31 Thread Euler Taveira
Em qua, 28 de fev de 2018 às 20:03, Euler Taveira escreveu: > The attached patches add support for filtering rows in the publisher. > I rebased the patch. I added row filtering for initial synchronization, pg_dump support and psql support. 0001 removes unused code. 0002 reduces memory use

Re: Comment refers to non existent function IncreaseRestartDecodingForSlot

2018-06-29 Thread Euler Taveira
it be referring to ? > LogicalIncreaseXminForSlot (it is a few lines above). It has been like that since logical decoding was introduced. The trivial patch fixes it. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimen

Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query

2018-06-22 Thread Euler Taveira
2018-06-22 12:06 GMT-03:00 Robert Haas : > On Wed, Jun 20, 2018 at 10:19 AM, Euler Taveira wrote: >> 2018-06-20 4:30 GMT-03:00 Haribabu Kommi : >>> Attached is a simple patch with implementation. Comments? >>> >> Why don't you extend the existing function pg_

Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query

2018-06-20 Thread Euler Taveira
2018-06-20 4:30 GMT-03:00 Haribabu Kommi : > Attached is a simple patch with implementation. Comments? > Why don't you extend the existing function pg_stat_statements_reset()? -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consu

Re: Invisible Indexes

2018-06-19 Thread Euler Taveira
s could explain cached plans x invisible indexes). > BTW, like you, I seem to remember somebody writing an extension that > did added a GUC that did exactly this, and demoing it at a conference. > Maybe Oleg or Teodor? > https://github.com/postgrespro/plant

Re: ALTER CONSTRAINT change action

2018-05-30 Thread Euler Taveira
w syntax would be useful. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Adding Markodwn formatting to psql output

2018-05-29 Thread Euler Taveira
=bssao9-olcw...@mail.gmail.com#CAAYBy8YU4pXYKDHeQhsA_=FC93yOBZp5j1h=bssao9-olcw...@mail.gmail.com -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: behave of --create-slot option

2018-05-29 Thread Euler Taveira
potent ("try" because if we have a network problem it won't be possible to remove the replication slot). -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: behave of --create-slot option

2018-05-28 Thread Euler Taveira
running a script, why don't you let pg_basebackup use temporary replication slots? -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: A Japanese-unfriendy error message contruction

2018-05-22 Thread Euler Taveira
2018-05-22 6:20 GMT-03:00 Kyotaro HORIGUCHI <horiguchi.kyot...@lab.ntt.co.jp>: > For the reason, I'd like to propose to refactor > getObjectDescription:OPCLASS_POLICY as the attached patch. The > same structure is seen for OPCLASS_AMOP. > +1. --

Re: Add --include-table-data-where option to pg_dump, to export only a subset of table data

2018-05-21 Thread Euler Taveira
nd --inserts? [1] https://www.postgresql.org/message-id/1212299813.17810.17.camel%40ubuntu -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: libpq compression

2018-05-15 Thread Euler Taveira
a.com [2] https://commitfest.postgresql.org/18/ -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Exposing guc_malloc/strdup/realloc for plugins?

2018-05-08 Thread Euler Taveira
e this > code, I am wondering if it would make sense to expose them for extension > developers. Please see the attached for the simple idea. > Although I didn't need similar code on some extensions, code reuse is always a good goal. -- Euler Taveira

Re: pg_recvlogical broken in back branches

2018-04-17 Thread Euler Taveira
2018-04-17 3:38 GMT-03:00 Michael Paquier <mich...@paquier.xyz>: > The exact same fix has already applied on all stable branches: > Sorry about the noise. I've only checked the REL9_6_8 tag and the tarball. -- Euler Taveira Ti

pg_recvlogical broken in back branches

2018-04-17 Thread Euler Taveira
A proposed fix is attached. It should be applied to 9.4, 9.5, 9.6, and 10. (Although, client version 10 can connect to server version 10, client version 10 can't connect to server version 9.6.) Comments? [1] https://github.com/eulerto/wal2json/issues/61 --

Re: power() function in Windows: "value out of range: underflow"

2018-04-10 Thread Euler Taveira
docs.microsoft.com/en-us/cpp/porting/floating-point-migration-issues [2] https://msdn.microsoft.com/pt-br/library/e7s85ffb.aspx -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: power() function in Windows: "value out of range: underflow"

2018-04-10 Thread Euler Taveira
out of range: underflow > > In Linux environment, instead of ERROR it returns 'NaN'. > Could you show us a simple test case? Print arguments, result and errno. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: [submit code] I develop a tool for pgsql, how can I submit it

2018-03-13 Thread Euler Taveira
lopment outside PostgreSQL, those steps would improve your code. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Additional Statistics Hooks

2018-03-12 Thread Euler Taveira
sibility? Just wondering what the policy on such stuff is. > If it is a new feature and is not in the last CF, it won't be considered for v11 (even small patches). -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: Too much memory allocated for ReorderBufferDiskChange

2018-03-05 Thread Euler Taveira
orderBufferDiskChange *) rb->outbuf; > ReorderBufferSerializeReserve() always does a repalloc here (ReorderBufferDiskChange size is always greater than zero) then the allocation size is correct. -- Euler Taveira Timbira - http://www.timbira.com.br/

Re: row filtering for logical replication

2018-03-01 Thread Euler Taveira
ts self. > IIRC implementation is similar to RLS expressions. I'll check all of these rules. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: row filtering for logical replication

2018-03-01 Thread Euler Taveira
2018-03-01 18:25 GMT-03:00 Erik Rijkers <e...@xs4all.nl>: > Attached is 'logrep_rowfilter.sh', a demonstration of above-described bug. > Thanks for testing. I will figure out what is happening. There are some leaks around. I'll post another version when I fix some of those bugs.

Re: row filtering for logical replication

2018-03-01 Thread Euler Taveira
ted > to the last CF" policy? > I forgot to mention but this feature is for v12. I know the rules and that is why I didn't add it to the in progress CF. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: row filtering for logical replication

2018-03-01 Thread Euler Taveira
the feature but I'm planning to add a separate test file for it. -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

unused includes in test_decoding

2018-02-28 Thread Euler Taveira
Hi, This is a cosmetic patch that removes some unused includes in test_decoding. It seems to be like this since day 1 (9.4). -- Euler Taveira Timbira - http://www.timbira.com.br/ PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento From

row filtering for logical replication

2018-02-28 Thread Euler Taveira
departments WHERE (id > 2000 AND id <= 3000); Row that doesn't match the WHERE clause will not be sent to the subscribers. Patches 0001 and 0002 are only refactors and can be applied independently. 0003 doesn't include row filtering on initial synchronization. Comments? -- Euler T

<    1   2   3   4