Opened 9 years ago

Closed 7 years ago

Last modified 6 years ago

#4708 closed enhancement (fixed)

ogr2ogr: PostgreSQL support creating UNLOGGED tables

Reported by: andrewharvey Owned by: warmerdam
Priority: normal Milestone: 2.0.0
Component: OGR_SF Version: unspecified
Severity: normal Keywords: PostGIS PG

Description (last modified by warmerdam)

Similar to changeset r19702 which introduced creation of TEMPORARY tables, I would like to be able to created UNLOGGED tables with a similar UNLOGGED layer creation option.

According to the PostgreSQL documentation you can't have both a TEMPORARY and UNLOGGED table so a patch would need to take that into account.

The patch would also need to take into account unlogged GiST indexes are currently not supported and cannot be created on an unlogged table, meaning this option is only usable with the lco SPATIAL_INDEX=OFF.

The latter restriction probably means it wouldn't be very useful for most situations, but there are still some instances where you could want UNLOGGED with no GIST spatial index.

Unless someone else is willing to give this a shot, and assuming the idea isn't shot down I will have a go at creating a patch after I get some comments/thoughts on this ticket.

Attachments (1)

unlogged.diff (1.5 KB) - added by javisantana 7 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 9 years ago by warmerdam

Component: defaultOGR_SF
Description: modified (diff)
Keywords: PostGIS PG added

I see no problem with adding this. Note it isn't critical that you validate that it isn't used in combination with TEMPORARY since postgres will enforce this and error out.

Changed 7 years ago by javisantana

Attachment: unlogged.diff added

comment:2 Changed 7 years ago by Even Rouault

Milestone: 2.0
Resolution: fixed
Status: newclosed

trunk r28908 "PG/PGDump: add UNLOGGED=YES/NO layer creation option to create unlogged tables (improved version of patch by Javier Santana, #4708)"

comment:3 Changed 6 years ago by Even Rouault


Milestone renamed

Note: See TracTickets for help on using tickets.