Re: invisible commit question for sync replication

2023-01-31 Thread David G. Johnston
On Wednesday, February 1, 2023, Julien Rouhaud wrote: > Hi, > > On Wed, Feb 01, 2023 at 02:52:49PM +0800, qihua wu wrote: > > When run a cluster with sync replication, if DML is done on primary, but > > primary is isolated from all slave, then the DML will hang, if cancel it > > DML, it will

Re: invisible commit question for sync replication

2023-01-31 Thread Julien Rouhaud
Hi, On Wed, Feb 01, 2023 at 02:52:49PM +0800, qihua wu wrote: > When run a cluster with sync replication, if DML is done on primary, but > primary is isolated from all slave, then the DML will hang, if cancel it > DML, it will say: > WARNING: canceling wait for synchronous replication due to

invisible commit question for sync replication

2023-01-31 Thread qihua wu
When run a cluster with sync replication, if DML is done on primary, but primary is isolated from all slave, then the DML will hang, if cancel it DML, it will say: WARNING: canceling wait for synchronous replication due to user request DETAIL: The transaction has already committed locally, but

Re: Best Open Source OS for Postgresql

2023-01-31 Thread Brad White
On 1/31/2023 6:23 AM, hubert depesz lubaczewski wrote: Not sure why: 2. you ask me that off list In a lot of email clients, it is very easy to accidentally reply to the author instead of the list without realizing it. Hope that helps, Brad. -- Quote Signature I talk with clients, find out

Re: How to create a new operator inpg for spec data type?

2023-01-31 Thread Erik Wienhold
> On 01/02/2023 06:40 CET jack...@gmail.com wrote: > > I need to create a new operator like '<->' and its syntax is that text1 <-> > text2, > for the usage like this: 'a' <-> 'b' = 'a1b1', so how could I realize this > one? > Can you give me some exmaples.

Re: Best Open Source OS for Postgresql

2023-01-31 Thread Tony Shelver
Copied to the list On Wed, 1 Feb 2023 at 08:18, Tony Shelver wrote: > > > On Wed, 1 Feb 2023 at 08:04, Tony Shelver wrote: > >> >> On Tue, 31 Jan 2023 at 15:10, Marc Millas wrote: >> >>> Sorry for inappropriate "reply". >>> >>> if you do check the debian postgis repo, you ll find that its NOT

How to create a new operator inpg for spec data type?

2023-01-31 Thread jack...@gmail.com
I need to create a new operator like '<->' and its syntax is that text1 <-> text2, for the usage like this: 'a' <-> 'b' = 'a1b1', so how could I realize this one? Can you give me some exmaples. -- jack...@gmail.com

Logical Replication - "invalid ordering of speculative insertion changes"

2023-01-31 Thread Joe Wildish
Hello, We have a logical replication publisher (13.7) and subscriber (14.6) where we are seeing the following error on the subscriber. IP address and publication name changed, otherwise verbatim: 2023-01-31 15:24:49 UTC:x.x.x.x(56276):super@pubdb:[1040971]: WARNING: tables were not

Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches

2023-01-31 Thread Tom Lane
Dimitrios Apostolou writes: > On Tue, 31 Jan 2023, Tom Lane wrote: >> Do you get the same 10 rows when you repeat the command? > Yes. Just tested with both cold and hot caches. The first 10 rows are > exactly the same, either they return slowly or immediately. Hm. I don't recall exactly how

Re: Best Open Source OS for Postgresql

2023-01-31 Thread Adrian Klaver
On 1/31/23 05:09, Marc Millas wrote: Sorry for inappropriate "reply". if you do check the debian postgis repo, you ll find that its NOT possible to choose a postgis version. Are you talking about the repo hosted by Debian or the Postgres community repo's here:

Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches

2023-01-31 Thread Dimitrios Apostolou
Thanks for the insight on the internals. Regarding your questions: On Tue, 31 Jan 2023, Tom Lane wrote: Do you get the same 10 rows when you repeat the command? Yes. Just tested with both cold and hot caches. The first 10 rows are exactly the same, either they return slowly or immediately.

Re: Download file from COPY ... TO with pgadmin

