Re: speed up a logical replica setup

2024-03-20 Thread Euler Taveira
'm not sure we should add a sentence about a pilot error. I added a comment in check_subscriber that describes this situation. I think the comment is sufficient to understand the limitation and, if it is possible in the future, a check might be added for it. I didn't include v31-0004. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-03-20 Thread Euler Taveira
;)", > > dbinfo->subname, > > dbinfo->dbname); > > The attached patch has the changes to handle the same. I included a different query that does the same. See v32. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-03-21 Thread Euler Taveira
l_senders to at least 3. If you have such an error, you will fix them all and rerun using dry run mode again to verify everything is ok. I don't have a strong preference about it. It can be changed easily (unifying the check functions or providing a return for each of the check functions). -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-03-21 Thread Euler Taveira
have a strong preference; feel free to apply it. [1] https://www.postgresql.org/message-id/CALDaNm1Dg5tDRmaabk%2BZND4WF17NrNq52WZxCE%2B90-PGz5trQQ%40mail.gmail.com -- Euler Taveira EDB https://www.enterprisedb.com/ v33-0001-pg_createsubscriber-creates-a-new-logical-replic.patch.gz Desc

Re: speed up a logical replica setup

2024-03-25 Thread Euler Taveira
On Mon, Mar 25, 2024, at 8:55 AM, Peter Eisentraut wrote: > On 22.03.24 04:31, Euler Taveira wrote: > > On Thu, Mar 21, 2024, at 6:49 AM, Shlok Kyal wrote: > >> There is a compilation error while building postgres with the patch > >> due to a recent commit. I have attac

Re: speed up a logical replica setup

2024-03-25 Thread Euler Taveira
run before walsender is launched. > > One possible approach is to wait until the replication starts. Alternative > one is > to ease the condition. That's my suggestion too. I reused NUM_CONN_ATTEMPTS (that was renamed to NUM_ATTEMPTS in the first patch). See second patch. -- E

Re: speed up a logical replica setup

2024-03-25 Thread Euler Taveira
anted data. See setup_subscriber. /* * Since the publication was created before the consistent LSN, it is * available on the subscriber when the physical replica is promoted. * Remove publications from the subscriber because it has no use. */ drop_publication(conn, &dbinfo[i]); -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-03-26 Thread Euler Taveira
v_ySzuFjN7UaX9qxz5Hqcwew7Fk%3D%2BAbJbu0Kd9w%40mail.gmail.com -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Fix some resources leaks (src/bin/pg_basebackup/pg_createsubscriber.c)

