Regarding tables detach concurrently with run_maintenance_proc()

2024-07-11 Thread Durgamahesh Manne
Hi Respected Team By default proc() does not detach tables concurrently. How do we implement tables detach concurrently without blocking running sessions in prod. why this is very critical to implement for pg_partman. if this is not available yet on 5.1.0 then when can i expect to get it if alread

Re: page is not marked all-visible but visibility map bit is set in relation "pg_statistic"

2024-07-11 Thread Tomas Vondra
On 7/11/24 19:21, Gus Spier wrote: > AWS RDS Postgres Aurora version 14.4 > I believe RDS and Aurora are two separate products, so I'm a bit confused by this ... > Error log shows: page is not marked all-visible but visibility map bit is > set in relation "pg_statistic" > > To me, that sounds o

Re: Running psql in a docker container

2024-07-11 Thread H
On July 11, 2024 3:31:37 PM EDT, Adrian Klaver wrote: >On 7/11/24 11:14, H wrote: >> On July 11, 2024 11:06:02 AM GMT-04:00, Adrian Klaver > wrote: >>> On 7/11/24 07:57, H wrote: I used to successfully run psql server 13 in a CentOS 7 docker >>> container with CentOS 7 as the host operating

Re: Running psql in a docker container

2024-07-11 Thread H
On July 11, 2024 3:48:42 PM EDT, Tom Lane wrote: >H writes: >> Understood but how should formulate the initdb statement to >accomplish what I want on pgsql 16 since the syntax I used for pgsql 13 >does not work in my container? > >You still haven't shown us the actual error message, so we're all

Re: Running psql in a docker container

2024-07-11 Thread Tom Lane
H writes: > Understood but how should formulate the initdb statement to accomplish what I > want on pgsql 16 since the syntax I used for pgsql 13 does not work in my > container? You still haven't shown us the actual error message, so we're all just guessing. I will offer a guess though. This

Re: Running psql in a docker container

2024-07-11 Thread Adrian Klaver
On 7/11/24 11:14, H wrote: On July 11, 2024 11:06:02 AM GMT-04:00, Adrian Klaver wrote: On 7/11/24 07:57, H wrote: I used to successfully run psql server 13 in a CentOS 7 docker container with CentOS 7 as the host operating system. I have now upgraded that system to Rocky Linux 9 as the host

Re: Running psql in a docker container

2024-07-11 Thread H
On July 11, 2024 2:20:43 PM EDT, Tom Lane wrote: >H writes: >> Good question! ”No success” meant that I have not been able to figure >out how to have new databases default to en_US.UTF-8, instead they >default to C.UTF-8. > >The default for an installation is determined at initdb time, either >wi

Re: Running psql in a docker container

2024-07-11 Thread David G. Johnston
On Thu, Jul 11, 2024 at 11:16 AM H wrote: > What is the proper syntax for pgsql 16 for this? I could not get the > example given in the docs to work... > The documentation says this still works: su - postgres -c "/usr/pgsql-16/bin/initdb -D /var/lib/pgsql/16/data/ -E 'UTF-8' --lc-collate='en_U

Re: Running psql in a docker container

2024-07-11 Thread Tom Lane
H writes: > Good question! ”No success” meant that I have not been able to figure out how > to have new databases default to en_US.UTF-8, instead they default to C.UTF-8. The default for an installation is determined at initdb time, either with an explicit locale switch or from the environment l

Re: Running psql in a docker container

2024-07-11 Thread H
On July 11, 2024 11:06:02 AM GMT-04:00, Adrian Klaver wrote: >On 7/11/24 07:57, H wrote: >> I used to successfully run psql server 13 in a CentOS 7 docker >container with CentOS 7 as the host operating system. I have now >upgraded that system to Rocky Linux 9 as the host operating system and >mod

page is not marked all-visible but visibility map bit is set in relation "pg_statistic"

2024-07-11 Thread Gus Spier
AWS RDS Postgres Aurora version 14.4 Error log shows: page is not marked all-visible but visibility map bit is set in relation "pg_statistic" To me, that sounds ominous. But, there does not appear to be any great performance hit. The applications are chugging along nicely. The end-users have not

Re: Help. The database was created using collation version 2.17, but the operating system provides version 2.34.

2024-07-11 Thread Dmitry O Litvintsev
Hello, Thank you to all who responded. There is a follow up question. Our admin tried the following: A host that wad been running postgresql11 was upgraded to Alma9 (from SL7) and postgresql15. They then built postgresql11 on that host from sources. Then they run pg_upgrade from 11 to 15. I

Re: Query on partitioned table needs memory n_partitions * work_mem