2023-01-31 Thread Adrian Klaver
On 1/31/23 05:02, Marco Lechner wrote: Hi, Using COPY …TO it is possible to store e.g. the “value” of a bytea cell in a directory on the server. E.g. by this: COPY (SELECT content FROM d_doc WHERE id = 'x123456') TO CONCAT('/tmp/mydoc.pdf’) (FORMAT binary); As we do not have access to the

RE: [EXT] DBeaver session populating pg_stat_activity.backend_xmin

2023-01-31 Thread Dirschel, Steve
Hi Christophe, Thanks for the reply. I am fairly new to Postgres and based on your reply below I am not understanding something. Please see my test case below. I can show where a session is "idle in transaction" but backend_xmin is NOT populated and I show vacuuming a table with 10 dead

A Small psql Suggestion

2023-01-31 Thread Raymond Brinzer
Greetings, There is (for me) a small speed bump in psql. I think it's worth mentioning, minor though it is, because psql is such a polished tool generally, and because it's something which affects me many, many times a day. As it is, \d is a shortcut for \dtmvs. What I actually want to see, on

Re: Re: How could I elog the tupleTableSlot to the fronted terminal?

2023-01-31 Thread jack...@gmail.com
>On 2023-Jan-30, jack...@gmail.com wrote: > >> For example, I use "insert into t values(1)"; and I 'll get a tupleTableSlot, >> >> And Now I want to get the real data , that's 1, and then use elog() func >> to print it. Could you give me some codes to realize that? futhermore,

Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches

2023-01-31 Thread David G. Johnston
On Tue, Jan 31, 2023 at 8:28 AM Tom Lane wrote: > Dimitrios Apostolou writes: > > The question is why this simple query is taking so long to complete. > > Do you get the same 10 rows when you repeat the command? > > On the basis of the limited info you provided, I'm going to guess that > > (1)

Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches

2023-01-31 Thread Christophe Pettus
> On Jan 31, 2023, at 07:40, Dimitrios Apostolou wrote: > Is this bloat even affecting queries that do not use the index? No, but a bloated index often (although not always) goes along with a bloated table. > It seems I have to add VACUUM FULL to nightly maintainance. I wouldn't go that

Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches

2023-01-31 Thread Dimitrios Apostolou
On Tue, 31 Jan 2023, David G. Johnston wrote: On Tue, Jan 31, 2023 at 8:07 AM Dimitrios Apostolou wrote:       ->  Seq Scan on public.test_runs_raw  (cost=0.00..9250235.80 rows=317603680 width=42) (actual time=745910.672..745910.677 rows=10 loops=1)           Output: run_n,

Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches

2023-01-31 Thread Tom Lane
Dimitrios Apostolou writes: > The question is why this simple query is taking so long to complete. Do you get the same 10 rows when you repeat the command? On the basis of the limited info you provided, I'm going to guess that (1) there are huge subranges of the table containing no live rows,

Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches

2023-01-31 Thread David G. Johnston
On Tue, Jan 31, 2023 at 8:07 AM Dimitrios Apostolou wrote: > -> Seq Scan on public.test_runs_raw (cost=0.00..9250235.80 > rows=317603680 width=42) (actual time=745910.672..745910.677 rows=10 > loops=1) > Output: run_n, test_name_n, workitem_n, started_on, duration_ms, >

Re: SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches

2023-01-31 Thread Dimitrios Apostolou
I managed to double-paste different subset of my settings. FWIW all of them are true for all the experiments. Sorry for the confusion. On Tue, 31 Jan 2023, Dimitrios Apostolou wrote: Other postgres settings: shared_buffers = 1024MB effective_io_concurrency = 0 wal_compression = zstd

SELECT * FROM huge_table LIMIT 10; Why does it take more than 10 min to complete, with cold caches

2023-01-31 Thread Dimitrios Apostolou
Hello list, I run a very simple SELECT on a huge table (350M rows, 10 columns of type integer or timestamp). The server is an old Mac Mini with 4GB RAM and a slow HDD. All caches are cold either via reboot, or by restarting postgres and using the `purge` command to flush the OS cache. The

Re: toast useless

2023-01-31 Thread Laurenz Albe
On Tue, 2023-01-31 at 09:34 -0300, Marcos Pegoraro wrote: > Simon Riggs escreveu: > > On Tue, 13 Sept 2022 at 13:29, Marcos Pegoraro wrote: > > > > > > > > What problem do they cause you? > > > > > > > > > They don't cause any problem, I was just trying to get my database as > > > clean as

AW: Download file from COPY ... TO with pgadmin

2023-01-31 Thread Marco Lechner
Works as expected on both ways. Thnx. -Ursprüngliche Nachricht- Von: Erik Wienhold Gesendet: Dienstag, 31. Januar 2023 14:58 An: Marco Lechner ; pgsql-general@lists.postgresql.org Betreff: Re: Download file from COPY ... TO with pgadmin > On 31/01/2023 14:02 CET Marco Lechner wrote: >

Re: pgBackrest Error : authentication method 10 not supported

2023-01-31 Thread Magnus Hagander
On Tue, Jan 31, 2023 at 2:58 PM Daulat wrote: > Hello, > > I am getting an error message " authentication method 10 not supported" > while trying to create stanza on postgres14 after upgrading postgres from > v.10 to Postgres v.14. > > I am using pgbackrest version: v.43 and the scram-sha-256

Re: Download file from COPY ... TO with pgadmin

2023-01-31 Thread Erik Wienhold
> On 31/01/2023 14:02 CET Marco Lechner wrote: > > Using COPY …TO it is possible to store e.g. the “value” of a bytea cell in a > directory on the server. E.g. by this: > > COPY (SELECT content FROM d_doc WHERE id = 'x123456') TO > CONCAT('/tmp/mydoc.pdf’) (FORMAT binary); > > As we do not have

pgBackrest Error : authentication method 10 not supported

2023-01-31 Thread Daulat
Hello, I am getting an error message " authentication method 10 not supported" while trying to create stanza on postgres14 after upgrading postgres from v.10 to Postgres v.14. I am using pgbackrest version: v.43 and the scram-sha-256 for hba authentication. pgbackrest.conf entry: cat

Re: Best Open Source OS for Postgresql

2023-01-31 Thread hubert depesz lubaczewski
On Tue, Jan 31, 2023 at 02:09:40PM +0100, Marc Millas wrote: > if you do check the debian postgis repo, you ll find that its NOT possible > to choose a postgis version. > its possible for postgis 2.4 and 2.5, then ALL 3.x versions are > inaccessible but one, that did change from time to time. >

Re: Best Open Source OS for Postgresql

2023-01-31 Thread Marc Millas
Sorry for inappropriate "reply". if you do check the debian postgis repo, you ll find that its NOT possible to choose a postgis version. its possible for postgis 2.4 and 2.5, then ALL 3.x versions are inaccessible but one, that did change from time to time. (you MUST ask for postgis 3 without

Download file from COPY ... TO with pgadmin

2023-01-31 Thread Marco Lechner
Hi, Using COPY …TO it is possible to store e.g. the “value” of a bytea cell in a directory on the server. E.g. by this: COPY (SELECT content FROM d_doc WHERE id = 'x123456') TO CONCAT('/tmp/mydoc.pdf’) (FORMAT binary); As we do not have access to the postgresql fileserver (ssh, …), but can

Re: toast useless

2023-01-31 Thread Marcos Pegoraro
Simon Riggs escreveu: > On Tue, 13 Sept 2022 at 13:29, Marcos Pegoraro wrote: > >> > >> What problem do they cause you? > > > > > > They don't cause any problem, I was just trying to get my database as > clean as possible. > > I have some thousands of these toast tables with 8k bytes, so I was

Re: Best Open Source OS for Postgresql

2023-01-31 Thread hubert depesz lubaczewski
On Tue, Jan 31, 2023 at 01:18:08PM +0100, Marc Millas wrote: > Did you check postgis debian repo? ?? Not sure why: 1. you ask me that 2. you ask me that off list but no, i haven't. depesz

Re: Best Open Source OS for Postgresql

2023-01-31 Thread hubert depesz lubaczewski
On Tue, Jan 31, 2023 at 09:02:53AM +0100, Giovanni Biscontini wrote: > Hello everyone, > we're looking for a Open Source alternative to Rhel for our VM server > dedicated to Postgresql (14->15) installations. We're testing Alma, Rocky, > and Oracle distributions as they're compatible with Rhel

Re: Best Open Source OS for Postgresql

2023-01-31 Thread Surya Widyanto
Hi, From 2019, I've been using AlmaLinux from version 8.4 up to now version 8.7. This January, I've been trying to upgrade PostgreSQL from v14.6 to v15.1. When I install PostgreSQL v14.6 along side with v15.1 in the same server, it run without trouble at all, but because I'm using the PostGIS

Re: timestamptz, local time in the future, and Don't do it wiki

2023-01-31 Thread Max Nikulin
On 28/01/2023 01:03, Peter J. Holzer wrote: On 2023-01-27 19:12:08 +0700, Max Nikulin wrote: https://wiki.postgresql.org/wiki/Don%27t_Do_This#Date.2FTime_storage Could you, please, add a case when the timestamptz type should not be used? UTC timestamps of forthcoming events may change due to

Re: How to control pg_catalog results for each users?

2023-01-31 Thread 廣瀬 繁雄 □SWC○ACT
There have been a ton of discussions around this area over the years. The short answer is that if you think you need to prevent people from seeing the contents of the system catalogs, Postgres is not the database for you. I don't really foresee that changing, because it would break at least as

Re: any wait event for a commit in sync replication?

2023-01-31 Thread qihua wu
Sorry, the pg_stat_activity sql was executed from a session connecting to a wrong postgresql. It DOES show in the view, and the wait event is SyncRep. postgres=# select * from pg_stat_activity where application_name='psql' and datname='example'; -[ RECORD 1

Best Open Source OS for Postgresql

2023-01-31 Thread Giovanni Biscontini
Hello everyone, we're looking for a Open Source alternative to Rhel for our VM server dedicated to Postgresql (14->15) installations. We're testing Alma, Rocky, and Oracle distributions as they're compatible with Rhel package systems. Can you share your experience on a similar choice? Thanks in