Re: logical replication restrictions

2021-09-22 Thread Euler Taveira
reason, you have to delay when data is available. There might be other use cases but these are the ones I regularly heard from customers. BTW, I have a WIP patch for this feature. I didn't have enough time to post it because it lacks documentation and tests. I'm planning to do it as soon

Re: Trigger position

2021-09-15 Thread Euler Taveira
that letters are more flexible than numbers but some users are number-oriented. I'm afraid an extra mechanism to determine the order to fire triggers will confuse programmers if someone decides to use both. Besides that, we have to expend a few cycles to determine the exact trigger execution order. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Column Filtering in Logical Replication

2021-09-15 Thread Euler Taveira
SCHEMA schema_name, [, ...] ALTER PUBLICATION name DROP TABLE [ ONLY ] table_name [ * ] ALTER PUBLICATION name DROP ALL TABLES IN SCHEMA schema_name, [, ...] ALTER PUBLICATION name DROP ALL SEQUENCES IN SCHEMA schema_name, [, ...] Opinions? -- Euler Taveira EDB https://www.enterprisedb.com/

Re: TAP test for recovery_end_command

2021-09-13 Thread Euler Taveira
ive_cleanup_command_file", + 'archive_cleanup_command executed on checkpoint'); Is this test reliable? -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Remove duplicate static function check_permissions in slotfuncs.c and logicalfuncs.c

2021-09-12 Thread Euler Taveira
On Sun, Sep 12, 2021, at 8:02 PM, Bossart, Nathan wrote: > nitpick: It looks like there's an extra set of parentheses around > errmsg(). Indeed. Even the requirement for extra parenthesis around auxiliary function calls was removed in v12 (e3a87b4991cc2d00b7a3082abb54c5f12baedfd1). --

Re: TAP test for recovery_end_command

2021-09-12 Thread Euler Taveira
ry > restart-point. Setup a replica and stop it. It triggers a restartpoint during the shutdown. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Remove duplicate static function check_permissions in slotfuncs.c and logicalfuncs.c

2021-09-12 Thread Euler Taveira
gle function CheckReplicationSlotPermissions in slot.c? This way, > we can get rid of redundant code. Attaching a patch for it. Good catch! Your patch looks good to me. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Remove_temp_files_after_crash and significant recovery/startup time

2021-09-10 Thread Euler Taveira
ues as I explained in [1]. Service continuity (for the vast majority of cases) justifies turning it on by default. If your Postgres instance is generating millions of temporary files, it seems your setup needs some tuning. [1] https://www.postgresql.org/message-id/CAH503wDKdYzyq7U-QJqGn%3DGm6

Re: Column Filtering in Logical Replication

2021-09-07 Thread Euler Taveira
ww.fastmail.com -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-09-01 Thread Euler Taveira
https://github.com/eulerto/wal2json/issues/205 [2] https://github.com/eulerto/wal2json/issues/132 [3] https://github.com/eulerto/wal2json/issues/42 [4] https://www.postgresql.org/message-id/CAFiTN-uW50w0tWoUBg_VYCdvNeCzT%3Dt%3DJzhmiFd452FrLOwMMQ%40mail.gmail.com -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-09-01 Thread Euler Taveira
esql.org/message-id/CAHut%2BPsgRHymwLhJ9t3By6%2BKNaVDzfjf6Y4Aq%3DJRD-y8t1mEFg%40mail.gmail.com -- Euler Taveira EDB https://www.enterprisedb.com/ From 018cdb79733ddf4f0de1e4eace3a172bd685d53c Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Mon, 18 Jan 2021 12:07:51 -0300 Subject: [PATC

Re: row filtering for logical replication