2024-03-27 Thread Euler Taveira
xiting. > 3. > CID 1542691: (#1 of 1): Resource leak (RESOURCE_LEAK) > leaked_storage: Variable str going out of scope leaks the storage it points > to. It will exit in the next instruction. Having said that, applying this patch is just a matter of style. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-03-28 Thread Euler Taveira
uals to zero no +timeout is applied. + [1] https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-RECOVERY-CONTROL -- Euler Taveira EDB https://www.enterprisedb.com/

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-03-29 Thread Euler Taveira
ber of digits after the decimal separator you still don't have an integer in the internal unit, hence, you have to round it to integer. We already have functions that use integer (such as pg_terminate_backend) and interval (such as pg_sleep_for) and if i searched correctly it will be the first t

Re: speed up a logical replica setup

2024-02-13 Thread Euler Taveira
does nothing [2][3]. > > > > Oh, thanks. > Just to confirm - pglogical set shared_preload_libraries to '', should we > follow or not? The in-core logical replication does not require any library to be loaded. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-02-13 Thread Euler Taveira
On Fri, Feb 9, 2024, at 3:27 AM, vignesh C wrote: > On Wed, 7 Feb 2024 at 10:24, Euler Taveira wrote: > > > > On Fri, Feb 2, 2024, at 6:41 AM, Hayato Kuroda (Fujitsu) wrote: > > > > Thanks for updating the patch! > > Thanks for the updated patch, few comme

Re: About a recently-added message

2024-02-14 Thread Euler Taveira
comparison expression. For pg_createsubscriber, we are using publisher requires wal_level >= logical I suggest to use something like slot synchronization requires wal_level >= logical -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-02-15 Thread Euler Taveira
the same thing. I included a refactor around pg_is_in_recovery() function to be used in other 2 points. Besides that, I changed some SQL commands to avoid having superfluous whitespace in it. I also added a test for cascaded replication scenario. And clean up 041 test a bit. I didn't provide an

Re: speed up a logical replica setup

2024-02-19 Thread Euler Taveira
+ 'postgresql.conf', qq[ > +log_min_messages = debug2 > > Is this setting necessary for the test? No. It is here as a debugging aid. Better to include it in a separate patch. There are a few messages that I don't intend to include in the final patch. All of these modifications will be included in the next patch. I'm finishing to integrate patches proposed by Hayato [1] and some additional fixes and refactors. [1] https://www.postgresql.org/message-id/TYCPR01MB12077A8421685E5515DE408EEF5512%40TYCPR01MB12077.jpnprd01.prod.outlook.com -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-02-19 Thread Euler Taveira
ROR: publication > "pg_createsubscriber_5" does not exist > pg_createsubscriber: error: could not drop replication slot > "pg_createsubscriber_5_242843" on database "postgres": ERROR: > replication slot "pg_createsubscriber_5_242843" does not exist That

Re: speed up a logical replica setup

2024-02-22 Thread Euler Taveira
> Thought? It was not a good idea if you want to keep the postgresql.conf outside PGDATA. I mean you need extra steps that can be error prone (different settings between files). Shlok, I didn't read your previous email carefully. :-/ -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-02-22 Thread Euler Taveira
pg_log_error("publisher requires %d replication slots, but > only %d remain", > +num_dbs, max_repslots - cur_repslots); > + pg_log_error_hint("Consider increasing max_replication_slots > to at least %d.", > +

Re: speed up a logical replica setup

2024-03-01 Thread Euler Taveira
option, I'm thinking about to remove it. If the logging is enabled, the information during the pg_createsubscriber will be available. The client log can be redirected to a file for future inspection. Comments? [1] https://www.postgresql.org/message-id/TYCPR01MB12077756323B79042F29DDAEDF5

Re: Avoiding inadvertent debugging mode for pgbench

2024-03-01 Thread Euler Taveira
nt overall. As Greg said none of these programs connects to the database. I don't like to break backward compatibility but in this case I suspect that it is ok. I don't recall the last time I saw a script that makes use of -d option. How often do you need a pgbench debug information? -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-03-05 Thread Euler Taveira
name=postgres" -d postgres -d db1 -p 9000 -r > ./pg_createsubscriber: invalid option -- 'p' > pg_createsubscriber: hint: Try "pg_createsubscriber --help" for more > information. Oops. Good catch! I will post an updated patch soon. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-03-06 Thread Euler Taveira
d transactions. The other option is to add a sentence into the documentation. > 21. others > > As I said in [7], the catch up would not be finished if long > recovery_min_apply_delay > is used. Should we overwrite during the catch up? No. If the time-delayed logical replica [2] wa

Re: speed up a logical replica setup

2024-03-06 Thread Euler Taveira
default. > 6) The message should be "waiting for the target server to reach the > consistent state": > +#define NUM_CONN_ATTEMPTS 5 > + > + pg_log_info("waiting the target server to reach the consistent > state"); > + > + conn = connect_database(conninfo, true); Fixed. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Identify transactions causing highest wal generation

2024-03-08 Thread Euler Taveira
e| 4642.59929618 min_exec_time | 0.011094 max_exec_time | 0.872748 mean_exec_time | 0.01948543312347807 stddev_exec_time | 0.006370786385582063 rows | 238260 . . . wal_records| 496659 wal_fpi| 19417 wal_bytes | 2085

Re: speed up a logical replica setup

2024-03-12 Thread Euler Taveira
...@mail.gmail.com [2] https://www.postgresql.org/message-id/6423dfeb-a729-45d3-b71e-7bf1b3adb0c9%40enterprisedb.com [3] https://www.postgresql.org/message-id/e390e35e-508e-4eb8-92e4-e6b066407a41%40app.fastmail.com -- Euler Taveira EDB https://www.enterprisedb.com/ v28-0001-pg_createsubscriber-

Re: drop table in transaction

2023-05-09 Thread Euler Taveira
On Tue, May 9, 2023, at 7:42 AM, Fabrice Chapuis wrote: > Where in the code is written the mechanism used for isolation when drop table > is executed in a transaction RemoveRelations() in src/backend/commands/tablecmds.c If you are looking for a previous layer, check ExecDropStmt(). --

Re: Logical replication timeout problem

2022-03-31 Thread Euler Taveira
and wouldn't impose a burden on maintainability. [1] https://www.postgresql.org/message-id/20200309183018.tzkzwu635sd366ej%40alap3.anarazel.de -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Logical replication timeout problem

2022-03-31 Thread Euler Taveira
put plugin is responsible to set ctx->progress with the callback variables (for example, PGOUTPUT_PROGRESS_CHANGE for change_cb()) that we would like to run NewUpdateProgress. -- Euler Taveira EDB https://www.enterprisedb.com/

merge documentation fix

2022-04-01 Thread Euler Taveira
_delta WHEN MATCHED THEN DELETE; -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Support logical replication of DDLs

2022-04-11 Thread Euler Taveira
nitial DDL commands. I mean the main point of this feature is to have an API to create an object that the logical replication can use it for initial schema synchronization. This "DDL to create an object" was already discussed in the past [2]. [1] https://github.com/2ndQuadrant/pglogica

Re: PG DOCS - logical replication filtering

2022-04-11 Thread Euler Taveira
;). The publication and subscription definitions are fine there. I think reusing the same tables and publication introduces complexity. Shouldn't we just use different tables and publication to provide an "easy" example? It would avoid DROP PUBLICATION, ALTER SUBSCRIPTION and TRUNCATE. > Do the inserts same as before. We should indicate the node (publisher) to be clear. [1] https://www.postgresql.org/docs/devel/sql-createpublication.html -- Euler Taveira EDB https://www.enterprisedb.com/

Re: PG DOCS - logical replication filtering

2022-04-12 Thread Euler Taveira
#x27;s why I complained about it. I noticed that the website CSS includes it. However, the PDF will not include the border. I would add a separate description for the subscriber just to be clear. One last suggestion, you are using identifiers in uppercase letters but "primary key" is in lowercase. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: PG DOCS - logical replication filtering

2022-04-13 Thread Euler Taveira
On Wed, Apr 13, 2022, at 12:24 AM, Peter Smith wrote: > PSA patch v10 which addresses the remaining review comments from Euler [1] Looks good to me. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Logical replication timeout problem

2022-04-14 Thread Euler Taveira
oid a timeout in the subscriber. Does this same issue occur for long transactions? I mean keep a long transaction open and execute thousands of transactions. BEGIN; INSERT INTO foo (a) VALUES(1); -- wait a few hours while executing 10^x transactions INSERT INTO foo (a) VALUES(2); COMMIT; -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Support logical replication of DDLs

2022-04-14 Thread Euler Taveira
s that should be treated accordingly such as a TABLESPACE specification or a custom data type. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Skipping schema changes in publication

2022-04-14 Thread Euler Taveira
or this proposal. The first command above suggests that it skips all tables in a certain schema. What happen if I decide to include a particular table of the skipped schema (second command)? ALTER PUBLICATION pub1 ADD SKIP ALL TABLES IN SCHEMA s1,s2; ALTER PUBLICATION pub1 ADD TABLE s1.foo; Having sa

Re: Inconsistent "ICU Locale" output on older server versions

2022-04-15 Thread Euler Taveira
gettext_noop("Locale Provider")); > > I'd think this should rather be > > + " '' as \"%s\",\n" Since dataiculocale allows NULL, my suggestion is to use NULL instead of an empty string. It is consistent with a cluster whose locale provider is libc. -- Euler Taveira EDB https://www.enterprisedb.com/

