pg_partman icon indicating copy to clipboard operation
pg_partman copied to clipboard

PG18: test/test-id-10.sql:34: ERROR: partitioned tables cannot be unlogged

Open df7cb opened this issue 8 months ago • 3 comments

pg_partman needs porting to PG18, at least the testsuite as used in the Debian packages is unhappy:

### PostgreSQL 18 virtualenv ###
Creating new PostgreSQL cluster 18/regress ...
+ psql -c 'CREATE EXTENSION pgtap'
CREATE EXTENSION
Zeit: 33.689 ms
+ psql -c 'CREATE EXTENSION pg_partman'
CREATE EXTENSION
Zeit: 20.741 ms
+ pg_prove -ovf test/test-id-10.sql
test/test-id-10.sql .. 
partman, public
1..135
psql:test/test-id-10.sql:34: ERROR:  partitioned tables cannot be unlogged
Dubious, test returned 3 (wstat 768, 0x300)
Failed 135/135 subtests 

Test Summary Report
-------------------
test/test-id-10.sql (Wstat: 768 (exited 3) Tests: 0 Failed: 0)
  Non-zero exit status: 3
  Parse errors: Bad plan.  You planned 135 tests but ran 0.
Files=1, Tests=0,  0 wallclock secs ( 0.01 usr  0.00 sys +  0.03 cusr  0.01 csys =  0.05 CPU)
Result: FAIL
*** /home/myon/tmp/pg_virtualenv.Gkl2fR/log/postgresql-18-regress.log (last 100 lines) ***

df7cb avatar Apr 28 '25 15:04 df7cb

Thanks. Happen to know what happened with unlogged tables and partitioning in 18? Did they completely disallow it now?

keithf4 avatar Apr 28 '25 15:04 keithf4

https://github.com/postgres/postgres/commit/e2bab2d792044b55dd092bf1c2be0d570ccb9401 sounds like it never really worked.

df7cb avatar Apr 28 '25 16:04 df7cb

Right it never really worked, but I was able to work around it in pg_partman a bit.

https://github.com/pgpartman/pg_partman/blob/development/doc/pg_partman.md#child-table-property-inheritance

Will see what may still be supported

keithf4 avatar Apr 28 '25 17:04 keithf4

So, pg_partman can still continue to support unlogged tables through the template table. It's just that the unlogged flag can no longer be set on the parent table of a partition set.

So, I just needed to update the test to no longer set the flag on the parent and things still work as they did before.

keithf4 avatar Sep 22 '25 18:09 keithf4

5.3.0 has been released with this fix

keithf4 avatar Oct 09 '25 15:10 keithf4