2021-08-24 Thread Euler Taveira
anged. Since we're trading patches, I personally appreciate if you can send a patch on the top of the current one. I have some changes too and it is time consuming incorporating changes in the main patch.] -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-07-14 Thread Euler Taveira
On Wed, Jul 14, 2021, at 8:21 AM, Greg Nancarrow wrote: > Some minor v19 patch review points you might consider for your next > patch version: Greg, thanks for another review. I agree with all of these changes. It will be in the next patch. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-07-14 Thread Euler Taveira
want to enforce this condition, I suggest that we add it to CREATE PUBLICATION, ALTER PUBLICATION ... ADD|SET TABLE and ALTER TABLE ... REPLICA IDENTITY. Data are being constantly modified; schema is not. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-07-14 Thread Euler Taveira
an additional publication argument or OLD and NEW placeholders to reference old and new rows are feasible ideas). -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-07-13 Thread Euler Taveira
as errors. This feature uses a WHERE clause and behaves like it. I mean, a NULL result does not return the row. See ExecQual(). -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-07-13 Thread Euler Taveira
not-null constraints in the WHERE clause. The WHERE clause does not allow functions and user-defined operators. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-07-13 Thread Euler Taveira
de: That's because I didn't copy the TupleDesc in CacheMemoryContext. Greg pointed it too in a previous email [3]. The new patch (v19) includes a fix for it. [1] https://www.postgresql.org/message-id/CA%2BHiwqG3Jz-cRS%3D4gqXmZDjDAi%3D%3D19GvrFCCqAawwHcOCEn4fQ%40mail.gmail.com [

Re: row filtering for logical replication

2021-07-13 Thread Euler Taveira
typo? 8< > typo: it/that ? > > I think it ought to say "This is the same code as ExecPrepareExpr() > but that is not used because"... Fixed. > 10. src/backend/replication/pgoutput/pgoutput.c - redundant debug logging? > > + /* Evaluates row filter */ > +

Re: row filtering for logical replication

2021-07-12 Thread Euler Taveira
perhaps see if the patch needs the same fix. Good catch! I completely forgot about _copyPublicationTable() and _equalPublicationTable(). -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-07-11 Thread Euler Taveira
On Sun, Jul 11, 2021, at 4:39 PM, Euler Taveira wrote: > with cache (v18) > --- > > mean: 0.63 us > stddev: 1.07 us > median: 0.55 us > min-max:[0.29 .. 844.87] us > percentile(99): 1.38 us > mode: 0.4

Re: row filtering for logical replication

2021-07-11 Thread Euler Taveira
ry error condition (specially one that will be rarely used). > (4) src/backend/replication/pgoutput/pgoutput.c > pgoutput_change() > > The 3 added calls to pgoutput_row_filter() are returning from > pgoutput_change(), if false is returned, but instead they should break > from the swit

Re: row filtering for logical replication

2021-07-11 Thread Euler Taveira
the > 0002-Measure-row-filter-overhead.patch. > - Inserted 1000 rows, sampled data for the first 100 times in this function. > not cached: average ~ 28.48 us > cached: average ~ 9.75 us > > Replication times: > - Using tables and row filters same as in Onder's c

Re: row filtering for logical replication

2021-07-07 Thread Euler Taveira
both ideas together. I'm done for today but I'll continue tomorrow. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: SSL/TLS instead of SSL in docs

2021-07-01 Thread Euler Taveira
r, the acronyms are declared separated. It doesn't seem to be a presentation issue per se but I'm asking just in case. [1] https://en.wikipedia.org/wiki/Transport_Layer_Security#Websites [1] https://datatracker.ietf.org/doc/html/rfc7568 -- Euler Taveira EDB https://www.enterprisedb.com/ From 22bc9135daf1572

Re: row filtering for logical replication

2021-06-30 Thread Euler Taveira
e changes to allow functions will need it. As the previous patches, it includes commits (0002 and 0003) that are not intended to be committed. They are available for test-only purposes. -- Euler Taveira EDB https://www.enterprisedb.com/ From 9c27d11efd2ac8257cc2664e5da82fd19f012ebc Mon Sep 17 00:00:0

Re: Emit namespace in post-copy output

2021-06-25 Thread Euler Taveira
bly won't conflict with another patch. If so, a reviewer will say so. If your patch doesn't have objections, it will eventually be committed. BTW, your patch looks good to me. [1] http://cfbot.cputube.org/index.html -- Euler Taveira EDB https://www.enterprisedb.com/

Re: cleanup temporary files after crash

2021-06-22 Thread Euler Taveira
On Fri, Jun 11, 2021, at 9:43 PM, Justin Pryzby wrote: > On Sat, Oct 31, 2020 at 09:01:15PM -0300, Euler Taveira wrote: > > > > The current behavior is only useful for debugging purposes. > > On Wed, 28 Oct 2020 at 15:42, Tomas Vondra > wrote: > > > One thing

