pg_reorg version 1.1.0.
- Add wait-timeout option and use SET statement_timeout instead of NOWAIT. This can avoid infinite NOWAIT loops to reorganize heavily accessed tables. - Support native build with MSVC on Windows.
This commit is contained in:
167
msvc/bin.vcproj
Executable file
167
msvc/bin.vcproj
Executable file
@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="shift_jis"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="bin"
|
||||
ProjectGUID="{B6B37F22-9E44-4240-AAA0-650D4AC2C1E2}"
|
||||
RootNamespace="bin"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)/bin"
|
||||
IntermediateDirectory="$(SolutionDir)/obj/$(ProjectName)"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="1"
|
||||
DisableSpecificWarnings="4996"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib advapi32.lib ws2_32.lib $(NoInherit) libpq.lib libpgport.lib libintl-8.lib"
|
||||
OutputFile="$(OutDir)\$(SolutionName).exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="src"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\bin\pg_reorg.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\bin\pgut\pgut-fe.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\bin\pgut\pgut.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="include"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\bin\pgut\pgut-fe.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\bin\pgut\pgut.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="regress"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\bin\expected\init.out"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\bin\sql\init.sql"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\bin\expected\reorg.out"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\bin\sql\reorg.sql"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\bin\Makefile"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\readme.txt"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
151
msvc/lib.vcproj
Executable file
151
msvc/lib.vcproj
Executable file
@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="shift_jis"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="lib"
|
||||
ProjectGUID="{B6B37F22-9E44-4240-AAA0-650D4AC2C2E2}"
|
||||
RootNamespace="lib"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)/bin"
|
||||
IntermediateDirectory="$(SolutionDir)/obj/$(ProjectName)"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="1"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../include"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CRT_SECURE_NO_WARNINGS"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="2"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="0"
|
||||
CompileAs="1"
|
||||
DisableSpecificWarnings="4996;4018"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="kernel32.lib advapi32.lib ws2_32.lib $(NoInherit) postgres.lib libpq.lib"
|
||||
OutputFile="$(OutDir)\$(SolutionName).dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="false"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="src"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\lib\pgut\pgut-be.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\pgut\pgut-spi.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\reorg.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="include"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\lib\pgut\pgut-be.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\pgut\pgut-spi.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\lib\Makefile"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\pg_reorg.sql.in"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\lib\uninstall_pg_reorg.sql"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
21
msvc/pg_reorg.sln
Executable file
21
msvc/pg_reorg.sln
Executable file
@ -0,0 +1,21 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual C++ Express 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bin", "bin.vcproj", "{B6B37F22-9E44-4240-AAA0-650D4AC2C1E2}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lib", "lib.vcproj", "{B6B37F22-9E44-4240-AAA0-650D4AC2C2E2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B6B37F22-9E44-4240-AAA0-650D4AC2C1E2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B6B37F22-9E44-4240-AAA0-650D4AC2C1E2}.Release|Win32.Build.0 = Release|Win32
|
||||
{B6B37F22-9E44-4240-AAA0-650D4AC2C2E2}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B6B37F22-9E44-4240-AAA0-650D4AC2C2E2}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
42
msvc/readme.txt
Executable file
42
msvc/readme.txt
Executable file
@ -0,0 +1,42 @@
|
||||
How to build with Microsoft Visual C++ Express 2005
|
||||
|
||||
You might need:
|
||||
1. Register PostgreSQL directory to your environment.
|
||||
2. Resolve redefinitions of ERROR macro.
|
||||
|
||||
----
|
||||
1. Register PostgreSQL directory to your environment.
|
||||
|
||||
The directory configuration options are found in:
|
||||
Tool > Option > Projects and Solutions > VC++ directory
|
||||
|
||||
You might need to add the following directories:
|
||||
into "include files"
|
||||
- C:\Program Files\PostgreSQL\8.4\include
|
||||
- C:\Program Files\PostgreSQL\8.4\include\internal
|
||||
- C:\Program Files\PostgreSQL\8.4\include\server
|
||||
- C:\Program Files\PostgreSQL\8.4\include\server\port\win32
|
||||
- C:\Program Files\PostgreSQL\8.4\include\server\port\win32_msvc
|
||||
into "library files"
|
||||
- C:\Program Files\PostgreSQL\8.4\lib
|
||||
|
||||
----
|
||||
2. Resolve redefinitions of ERROR macro.
|
||||
|
||||
It might be a bad manner, but I'll recommend to modify your wingdi.h.
|
||||
|
||||
--- wingdi.h 2008-01-18 22:17:42.000000000 +0900
|
||||
+++ wingdi.fixed.h 2010-03-03 09:51:43.015625000 +0900
|
||||
@@ -101,11 +101,10 @@
|
||||
#endif // (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
|
||||
|
||||
/* Region Flags */
|
||||
-#define ERROR 0
|
||||
+#define RGN_ERROR 0
|
||||
#define NULLREGION 1
|
||||
#define SIMPLEREGION 2
|
||||
#define COMPLEXREGION 3
|
||||
-#define RGN_ERROR ERROR
|
||||
|
||||
/* CombineRgn() Styles */
|
||||
#define RGN_AND 1
|
Reference in New Issue
Block a user