trivial comment fix

2022-04-27 Thread Euler Taveira
Hi, While reading worker.c, I noticed that the referred SQL command was wrong. ALTER SUBSCRIPTION ... REFRESH PUBLICATION instead of ALTER TABLE ... REFRESH PUBLICATION. Trivial fix attached. -- Euler Taveira EDB https://www.enterprisedb.com/ diff --git a/src/backend/replication/logical

Re: speed up a logical replica setup

2023-10-22 Thread Euler Taveira
On Mon, Feb 21, 2022, at 9:09 AM, Euler Taveira wrote: > A new tool called pg_subscriber does this conversion and is tightly integrated > with Postgres. After a long period of inactivity, I'm back to this client tool. As suggested by Andres, I added a new helper function to change

Re: Allowing TRUNCATE of FK target when session_replication_role=replica

2023-10-31 Thread Euler Taveira
ago [2]. 3) resynchronize a table. Same advantages as item 2. > Unless there are any serious objections, I will send a patch to also > allow TRUNCATE in this case. > You should start checking the previous proposal [1]. [1] https://www.postgresql.org/message-id/ff835f71-3c6c-335e-4c

Re: Allowing TRUNCATE of FK target when session_replication_role=replica

2023-10-31 Thread Euler Taveira
e, at least when > running pglogical. It is not a requirement for the subscriber. However, it increases the complexity for a real scenario (in which you set up backup and sometimes additional physical replicas) because key GUCs require a restart. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2023-11-01 Thread Euler Taveira
On Tue, Oct 31, 2023, at 11:46 PM, shihao zhong wrote: > I think this is duplicate with https://commitfest.postgresql.org/45/4637/ > > The new status of this patch is: Waiting on Author > I withdrew the other entry. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2023-11-08 Thread Euler Taveira
cationSlot() and RunIdentifySystem() that is used by all of these replication tools. We can move the extern variables into parameters to have a pluggable streamutil.h. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Lifetime of commit timestamps