2024-07-11 Thread David G. Johnston
On Thursday, July 11, 2024, Dimitrios Apostolou wrote:I wonder how the postgres development community is > > tracking all these issues, I've even started forgetting the ones I have > found, and I'm sure I have previously reported (on this list) a couple of > should-be-easy issues that would be ide

Re: Query on partitioned table needs memory n_partitions * work_mem

2024-07-11 Thread Dimitrios Apostolou
On Thu, 11 Jul 2024, Tom Lane wrote: Dimitrios Apostolou writes: The TABLE test_runs_raw has 1000 partitions on RANGE(workitem_n). So don't do that. Adding partitions is not cost-free. I understand that, they also add an administrative cost that I'd rather avoid. But I ended up adding al

Re: Running psql in a docker container

2024-07-11 Thread Adrian Klaver
On 7/11/24 07:57, H wrote: I used to successfully run psql server 13 in a CentOS 7 docker container with CentOS 7 as the host operating system. I have now upgraded that system to Rocky Linux 9 as the host operating system and modifying my container to also use Rocky Linux 9 and psql server 16.

Re: Postgresql range_agg() Return empty list

2024-07-11 Thread PetSerAl
Your update expression does not handle empty ranges properly, but convert them into complete ranges. https://dbfiddle.uk/Ia6wESpL On Thu, Jul 11, 2024 at 5:55 PM Han Tang wrote: > > Hi > > Hope you are doing well! > > I am using range_agg() function, it works fine with original table value > > Q

Running psql in a docker container

2024-07-11 Thread H
I used to successfully run psql server 13 in a CentOS 7 docker container with CentOS 7 as the host operating system. I have now upgraded that system to Rocky Linux 9 as the host operating system and modifying my container to also use Rocky Linux 9 and psql server 16. I can successfully get the

Re: Query on partitioned table needs memory n_partitions * work_mem

2024-07-11 Thread Tom Lane
Dimitrios Apostolou writes: > The TABLE test_runs_raw has 1000 partitions on RANGE(workitem_n). So don't do that. Adding partitions is not cost-free. regards, tom lane

Re: Query on partitioned table needs memory n_partitions * work_mem

2024-07-11 Thread Dimitrios Apostolou
Thank you for the feedback. So I've managed to reduce the query to a rather simple one: SELECT workitem_n, test_executable_n, bool_or(test_resulttype_n IN (2,3)) FROM test_runs_raw GROUP BY workitem_n, test_executable_n LIMIT 10; The TABLE test_runs_raw has 1000 partitions on R

Re: Dropping column from big table

2024-07-11 Thread Alvaro Herrera
On 2024-Jul-11, Ron Johnson wrote: > Anyway, DROP is the easy part; it's ADD COLUMN that can take a lot of time > (depending on whether or not you populate the column with a default value). Actually, ADD COLUMN with a default does not rewrite the entire table either, starting from pg11. "Major e

Re: Dropping column from big table

2024-07-11 Thread Ron Johnson
On Thu, Jul 11, 2024 at 3:41 AM sud wrote: > > > On Thu, 11 Jul, 2024, 12:46 pm Ron Johnson, > wrote: > >> On Wed, Jul 10, 2024 at 11:28 PM sud wrote: >> >>> >>> >>> >>> Thank you so much. When you said *"you can execute one of the forms of >>> ALTER TABLE that performs a rewrite* >>> *of the w

Re: Dropping column from big table

2024-07-11 Thread Laurenz Albe
On Thu, 2024-07-11 at 13:10 +0530, sud wrote: > Dropping will take it's own time for post vacuum however as you > rightly said, it won't be blocking which should be fine.  I am not certain if you understood this correctly. Dropping a column is fast, but doesn't reclaim the space. VACUUM won't blo

Re: Dropping column from big table

2024-07-11 Thread sud
On Thu, 11 Jul, 2024, 12:46 pm Ron Johnson, wrote: > On Wed, Jul 10, 2024 at 11:28 PM sud wrote: > >> >> >> >> Thank you so much. When you said *"you can execute one of the forms of >> ALTER TABLE that performs a rewrite* >> *of the whole table."* Does it mean that post "alter table drop column"

Re: Dropping column from big table

2024-07-11 Thread Ron Johnson
On Wed, Jul 10, 2024 at 11:28 PM sud wrote: > > On Thu, Jul 11, 2024 at 2:52 AM Adrian Klaver > wrote: > >> >> https://www.postgresql.org/docs/current/sql-altertable.html >> >> "The DROP COLUMN form does not physically remove the column, but simply >> makes it invisible to SQL operations. Subseq