pqxx accumulating a transaction

2021-12-09 Thread Jeff Abrahamson
I am accumulating a transaction using libpqxx and suspect I'm doing something overly tortuous to get where I'm going. I don't mean to make this question longer than it needs to be, but I think context will help.  So I'll start by explaining briefly how I got to where I am.  And then I'll show

Re: Need to know more about pg_test_fsync utility

2021-12-09 Thread Thomas Munro
On Fri, Dec 10, 2021 at 3:20 PM PGSQL DBA wrote: > 1) How to interpret the output of pg_test_fsync? The main interesting area is probably the top section that compares the different wal_sync_method settings. For example, it's useful to verify the claim that fdatasync() is faster than fsync()

Need to know more about pg_test_fsync utility

2021-12-09 Thread PGSQL DBA
Hi Team, I would like to understand the internals of pg_test_fsync utility as I know pg_test_fsync is intended to give us a reasonable idea of what is the fastest wal_sync_method for our system but as per the documentation it will also provide the diagnostic information in the event of an I/O

Re: Detecting repeated phrase in a string

2021-12-09 Thread Peter J. Holzer
On 2021-12-09 16:11:31 +0100, Andreas Joseph Krogh wrote: > For repeated words (including unicode-chars) you can do: >   > (\b\p{L}+\b)(?:\s+\1)+ >   > I'm not quite sure how to translate this to PG, but in JAVA it works. See

Re: CTE Materialization

2021-12-09 Thread Paul van der Linden
This one quite nicely explains it: https://stackoverflow.com/questions/14897816/how-can-i-prevent-postgres-from-inlining-a-subquery On Wed, Dec 8, 2021 at 3:14 AM David G. Johnston wrote: > On Tue, Dec 7, 2021 at 6:40 PM Дмитрий Иванов > wrote: > >> I beg your pardon. >> The problem is more or

Re: Detecting repeated phrase in a string

2021-12-09 Thread Andreas Joseph Krogh
På torsdag 09. desember 2021 kl. 15:46:05, skrev Shaozhong SHI < shishaozh...@gmail.com >: Hi, Peter, How to define word boundary as either by using ^ , space, or $ So that the following can be done fox fox is a repeat foxfox is not a repeat but just one

Re: Detecting repeated phrase in a string

2021-12-09 Thread Shaozhong SHI
Hi, Peter, How to define word boundary as either by using ^ , space, or $ So that the following can be done fox fox is a repeat foxfox is not a repeat but just one word. Regards, David On Thu, 9 Dec 2021 at 13:35, Peter J. Holzer wrote: > On 2021-12-09 12:38:15 +, Shaozhong SHI

RE: Identity/Serial Column In Subscriber's Tables

2021-12-09 Thread Avi Weinberg
Hi Laurenz Thanks for your answer. If I do not modify data on the subscriber side, the best practice will be to not to define the column as identity or it is better to have subscriber's table definition as close as possible to the publisher and leave it as identity? Thanks -Original

Re: Detecting repeated phrase in a string

2021-12-09 Thread Peter J. Holzer
On 2021-12-09 12:38:15 +, Shaozhong SHI wrote: > Does anyone know how to detect repeated phrase in a string? Use regular expressions with backreferences: bayes=> select regexp_match('foo wikiwiki bar', '(.+)\1'); ╔══╗ ║ regexp_match ║ ╟──╢ ║ {o} ║

Detecting repeated phrase in a string

2021-12-09 Thread Shaozhong SHI
Does anyone know how to detect repeated phrase in a string? Is there any such function? Regards, David

help

2021-12-09 Thread Willy Skjæveland

Re: Identity/Serial Column In Subscriber's Tables

2021-12-09 Thread Laurenz Albe
On Thu, 2021-12-09 at 09:13 +, Avi Weinberg wrote: > What is the best practice when dealing with Identity/Serial column in logical > replication. > Should the subscriber table have this column also defined as Identity/Serial > or have it defined as regular integer? > Is leaving it as

Re: performance expectations for table(s) with 2B recs

2021-12-09 Thread Marc Millas
Partitioning ? if you have some ideas about how this data is accessed, splitting those big tables into partitions may help: -vaccum done at the partition level, -index partitioned too, so much easier to manage (reindex local to a given partition, so quite easy to reindex the whole thing one

Use tsquery to check out occurrence of the same phrase in a cell

2021-12-09 Thread Shaozhong SHI
Are there good examples for using tsquery to check out occurrence of the same phrase in a cell? Regards, David

Identity/Serial Column In Subscriber's Tables

2021-12-09 Thread Avi Weinberg
Hi Experts, What is the best practice when dealing with Identity/Serial column in logical replication. Should the subscriber table have this column also defined as Identity/Serial or have it defined as regular integer? Is leaving it as Identity/Serial also on subscriber tables, can potentially