2023-11-17 Thread Euler Taveira
ine for convenience), hence, someone can ask why the pg_xact_commit_timestamp() returns NULL for a transaction that was executed *after* you enable track_commit_timestamp. The answer is the design used a existing mechanism to clean up data in order to avoid creating a new one. -- Euler Taveira

Re: speed up a logical replica setup

2023-12-05 Thread Euler Taveira
//postgr.es/m/CAExHW5sCAU3NvPKd7msScQKvrBN-x_AdDQD-ZYAwOxuWG%3Doz1w%40mail.gmail.com [2] https://postgr.es/m/caexhw5vhfemfvtuhe+7xwphvzjxrexz5h3dd4uqi7cwmdmj...@mail.gmail.com -- Euler Taveira EDB https://www.enterprisedb.com/ From 003255b64910ce73f15931a43def25c37be96b81 Mon Sep 17 00:00:00 2001

Re: Is WAL_DEBUG related code still relevant today?

2023-12-06 Thread Euler Taveira
fits in the same category as WAL_DEBUG. If it does, maybe it is worth to apply the same logic there. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Is WAL_DEBUG related code still relevant today?

2023-12-06 Thread Euler Taveira
field. * It should go away eventually, though, because it's an ugly and * hard-to-explain kluge. */ int trace_recovery(int trace_level) { if (trace_level < LOG && trace_level >= trace_recovery_messages) return LOG; return trace_level; } -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Emitting JSON to file using COPY TO

2023-12-06 Thread Euler Taveira
the received ones) is not a valid JSON. Hence, a JSON parser cannot be executed until you receive the whole data set. (wal2json format 1 has this disadvantage. Format 2 was born to provide a better alternative -- each row is a valid JSON.) I'm not saying that "json array" is not useful but

Re: I’ve come across what I think is a bug

2023-12-07 Thread Euler Taveira
lient that is *not* providing truncate as an operation. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Add --check option to pgindent

