couldn't drop subscription after upgrading via logical replication.

2021-01-15 Thread James()
Hello! I upgraded my postgres from 11 to 13 using logical replication(publication in PG-11 and subscription in PG-13 of course). Now I encountered this problem, I cannot drop the subscription in PG-13: drop subscription sub_upgrade_to_13; ERROR:  could not drop the replication slot "sub_upgrad

Re: What to do with tablespaces when upgrading to pg13 from pg1X?

2021-01-11 Thread James()
Got you, thanks a lot Bruce!     -- Original -- From:  "Bruce Momjian"https://momjian.us   EnterpriseDB https://enterprisedb.com   The usefulness of a cup is in its emptiness, Bruce Lee

Re: What to do with tablespaces when upgrading to pg13 from pg1X?

2021-01-11 Thread James()
You mean PG_13_202007201 was created by PG 13 ? No, there isn't any other clusters, maybe it was created by my previous failed attempts of upgrading. So it seems it should be ok that I issue a command like this  find . -name "PG_13*"|xargs rm -rf and then do upgrade again?   There should be a

What to do with tablespaces when upgrading to pg13 from pg1X?

2021-01-11 Thread James()
Hello, I was planning to upgrade from 12 to 13 using this command: /usr/pgsql-13/bin/pg_upgrade -b /usr/pgsql-12/bin/ -B /usr/pgsql-13/bin/ -d /data/pg/ -D /pg/pgdata_13/ --jobs=10 And I got this output: Checking for presence of required libraries                 ok Checking database user is the

How to prevent POSTGRES killing linux system from accepting too much inserts?

2019-12-18 Thread James()
Hello,I encountered into this kernel message, and I cannot login into the Linux system anymore: Dec 17 23:01:50 hq-pg kernel: sh (6563): drop_caches: 1Dec 17 23:02:30 hq-pg kernel: INFO: task sync:6573 blocked for more than 120 seconds.Dec 17 23:02:30 hq-pg kernel: "echo 0 > /proc/sys/kernel/hu

Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?

2019-11-21 Thread James()
Thanks Imre, this is a very important comment, 128 bits is much smaller than 45*8+2=362. Very glad to know that, thank you very much! James     -- Original -- From:  "Imre Samu"https://www.postgresql.org/docs/11/datatype-uuid.html "UUID would be the fastest

Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?

2019-11-20 Thread James()
Thanks Thomas for this information, I will try that and get back here. James   -- Original -- From:  "Thomas Kellerer"

Re: How should I specify work_mem/max_worker_processes if I want to do big queries now and then?

2019-11-20 Thread James()
Hello Laurenz, Thanks Laurenz for the quick reply, I will supply these information later. James

How should I specify work_mem/max_worker_processes if I want to do big queries now and then?

2019-11-19 Thread James()
Hello, I am doing a query to fetch about 1000 records in one time. But the query seems very slow, like "mission impossible". I am very confident that these records should be fit into my shared_buffers settings(20G), and my query is totally on my index, which is this big:(19M x 100 partitio

Re: How to gracefully keep my specific index in memory ?

2019-08-12 Thread James()
? -- Original -- From: "Laurenz Albe"; Date: Mon, Aug 12, 2019 08:24 PM To: "James(王旭)"; "pgsql-general"; Subject: Re: How to gracefully keep my specific index in memory ? James(王旭) wrote: > As the title,How to keep a sp

How to gracefully keep my specific index in memory ?

2019-08-12 Thread James()
Hello: As the title,How to keep a specific index in memory gracefully? After some statistical query, I can determine that not all indexes can be fit into memory, but one of the most frequently used indexes(say idx_xyz) can be definitely fit into memory(specifically ,[the size of idx_xyz]=20%

Re: Issue related with patitioned table:How can I quickly determine which child table my record is in,given a specific primary key value?

2019-07-17 Thread James()
Hi Luca, Yes, that's the answer,It really works! Thanks again Luca, you actually saved my day! James. -- Original -- From: "Luca Ferrari"; Date: Wed, Jul 17, 2019 06:49 PM To: "James(王旭)"; Cc: "pgsql-general"; Subject:

Re: Issue related with patitioned table:How can I quickly determine which child table my record is in,given a specific primary key value?

2019-07-17 Thread James()
Here's my PG version: PostgreSQL 11.3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-36), 64-bit Hope this helps. -- Original -- From: "James(王旭)"; Date: Wed, Jul 17, 2019 05:36 PM To: "Luca Ferrari&qu

Re: Issue related with patitioned table:How can I quickly determine which child table my record is in,given a specific primary key value?

2019-07-17 Thread James()
quot;Luca Ferrari"; Date: Wed, Jul 17, 2019 05:13 PM To: "王旭"; Cc: "pgsql-general"; Subject: Re: Issue related with patitioned table:How can I quickly determine which child table my record is in,given a specific primary key value? On Wed, Jul 17, 2019 at

Issue related with patitioned table:How can I quickly determine which child table my record is in,given a specific primary key value?

2019-07-17 Thread
Hello! My table is described as below: CREATE TABLE IF NOT EXISTS mytable ( uuid varchar(45) NOT NULL, symbol_idsmallint NOT NULL, ... ... PRIMARY KEY (symbol_id,uuid) ) partition by hash(symbol_id) create table mytable_0 partition of 0 FOR VALUES W