missing GRANT on pg_subscription columns

2021-06-03 Thread Euler Taveira
column oid has no column-level privilege. I'm attaching a patch to fix it (indeed, 2 patches because of additional columns for v14). We should add instructions in the minor version release notes too. This issue was reported by Israel Barth. -- Euler Taveira EDB https://www.enterprisedb

Re: Corrected documentation of data type for the logical replication message formats.

2021-05-10 Thread Euler Taveira
t;Messages Data Types". at the first paragraph could help understand what these data types refer to (and also add a link to the data types section). [1] https://www.postgresql.org/docs/current/protocol-message-types.html -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-05-10 Thread Euler Taveira
s last review; however, I'm still working on a cache for evaluating expression as suggested by Andres. I hope to post a new patch soon. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Corrected documentation of data type for the logical replication message formats.

2021-05-09 Thread Euler Taveira
Q%40mail.gmail.com [2] https://www.postgresql.org/docs/current/protocol-message-types.html -- Euler Taveira EDB https://www.enterprisedb.com/

Re: PG Docs - CREATE SUBSCRIPTION option list order

2021-04-18 Thread Euler Taveira
od reason for the current ordering, so PSA my > patch which has identical content but just re-orders that option list > to be alphabetical. AFAICS there is not reason to use a random order here. I think this parameter list is in frequency of use. Your patch looks good to me.

Re: missing documentation for streaming in-progress transactions

2021-04-08 Thread Euler Taveira
e same as xid of the transaction for top-level +transactions). + Although, sub-transaction is also used in the documentation, I suggest to use subtransaction. Maybe change the other sub-transaction occurrences too. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Why is specifying oids = false multiple times in create table is silently ignored?

2021-04-07 Thread Euler Taveira
imes(see > below)? Shouldn't we throw an error for consistency with other options? > If you look at transformReloptions(), the no-op code is just a hack. Such a patch should add 'oids' as a reloption to test for multiple occurrences. Although, CREATE TABLE says you can use 'oids=false', Storage Parameters section does not mention it as a parameter. The code is fine as is. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Any objections to implementing LogicalDecodeMessageCB for pgoutput?

2021-04-07 Thread Euler Taveira
On Wed, Apr 7, 2021, at 2:20 AM, Amit Kapila wrote: > I have pushed this work and updated the CF entry accordingly. Great. Thank you. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: use AV worker items infrastructure for GIN pending list's cleanup

2021-04-05 Thread Euler Taveira
tgresql.org/docs/current/gin-tips.html > To avoid fluctuations in observed response time, it's desirable to have > pending-list cleanup occur in the background (i.e., via autovacuum). Could you provide a link from the previous discussion? -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Logical Replication - improve error message while adding tables to the publication in check_publication_add_relation

2021-04-05 Thread Euler Taveira
ror message according to the object class (table vs foreign table). While at it, separate unlogged/temp table error message into 2 messages. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Any objections to implementing LogicalDecodeMessageCB for pgoutput?

2021-04-05 Thread Euler Taveira
ch since the scope is beyond this feature. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Any objections to implementing LogicalDecodeMessageCB for pgoutput?

2021-04-02 Thread Euler Taveira
*/ Someone that is inspecting the code in the future could possibly check this discussion to understand why this function isn't available. This new patch set version has 2 patches that is because there are 2 separate changes: parse_output_parameters() refactor and logical decoding message support. -- Euler

Re: row filtering for logical replication

2021-03-30 Thread Euler Taveira
On Tue, Mar 30, 2021, at 8:23 AM, Amit Kapila wrote: > On Mon, Mar 29, 2021 at 6:47 PM Euler Taveira <mailto:euler%40eulerto.com>> wrote: > > > Few comments: > == > 1. How can we specify row filters for multiple tables for a > publication? Consider a cas

Re: row filtering for logical replication

2021-03-29 Thread Euler Taveira
er it. It seems somehow your subscriber close the replication connection causing this issue. Can you reproduce it consistently? If so, please share your steps. -- Euler Taveira EDB https://www.enterprisedb.com/ test-row-filter-pgbench.sh Description: application/shellscript

Re: row filtering for logical replication

2021-03-28 Thread Euler Taveira
e patch that changes the log_min_messages in the row filter regression test. It was part of this patch set for testing purposes only. I don't expect the patch that measures row filter performance to be included but I'm including it again in case someone wants to inspect the performance numbers.