2023-12-12 Thread Euler Taveira
would be made --silent-diff exit with status 2 if any changes would be made + --check combination of --show-diff and --silent-diff I mean --diff=show,silent,check When you add exceptions, it starts to complicate the UI. usage("Cannot have both --silent-diff and --sho

Re: Move walreceiver state assignment (to WALRCV_STREAMING) in WalReceiverMain()

2023-12-12 Thread Euler Taveira
x27;t it give up before starting if you apply your patch? My main concern is due to a slow system, the walrcv_connect() took to long in WalReceiverMain() and the code above kills the walreceiver while in the process to start it. Since you cannot control the hardcoded WALRCV_STARTUP_TI

Re: logical decoding and replication of sequences, take 2

2023-12-14 Thread Euler Taveira
On Thu, Dec 14, 2023, at 12:44 PM, Ashutosh Bapat wrote: > I haven't found the code path from where the sequence cleanup gets > called. But it's being called. Am I missing something? ReorderBufferCleanupTXN. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Improve eviction algorithm in ReorderBuffer

2023-12-15 Thread Euler Taveira
didn't read your patch but do you really need to free entries one by one? If not, binaryheap_free(). -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Add a perl function in Cluster.pm to generate WAL

2023-12-18 Thread Euler Taveira
len (rec/tot): 24/24, tx: 0, lsn: 0/41017C70, prev 0/41017A98, desc: SWITCH The difference is euler=# select '0/40A8'::pg_lsn - '0/4028'::pg_lsn; ?column? -- 128 (1 row) euler=# select '0/41017A98'::pg_lsn - '0/4128

Re: [DOC] Introducing Quick Start Guide to PL/pgSQL and PL/Python Documentation

2023-12-18 Thread Euler Taveira
ext CF [1] so we don't miss it. [1] https://commitfest.postgresql.org/46/ -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Add --check option to pgindent

2023-12-18 Thread Euler Taveira
The referenced Wiki page > will need an edit or two after this goes in, but that's easy enough. ... and pgbuildfarm client [1] needs to be changed too. [1] https://github.com/PGBuildFarm/client-code/blob/main/PGBuild/Modules/CheckIndent.pm#L55-L90 -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Add a perl function in Cluster.pm to generate WAL

2023-12-19 Thread Euler Taveira
t; > at the end [1]. > > Indeed, that should be enough to answer my comment. > > > Attached v4 patch. > > LGTM, thanks. Euler, what do you think? > LGTM. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2023-12-20 Thread Euler Taveira
ntentional? No. I will update the patch accordingly. I suspect that a fair amount of patches broke due to MSVC change. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-01-03 Thread Euler Taveira
with various sizes of databases (cluster) > to see how it impacts the time for small to large-size databases as > compared to the traditional method? This might help us with giving > users advice on when to use this tool. We can do this bit later as > well when the patch is closer to being ready for commit. I'll share it. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-01-03 Thread Euler Taveira
servative choice. If point 2 isn't an issue, imo point 1 is no big deal. [1] https://www.postgresql.org/message-id/e02a2c17-22e5-4ba6-b788-de696ab74f1e%40app.fastmail.com -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-01-04 Thread Euler Taveira
plica. > > > > I think asking users to manually remove such slots won't be a good > idea. We might want to either remove them by default or provide an > option to the user. Am I correct that the majority of the use cases these replication slots will be useless? If so, let's remove them by default and add an option to control this behavior (replication slot removal). -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2024-01-04 Thread Euler Taveira
e choice. If point 2 isn't an > > issue, imo point 1 is no big deal. > > > > By point 2, do you mean to have a check for "max replication slots"? > It so, the one possibility is to even increase that config, if the > required max_replication_slots is low.

Re: Support prepared statement invalidation when result types change

2023-09-13 Thread Euler Taveira
* or NULL */ + int orig_num_params; /* length of orig_param_types array */ You should expand the commit message a bit. Explain this feature. Inform the behavior change. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Is it possible to change wal_level online

2023-09-14 Thread Euler Taveira
nge the wal_level default value. There might be other threads but I didn't try hard to find them. [1] https://www.postgresql.org/message-id/20200608213215.mgk3cctlzvfuaqm6%40alap3.anarazel.de -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Restore replication settings when modifying a field type

2020-03-10 Thread Euler Taveira
ec02bd64abac742dd35ed9b9b01). 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.2ndQ

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

2020-03-12 Thread Euler Taveira
d) is annoying because it means 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: WAL usage calculation patch

2020-04-06 Thread Euler Taveira
fpw? 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: 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: [BUG]Update Toast data failure in logical replication

2022-01-24 Thread Euler Taveira
on relation, HeapTuple tp, bool key_changed, bool key_has_external, bool *copy); -- Euler Taveira EDB https://www.enterprisedb.com/

Re: [BUG]Update Toast data failure in logical replication

2022-02-08 Thread Euler Taveira
licates a non-critical path. In general, the condition will be executed once or twice. -- Euler Taveira EDB https://www.enterprisedb.com/

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

2022-02-09 Thread Euler Taveira
.. SET (slot_name = NONE) to > disassociate the subscription from the slot. Again, dropping a subscription that is associated with a replication slot requires a connection to remove the replication slot. If the publisher is gone (and so the replication slot), follow the HINT advice. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: [PATCH] Add support to table_to_xmlschema regex when timestamp has time zone

2022-02-18 Thread Euler Taveira
ted/xmlmap_1.out that the output from this test when you build without libxml support. Run 'make check' to test your fix after building with/without libxml support. Regarding this fix, it looks good to me. FWIW, character class escape is defined here [1]. [1] https://www.w3.org/TR/xmlschem

Re: PG Docs - CREATE SUBSCRIPTION option list order

2021-04-18 Thread Euler Taveira
ny good 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 t

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: row filtering for logical replication

