Re: [GENERAL] MySQL -> PostgreSQL conversion issue
Thank you for your reply, sorry for the late response, your reply really helped me. Thanks Deepak On Fri, Aug 19, 2011 at 11:39 AM, Alban Hertroys < dal...@solfertje.student.utwente.nl> wrote: > On 19 Aug 2011, at 14:50, DM wrote: > > > Hi All, > > > > how to insert mysql (datetime interval) data to postgrres interval > datatype. > > > > mysql > > | test_interval | datetime | YES | | 1970-01-02 00:00:00 | > | > > > > psql > > test_interval | interval | > > > > > > any solution for this? > > I think you want something like this?: > > development=> select '1970-01-02 00:00:00'::timestamp without time zone - > '1970-01-01 00:00:00'::timestamp without time zone; > ?column? > -- > 1 day(1 row) > > Midnight 1970-01-01 being the baseline for their calculations is a bit of a > guess, but that seems to make sense with the example you gave. > You probably don't want postgres to be smart with your client's time zone > settings, hence the "without time zone". > > Alban Hertroys > > -- > Screwing up is an excellent way to attach something to the ceiling. > > > !DSPAM:1293,4e4eadd212091422813852! > > >
[GENERAL] record-based log shipping
Hello, I have a question about log shipping. The documentation from PostgreSQL 8.4, in section 24.4.4, describes how to archive partial WAL files by using the pg_xlogfile_name_offset() function, which it calls "record-based log shipping". Although it seems that this section of documentation has been removed in 9.0, the capability is apparently still there. (Of course 9.0 comes with streaming replication, but the ability to perform archiving this way is attractive as it can be used to replicate the database to a non-sql data storage system.) Well, I have successfully written an archiving script to copy the partial WAL segments as described, but I am confused as to how I would actually use this data for a recovery. Section 24.4.4 states that the "restore_command scripts still deal in whole WAL files, so the incrementally copied data is not ordinarily made available to the standby servers. It is of use only when the primary dies — then the last partial WAL file is fed to the standby before allowing it to come up." So how would one "feed" incrementally copied partial WAL file data to a standby (actually a new server used for recovery) as suggested above? Thanks. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general