Re: Add docs stub for recovery.conf

2021-03-28 Thread Euler Taveira
Obsolete Features". + trigger_file + promote_trigger_file + +setting has been renamed to + + There should be a period after the . -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-03-21 Thread Euler Taveira
patch set; * add new tests to improve coverage (INSERT/UPDATE/DELETE to exercise the row filter code). -- Euler Taveira EDB https://www.enterprisedb.com/ From a6d893be0091bc8cd8569ac380e6f628263d31c0 Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Mon, 18 Jan 2021 11:53:34 -0300 Subject: [PA

Re: row filtering for logical replication

2021-03-21 Thread Euler Taveira
.c uses Relation everywhere so I decided to create a new struct to store Relation and qual as a list item. It also minimizes the places you have to modify. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: cleanup temporary files after crash

2021-03-19 Thread Euler Taveira
itself. :-/ > My brain hurts from reading too much Perl today ... I feel the same when I have to deal with Perl code. It seems the animals are happy with this fix. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: cleanup temporary files after crash

2021-03-19 Thread Euler Taveira
fore SIGKILL to wait the temporary file being created. Do you think this modification will make this test more stable? -- Euler Taveira EDB https://www.enterprisedb.com/ diff --git a/src/test/recovery/t/022_crash_temp_files.pl b/src/test/recovery/t/022_crash_temp_files.pl index 8044849b73

Re: cleanup temporary files after crash

2021-03-18 Thread Euler Taveira
s close ;-) So let's make it 2000. My 32-bit laptop needs some repairs so I blindly chose 1k rows. > We might as well check that the temp file actually exists, before > killing the backend. Just to be sure. Do you mean with remove_temp_files_after_crash = on? New version attached. --

Re: cleanup temporary files after crash

2021-03-18 Thread Euler Taveira
On Thu, Mar 18, 2021, at 6:00 PM, Euler Taveira wrote: > On Thu, Mar 18, 2021, at 5:51 PM, Tomas Vondra wrote: >> OK. Can you prepare a patch with the proposed test approach? > I'm on it. What do you think about this patch? -- Euler Taveira EDB https://www.enterprisedb.com/ diff

Re: cleanup temporary files after crash

2021-03-18 Thread Euler Taveira
crease the number of > rows, to consistently get temp files. Yeah. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: cleanup temporary files after crash

2021-03-18 Thread Euler Taveira
, once the second session gets waiting on the tuple, kill the > backend. We might as well test that there actually is a temp file first, > and then test that it disappeared. Your suggestion works for me. Maybe you could use less rows in the session 2 query. I experimented with 1k rows an

Re: a verbose option for autovacuum

2021-03-17 Thread Euler Taveira
to me. There is just a small issue (double space after 'if') that I fixed in the attached version. -- Euler Taveira EDB https://www.enterprisedb.com/ diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 8341879d89..35be34ea06 100644 --- a/src/backend/acces

Re: cleanup temporary files after crash

2021-03-16 Thread Euler Taveira
s as default), for example. For now, I will add autocmd BufRead,BufNewFile postgresql.conf* setlocal ts=8 to my .vimrc. We should probably fix some settings that are misaligned such as parallel_setup_cost and shared_preload_libraries. The parameters timezone_abbreviations and max_pred_locks_per_page are us

Re: Logical Replication - improve error message while adding tables to the publication in check_publication_add_relation

2021-03-10 Thread Euler Taveira
ons. I agree that "f1 is not a table" is a confusing message at first because foreign table has "table" as description. Maybe if we apply the negation in both messages it would be clear (using the same wording as system tables). ERROR: "f1" is a foreign table DETA

Re: cleanup temporary files after crash

2021-03-09 Thread Euler Taveira
ault. Editor automatically added #. I'm not sure Tomas will include the tests. If so. the terminology should be adjusted too. +++ b/src/test/recovery/t/022_crash_temp_files.pl @@ -0,0 +1,194 @@ +# +# Test cleanup of temporary files after a crash. s/cleanup/remove/ -- Euler Taveira EDB https://www.enterprisedb.com/

Re: a verbose option for autovacuum