2021-05-10 Thread Euler Taveira
in his 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-10 Thread Euler Taveira
ction "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: Time delayed LR (WAS Re: logical replication restrictions)

2023-01-23 Thread Euler Taveira
errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), + errmsg("cannot enable %s mode for subscription with %s", + "streaming = parallel", "min_apply_delay")); + Is this code corr

missing GRANT on pg_subscription columns

2021-06-03 Thread Euler Taveira
n because 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://w

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

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: row filtering for logical replication

2021-06-30 Thread Euler Taveira
future 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

Re: SSL/TLS instead of SSL in docs

2021-07-01 Thread Euler Taveira
using SSL/TLS, however, 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://ww

Re: row filtering for logical replication

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

Re: row filtering for logical replication

2021-07-11 Thread Euler Taveira
ta was captured using the same technique as 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

Re: row filtering for logical replication

2021-07-11 Thread Euler Taveira
need to mention every 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

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.41 us

Re: row filtering for logical replication

2021-07-12 Thread Euler Taveira
gt; 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: Configuration Parameter/GUC value validation hook

2022-05-06 Thread Euler Taveira
56). The other alternative is to ALTER USER SET and ALTER DATABASE SET. The current user can set parameter for himself and he could adjust the limits. Besides that the purpose of these SQL commands are to apply initial settings for a combination of user/database. I'm afraid it is out o

Re: Logical replication timeout problem

2022-05-09 Thread Euler Taveira
ctx->end_xact; Do you really need a new variable here? It has the same name and the new one isn't changed during the execution. Does this issue deserve a test? A small wal_receiver_timeout. Although, I'm not sure how stable the test will be. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: 2022-05-12 release announcement draft

2022-05-09 Thread Euler Taveira
ouncement (see postgres_fdw). [1] https://www.postgresql.org/about/news/postgresql-142-136-1210-1115-and-1020-released-2402/ -- Euler Taveira EDB https://www.enterprisedb.com/

Re: 2022-05-12 release announcement draft

2022-05-09 Thread Euler Taveira
optionally installed. pageinspect (possibly with the URL) is clear enough. However, if you don't like the shorthand, 'pageinspect extension' or 'pageinspect module' are good options. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Privileges on PUBLICATION

2022-05-09 Thread Euler Taveira
t a command that will have the same effect as REPLICATION property [1] has right now, I would say it won't. Are you aiming a fine-grained access control on publisher? [1] https://www.postgresql.org/docs/devel/logical-replication-security.html -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Privileges on PUBLICATION

2022-05-12 Thread Euler Taveira
for publications. If you have multiple publications in a database, a subscription can use all publications available. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: First draft of the PG 15 release notes

2022-05-12 Thread Euler Taveira
ong opinion if it should be mentioned or not. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: First draft of the PG 15 release notes

2022-05-12 Thread Euler Taveira
On Thu, May 12, 2022, at 11:22 AM, Bruce Momjian wrote: > On Thu, May 12, 2022 at 11:12:54AM -0300, Euler Taveira wrote: > OB> On Thu, May 12, 2022, at 11:03 AM, Bruce Momjian wrote: > > > > I looked at that but thought that everyone would already assume we > >

Re: Privileges on PUBLICATION

2022-05-13 Thread Euler Taveira
future version of PostgreSQL. I also wouldn't use the warning tag because it fits in the same category as the other restrictions listed in the page. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Privileges on PUBLICATION

2022-05-18 Thread Euler Taveira
On Wed, May 18, 2022, at 6:16 AM, Antonin Houska wrote: > The patch is attached to this message. Great. Add it to the next CF. I'll review it when I have some spare time. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: Privileges on PUBLICATION

2022-05-18 Thread Euler Taveira
l Replication > Security". [1] https://postgr.es/m/d96103fe-99e2-4119-bd76-952d326b7...@www.fastmail.com -- Euler Taveira EDB https://www.enterprisedb.com/

Ignore heap rewrites for materialized views in logical replication

2022-05-27 Thread Euler Taveira
dditional test is crucial here. -- Euler Taveira EDB https://www.enterprisedb.com/ From 652efe45665d91f2f4ae865dba078fcaffdc0a17 Mon Sep 17 00:00:00 2001 From: Euler Taveira Date: Fri, 27 May 2022 11:35:27 -0300 Subject: [PATCH v1 1/2] Ignore heap rewrites for materialized views in logical r

<    1   2   3   4   5   >