2021-03-08 Thread Euler Taveira
ew parameter controlling that. Perfect is the enemy of the good. Let start with this piece of information. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Identify missing publications from publisher while create/alter subscription.

2021-03-02 Thread Euler Taveira
The other alternative is to document that non-existent publication names can be in the subscription catalog and it is ignored while executing SUBSCRIPTION commands. You could possibly propose a NOTICE/WARNING that informs the user that the SUBSCRIPTION command contains non-existent publication. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: proposal: psql –help reflecting service or URI usage

2021-03-01 Thread Euler Taveira
ection options could be moved to the top (maybe after General options) if we consider that it is more important than the other sections (you cannot probably execute psql without using a connection parameter in production). -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-02-26 Thread Euler Taveira
On Mon, Feb 22, 2021, at 9:28 AM, Euler Taveira wrote: > On Mon, Feb 22, 2021, at 7:45 AM, Önder Kalacı wrote: >> Thanks for working on this. I did some review and testing, please see my >> comments below. > I appreciate your review. I'm working on a new patch set and expect

Re: [PATCH] pg_hba.conf error messages for logical replication connections

2021-02-22 Thread Euler Taveira
On Sat, Feb 20, 2021, at 7:33 AM, Amit Kapila wrote: > I have used a bit of different wording here to make things clear. > > Let me know what you think of the attached? WFM. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-02-22 Thread Euler Taveira
ed as it helps > power users to create more complex replications if they need. Yes, you can. I have to check if this user-defined operator could possibly break the replication. I will make sure to include a test covering this case too. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Catalog version access

2021-02-21 Thread Euler Taveira
-21 20:59:06-03 -- Euler Taveira EDB https://www.enterprisedb.com/

Re: [PATCH] pg_hba.conf error messages for logical replication connections

2021-02-17 Thread Euler Taveira
I would say "it does not match logical replication connections". It seems sufficient to inform the reader that he/she cannot use records with "replication" to match logical replication connections. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Clean up code

2021-02-09 Thread Euler Taveira
il.com -- Euler Taveira EDB https://www.enterprisedb.com/

Re: pg_replication_origin_drop API potential race condition

2021-02-08 Thread Euler Taveira
On Mon, Feb 8, 2021, at 3:23 AM, Amit Kapila wrote: > Fixed the problem as mentioned above in the attached. This new version looks good to me. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: pg_replication_origin_drop API potential race condition

2021-02-05 Thread Euler Taveira
o go back and forth. I saw a few occurrences of this pattern in the source code and IMO it could be used when it is not obvious what that value means. Booleans are easier to figure out, however, sometimes integer and text are not. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Can we have a new SQL callable function to get Postmaster PID?

2021-02-03 Thread Euler Taveira
d_file('postmaster.pid'), '\d+'))[1]; regexp_match -- 13496 (1 row) While investigating an issue, you are probably interested in a backend PID or one of the auxiliary processes. In both cases, it is easier to obtain the PIDs. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-02-02 Thread Euler Taveira
tuple is not * enough, because of qual expression dependencies. */ I will post a new patch set later. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: [PATCH] Doc: improve documentation of oid columns that can be zero. (correct version)

2021-02-02 Thread Euler Taveira
n I try to re-register it says it's taken. > > Not sure who I should ask for help. Anyone? You should probably email: webmaster (at) postgresql (dot) org -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Typo in tablesync comment

2021-02-02 Thread Euler Taveira
"The state tracking the progress of the relation synchronization is > additionally stored in shared memory, with SYNCWAIT and CATCHUP only > appearing in memory." WFM. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: [PATCH] Doc: improve documentation of oid columns that can be zero. (correct version)

2021-02-01 Thread Euler Taveira
On Sun, Jan 31, 2021, at 10:27 AM, Joel Jacobson wrote: > Here comes the patch again, now including data. Joel, register this patch into the next CF [1] so we don't lose track of it. [1] https://commitfest.postgresql.org/32/ -- Euler Taveira EDB https://www.enterprisedb.com/

Re: a verbose option for autovacuum

2021-02-01 Thread Euler Taveira
tion time runs less than l_a_m_d, the output should be discarded. I don't have a strong opinion about this parameter name but I think your suggestion (log_autovaccum_verbosity) is easier to guess what this parameter is for. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: row filtering for logical replication

2021-02-01 Thread Euler Taveira
nd, if the expression evaluates to NULL, it returns false and the row won't be replicated. After the commit 3696a600e2, the last patch does not apply cleanly. I'm attaching another version to address the documentation issues. -- Euler Taveira EnterpriseDB: https://www.enterprisedb.com/ From fb45140e

Re: row filtering for logical replication

2021-01-31 Thread Euler Taveira
g/message-id/CA%2BHiwqG3Jz-cRS%3D4gqXmZDjDAi%3D%3D19GvrFCCqAawwHcOCEn4fQ%40mail.gmail.com -- Euler Taveira EnterpriseDB: https://www.enterprisedb.com/ From 78aa13f958d883f52ef0a9796536adf06cd58273 Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Mon, 18 Jan 2021 11:13:23 -0300 Subject: [PATCH 1/7

Re: Logical archiving

2020-12-04 Thread Euler Taveira
replication origin on failover-candidate subscribers should encourage users to adopt such solutions. [1] https://www.postgresql.org/message-id/CAGRY4nx0-ZVnFJV5749QCqwmqBMkjQpcFkYY56a9U6Vf%2Bf7-7Q%40mail.gmail.com [2] https://wiki.postgresql.org/wiki/Logical_replication_and_physical_sta

Re: Logical archiving

2020-12-04 Thread Euler Taveira
issue, we should improve the logical decoding mechanism. There was a discussion about allowing logical decoding on the replica that would probably help your use case a lot. -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: cleanup temporary files after crash

2020-11-26 Thread Euler Taveira
cided to go with the GUC, default behavior should be remove the temporary files after the crash. Regards, -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Any objections to implementing LogicalDecodeMessageCB for pgoutput?

2020-11-24 Thread Euler Taveira
patch to filter messages by prefix. wal2json has a similar (filter-msg-prefixes / add-msg-prefixes) feature and it is useful for cases where you are handling multiple output plugins like wal2json and pgoutput. The idea is to avoid sending useless messages to some node that (i) don't know h

Re: recovery_target immediate timestamp

2020-11-12 Thread Euler Taveira
On Wed, 11 Nov 2020 at 22:40, Fujii Masao wrote: > > On 2020/11/12 6:00, Euler Taveira wrote: > > > The first patch adds a new message that prints the latest completed > checkpoint > > when the consistent state is reached. > > I'm not sure how useful this informa

recovery_target immediate timestamp

2020-11-11 Thread Euler Taveira
37:47 2020; tli 1; prev tli 1; fpw true; xid 0:519; oid 24576; multi 1; offset 0; oldest xid 501 in DB 1; oldest multi 1 in DB 1; oldest/newest commit timestamp xid: 0/0; oldest running xid 519; online Regards, -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24

Re: redundant error messages

2020-11-05 Thread Euler Taveira
{ pg_log_error("database \"%s\": %s", dbname, PQerrorMessage(conn)); exit_nicely(1); } and remove the redundant 'could not connect to database %s' from scripts/common.c. -- Euler Taveira http://www.2ndQuad

Re: Log message for GSS connection is missing once connection authorization is successful.

2020-11-04 Thread Euler Taveira
ures due to different LANG. [1] https://www.postgresql.org/docs/current/nls-programmer.html [2] https://www.postgresql.org/list/pgsql-translators/ [3] https://git.postgresql.org/gitweb/?p=pgtranslation/messages.git;a=summary -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: cleanup temporary files after crash

2020-10-31 Thread Euler Taveira
at all or provide it in the developer section. I've never heard someone saying that they use those temporary files to investigate an issue. Regarding a crash, all information is already available and temporary files don't provide extra details. This new GUC is just to keep the previous behavior.

Re: Log message for GSS connection is missing once connection authorization is successful.

2020-10-31 Thread Euler Taveira
On Sat, 31 Oct 2020 at 00:34, Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Fri, Oct 30, 2020 at 6:35 PM Euler Taveira > wrote: > > > > + appendStringInfo(, "replication "); > > + > > + appendStringInfo(, "con

Re: Log message for GSS connection is missing once connection authorization is successful.

2020-10-30 Thread Euler Taveira
', "logging_collector= 'on'"); +$node->append_conf('postgresql.conf', "log_connections= 'on'"); booleans don't need quotes. -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

cleanup temporary files after crash

2020-10-28 Thread Euler Taveira
Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services From bcd5dcc00cade3a80ee83f88b15f980ac7cdd0f5 Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Mon, 25 May 2020 00:08:20 -0300 Subject: [PATCH] Control temporary files rem

Re: deferred primary key and logical replication

2020-10-25 Thread Euler Taveira
On Mon, 5 Oct 2020 at 08:34, Amit Kapila wrote: > On Mon, May 11, 2020 at 2:41 AM Euler Taveira > wrote: > > > > Hi, > > > > While looking at an old wal2json issue, I stumbled on a scenario that a > table > > with a deferred primary key is not upd

Re: [PATCH] Add `truncate` option to subscription commands

2020-10-11 Thread Euler Taveira
th existing behavior, the default value for > this parameter is `false`. > > Truncate will fail for tables whose foreign keys refer to it. If such a feature cannot handle foreign keys, the usefulness will be restricted. Regards, -- Euler Taveira http://www.2ndQuadrant

Re: Feedback on table expansion hook (including patch)

2020-09-15 Thread Euler Taveira
not add new features to released versions or after the feature freeze. The only point that I noticed was that you chose "control over" but similar code uses "control in". -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: deferred primary key and logical replication

2020-07-27 Thread Euler Taveira
The new status of this patch is: Waiting on Author > Thanks for testing. I attached a rebased patch. -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services From c1ad1581962a56c83183bec1501df6f54406db89 Mon Sep 17 00:

Re: BUG #16481: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events

2020-06-08 Thread Euler Taveira
This bug was already reported some time ago (#15293) but it slipped through the cracks. I don't think you should simply call ProcessCompletedNotifies [1]. [1] https://www.postgresql.org/message-id/13844.1532468610%40sss.pgh.pa.us -- Euler Taveira http://www.2ndQuadrant.com/ P

Re: REINDEX CONCURRENTLY and indisreplident

2020-06-03 Thread Euler Taveira
a REPLICA IDENTITY USING INDEX without a dropped index is the same as > NOTHING. > > LGTM. I tested in both versions (12, master) and it works accordingly. -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: More tests with USING INDEX replident and dropped indexes

2020-06-03 Thread Euler Taveira
elreplident from the relation while dropping the index? relation_mark_replica_identity() already does that but do other things too. Let's move the first code block from relation_mark_replica_identity to another function and call this new function while dropping the index. -- Euler Taveira http://www

Re: [PATCH] Fix pg_dump --no-tablespaces for the custom format

2020-05-16 Thread Euler Taveira
On Sat, 16 May 2020 at 16:31, Tom Lane wrote: > > I think (b) would be a break in the archive format, with unclear > consequences, so I'm not in favor of that. > > I came to the same conclusion while inspecting the source code. -- Euler Taveira http://www.

Re: [PATCH] Fix pg_dump --no-tablespaces for the custom format

2020-05-16 Thread Euler Taveira
e options: (a) leave it as is and document that those 2 options has no effect in pg_dump and possibly add a warning to report if someone uses it with an archive format; (b) exclude owner and tablespace from archive (it breaks compatibility but do exactly what users expect). I do not even consider

Re: Problem with logical replication

2020-05-15 Thread Euler Taveira
tation had some diffs. Tom has just reindented the whole > tree, so let's keep things clean. > > LGTM. -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Re: Problem with logical replication

2020-05-12 Thread Euler Taveira
On Tue, 12 May 2020 at 06:36, Masahiko Sawada < masahiko.saw...@2ndquadrant.com> wrote: > On Mon, 11 May 2020 at 16:28, Michael Paquier wrote: > > > > On Sun, May 10, 2020 at 07:08:03PM -0300, Euler Taveira wrote: > > > I attached a patch with the described so

Re: Problem with logical replication

2020-05-10 Thread Euler Taveira
tached a patch with the described solution. I also included a test that covers this scenario. -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services From 37be6d62bf26a20ec3cba8825082ad92fdd1c6d7 Mon Sep 17 00:00:00 2001

deferred primary key and logical replication

2020-05-10 Thread Euler Taveira
envision a problem with a deferred primary key in an after commit scenario. Am I missing something? Just in case, I'm attaching a patch to fix it and also add a test to cover this scenario. -- Euler Taveira http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA

<    1   2   3   4   >